Gentoo Archives: gentoo-commits

From: Kent Fredric <kentnl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Fuse/, dev-perl/Fuse/files/
Date: Fri, 18 Sep 2020 04:32:06
Message-Id: 1600403449.b4afbc116a7b929211e8bb9d9ddbcbec8ea3c1cd.kentnl@gentoo
1 commit: b4afbc116a7b929211e8bb9d9ddbcbec8ea3c1cd
2 Author: Kent Fredric <kentnl <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 18 04:29:58 2020 +0000
4 Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 18 04:30:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4afbc11
7
8 dev-perl/Fuse: -r bump for various toolchain love and bug fixes
9
10 - Fix incorrect LICENSE
11 - Use sys-fs/fuse:0 as the code doesn't bind against fuse:3, even if
12 present.
13 - Strip unwanted tests
14 - Disable parallel testing (has a defined order where an script ensures
15 the "mount" test is run before all others, and an "unmount" script run
16 at the end for cleanup, and jumbling this order messes everything up.
17 - Fix tests failing to load without '.' in @INC
18 - Patch test code to work in "${T}" instead of /tmp/, and guard against
19 lots of problems with bad path handling that could fail due to shell
20 interpolation, as well as avoiding a few unneeded calls to dumb things
21 like qx{cat foo} which works better done natively in perl
22 - Borrow debians ioctl patch which may be tripping up musl
23 - Ensure CFLAGS passed to make/compiler
24 - Avoid running test suite under FEATURES="usersandbox" as the need to
25 run fuse and mount filesystems for testing
26
27 Bug: https://bugs.gentoo.org/699664
28 Bug: https://bugs.gentoo.org/712738
29 Bug: https://bugs.gentoo.org/720770
30 Package-Manager: Portage-3.0.4, Repoman-3.0.1
31 Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>
32
33 dev-perl/Fuse/Fuse-0.16.1-r2.ebuild | 62 +++++
34 dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch | 22 ++
35 .../Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch | 286 +++++++++++++++++++++
36 .../Fuse/files/Fuse-0.16.1-tempdir-override.patch | 162 ++++++++++++
37 4 files changed, 532 insertions(+)
38
39 diff --git a/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild b/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild
40 new file mode 100644
41 index 00000000000..c4b3462bcde
42 --- /dev/null
43 +++ b/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild
44 @@ -0,0 +1,62 @@
45 +# Copyright 1999-2020 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=7
49 +
50 +DIST_AUTHOR=DPATES
51 +inherit perl-module
52 +
53 +DESCRIPTION="Fuse module for perl"
54 +
55 +SLOT="0"
56 +LICENSE="LGPL-2.1"
57 +KEYWORDS="~amd64 ~x86"
58 +IUSE="test"
59 +RESTRICT="!test? ( test )"
60 +
61 +RDEPEND="
62 + sys-fs/fuse:0=
63 + dev-perl/Filesys-Statvfs
64 + dev-perl/Lchown
65 + dev-perl/Unix-Mknod
66 +"
67 +DEPEND="
68 + sys-fs/fuse:0=
69 +"
70 +BDEPEND="
71 + virtual/perl-ExtUtils-MakeMaker
72 + test? (
73 + ${RDEPEND}
74 + )
75 +"
76 +PATCHES=(
77 + "${FILESDIR}/${PN}-0.16.1-no-dot-inc-tests.patch"
78 + "${FILESDIR}/${PN}-0.16.1-tempdir-override.patch"
79 + "${FILESDIR}/${PN}-0.16.1-ioctl-header.patch"
80 +)
81 +PERL_RM_FILES=(
82 + test/pod.t
83 +)
84 +
85 +src_compile() {
86 + mymake=(
87 + "OPTIMIZE=${CFLAGS}"
88 + )
89 + perl-module_src_compile
90 +}
91 +
92 +src_test() {
93 + if has usersandbox ${FEATURES}; then
94 + ewarn "'FEATURES=usersandbox' detected, skipping tests"
95 + return
96 + fi
97 + export FUSE_TEMPDIR="${T}/fuse"
98 + mkdir -p "${FUSE_TEMPDIR}" || die "Can't mkdir ${FUSE_TEMPDIR}"
99 + export FUSE_MOUNTPOINT="${FUSE_TEMPDIR}/fuse-mount"
100 + export FUSE_TESTMOUNT="${FUSE_TEMPDIR}/fuse-test"
101 + export FUSE_PIDFILE="${FUSE_TEMPDIR}/mounted.pid"
102 + export FUSE_LOGFILE="${FUSE_TEMPDIR}/fusemnt.log"
103 + # Strict ordering required
104 + export DIST_TEST="do verbose"
105 + perl-module_src_test
106 +}
107
108 diff --git a/dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch b/dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch
109 new file mode 100644
110 index 00000000000..4a9f6a09cc6
111 --- /dev/null
112 +++ b/dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch
113 @@ -0,0 +1,22 @@
114 +From ecddb700c4551157fb5604c59c38eefc9a99d21b Mon Sep 17 00:00:00 2001
115 +From: =?UTF-8?q?Bastien=20Roucari=C3=A8s?= <rouca@××××××.org>
116 +Date: Sun, 1 Jul 2018 22:10:44 +0200
117 +Subject: Include ioctl header in order to close FTBFS in MIPS
118 +
119 +Workarround a glibc bug
120 +
121 +Forwarded: no, not-needed
122 +---
123 + Fuse.xs | 2 ++
124 + 1 file changed, 2 insertions(+)
125 +
126 +diff --git a/Fuse.xs b/Fuse.xs
127 +index e9cce2e..4504a29 100755
128 +--- a/Fuse.xs
129 ++++ b/Fuse.xs
130 +@@ -1,3 +1,5 @@
131 ++#include <sys/ioctl.h>
132 ++
133 + #define PERL_NO_GET_CONTEXT
134 + #include "EXTERN.h"
135 + #include "perl.h"
136
137 diff --git a/dev-perl/Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch b/dev-perl/Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch
138 new file mode 100644
139 index 00000000000..b0526aebcd4
140 --- /dev/null
141 +++ b/dev-perl/Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch
142 @@ -0,0 +1,286 @@
143 +From 64eb5b9e760a90a78d4a508bf916242849212b41 Mon Sep 17 00:00:00 2001
144 +From: Kent Fredric <kentnl@g.o>
145 +Date: Fri, 18 Sep 2020 04:26:16 +1200
146 +Subject: Hack around path resolution problems caused by '.' removal
147 +
148 +This avoids problems on perl 5.26+ where cwd ('.') is no longer in the
149 +@INC search path.
150 +---
151 + test/chmod.t | 3 ++-
152 + test/chown.t | 3 ++-
153 + test/getattr.t | 3 ++-
154 + test/getdir.t | 3 ++-
155 + test/helper.pm | 2 +-
156 + test/link.t | 3 ++-
157 + test/mkdir.t | 3 ++-
158 + test/mknod.t | 3 ++-
159 + test/open.t | 3 ++-
160 + test/read.t | 3 ++-
161 + test/readlink.t | 3 ++-
162 + test/rename.t | 3 ++-
163 + test/rmdir.t | 3 ++-
164 + test/s/mount.t | 3 ++-
165 + test/s/umount.t | 3 ++-
166 + test/statfs.t | 3 ++-
167 + test/symlink.t | 3 ++-
168 + test/truncate.t | 3 ++-
169 + test/unlink.t | 3 ++-
170 + test/utime.t | 3 ++-
171 + test/write.t | 3 ++-
172 + 21 files changed, 41 insertions(+), 21 deletions(-)
173 +
174 +diff --git a/test/chmod.t b/test/chmod.t
175 +index 1ccb3ef..26ddbf9 100644
176 +--- a/test/chmod.t
177 ++++ b/test/chmod.t
178 +@@ -1,5 +1,6 @@
179 + #!/usr/bin/perl
180 +-use test::helper qw($_real $_point);
181 ++use lib './test/';
182 ++use helper qw($_real $_point);
183 + use Test::More;
184 + plan tests => 4;
185 + chdir($_point);
186 +diff --git a/test/chown.t b/test/chown.t
187 +index 74adb14..194f2fb 100644
188 +--- a/test/chown.t
189 ++++ b/test/chown.t
190 +@@ -1,5 +1,6 @@
191 + #!/usr/bin/perl
192 +-use test::helper qw($_real $_point);
193 ++use lib './test/';
194 ++use helper qw($_real $_point);
195 + use Test::More;
196 + use English;
197 + plan tests => 4;
198 +diff --git a/test/getattr.t b/test/getattr.t
199 +index 5d8c85d..ba575c1 100644
200 +--- a/test/getattr.t
201 ++++ b/test/getattr.t
202 +@@ -1,5 +1,6 @@
203 + #!/usr/bin/perl
204 +-use test::helper qw($_real $_point);
205 ++use lib './test/';
206 ++use helper qw($_real $_point);
207 + use Test::More;
208 + use Data::Dumper;
209 + plan tests => 203;
210 +diff --git a/test/getdir.t b/test/getdir.t
211 +index e6d402a..789b667 100644
212 +--- a/test/getdir.t
213 ++++ b/test/getdir.t
214 +@@ -1,5 +1,6 @@
215 + #!/usr/bin/perl
216 +-use test::helper qw($_real $_point);
217 ++use lib './test/';
218 ++use helper qw($_real $_point);
219 + use Test::More;
220 + my (@names) = qw(abc def ghi jkl mno pqr stu jlk sfdaljk sdfakjlsdfa kjldsf kjl;sdf akjl;asdf klj;asdf lkjsdflkjsdfkjlsdfakjsdfakjlsadfkjl;asdfklj;asdfkjl;asdfklj;asdfkjl;asdfkjlasdflkj;sadf);
221 + @names = sort(@names);
222 +diff --git a/test/helper.pm b/test/helper.pm
223 +index d44b486..f210105 100644
224 +--- a/test/helper.pm
225 ++++ b/test/helper.pm
226 +@@ -1,6 +1,6 @@
227 + #!/usr/bin/perl
228 + package # avoid cpan indexing
229 +- test::helper;
230 ++ helper;
231 + use strict;
232 + use Exporter;
233 + use Config;
234 +diff --git a/test/link.t b/test/link.t
235 +index f617c93..f301ee8 100644
236 +--- a/test/link.t
237 ++++ b/test/link.t
238 +@@ -1,5 +1,6 @@
239 + #!/usr/bin/perl
240 +-use test::helper qw($_real $_point);
241 ++use lib './test/';
242 ++use helper qw($_real $_point);
243 + use Test::More;
244 + plan tests => 8;
245 + chdir($_point);
246 +diff --git a/test/mkdir.t b/test/mkdir.t
247 +index 90ec6f3..b622aa9 100644
248 +--- a/test/mkdir.t
249 ++++ b/test/mkdir.t
250 +@@ -1,5 +1,6 @@
251 + #!/usr/bin/perl
252 +-use test::helper qw($_real $_point);
253 ++use lib './test/';
254 ++use helper qw($_real $_point);
255 + use Test::More;
256 + plan tests => 3;
257 + chdir($_point);
258 +diff --git a/test/mknod.t b/test/mknod.t
259 +index c35853a..7c867c6 100644
260 +--- a/test/mknod.t
261 ++++ b/test/mknod.t
262 +@@ -1,5 +1,6 @@
263 + #!/usr/bin/perl
264 +-use test::helper qw($_real $_point);
265 ++use lib './test/';
266 ++use helper qw($_real $_point);
267 + use Test::More;
268 + plan tests => 24;
269 + use English;
270 +diff --git a/test/open.t b/test/open.t
271 +index b3afaf6..c3b79b6 100644
272 +--- a/test/open.t
273 ++++ b/test/open.t
274 +@@ -1,5 +1,6 @@
275 + #!/usr/bin/perl
276 +-use test::helper qw($_real $_point);
277 ++use lib './test/';
278 ++use helper qw($_real $_point);
279 + use Test::More;
280 + plan tests => 1;
281 + chdir($_real);
282 +diff --git a/test/read.t b/test/read.t
283 +index b4297f3..4477ab7 100644
284 +--- a/test/read.t
285 ++++ b/test/read.t
286 +@@ -1,5 +1,6 @@
287 + #!/usr/bin/perl
288 +-use test::helper qw($_real $_point);
289 ++use lib './test/';
290 ++use helper qw($_real $_point);
291 + use Test::More;
292 + plan tests => 3;
293 + chdir($_real);
294 +diff --git a/test/readlink.t b/test/readlink.t
295 +index 85b9ffc..14457da 100644
296 +--- a/test/readlink.t
297 ++++ b/test/readlink.t
298 +@@ -1,5 +1,6 @@
299 + #!/usr/bin/perl
300 +-use test::helper qw($_point $_real);
301 ++use lib './test/';
302 ++use helper qw($_point $_real);
303 + use Test::More;
304 + plan tests => 4;
305 + chdir($_real);
306 +diff --git a/test/rename.t b/test/rename.t
307 +index 454da8b..6f61e56 100644
308 +--- a/test/rename.t
309 ++++ b/test/rename.t
310 +@@ -1,5 +1,6 @@
311 + #!/usr/bin/perl
312 +-use test::helper qw($_real $_point);
313 ++use lib './test/';
314 ++use helper qw($_real $_point);
315 + use Test::More;
316 + if ($^O eq 'openbsd') { exit(); }
317 + plan tests => 5;
318 +diff --git a/test/rmdir.t b/test/rmdir.t
319 +index 36f0378..b8a5bfc 100644
320 +--- a/test/rmdir.t
321 ++++ b/test/rmdir.t
322 +@@ -1,5 +1,6 @@
323 + #!/usr/bin/perl
324 +-use test::helper qw($_real $_point);
325 ++use lib './test/';
326 ++use helper qw($_real $_point);
327 + use Test::More;
328 + plan tests => 5;
329 + chdir($_real);
330 +diff --git a/test/s/mount.t b/test/s/mount.t
331 +index 97b47ea..0f545b7 100644
332 +--- a/test/s/mount.t
333 ++++ b/test/s/mount.t
334 +@@ -1,5 +1,6 @@
335 + #!/usr/bin/perl -w
336 +-use test::helper qw($_point $_loop $_opts $_real $_pidfile);
337 ++use lib './test/';
338 ++use helper qw($_point $_loop $_opts $_real $_pidfile);
339 + use strict;
340 + use Errno qw(:POSIX);
341 + use Test::More tests => 3;
342 +diff --git a/test/s/umount.t b/test/s/umount.t
343 +index c77301a..d964b28 100644
344 +--- a/test/s/umount.t
345 ++++ b/test/s/umount.t
346 +@@ -1,5 +1,6 @@
347 + #!/usr/bin/perl
348 +-use test::helper qw($_point $_real $_pidfile);
349 ++use lib './test/';
350 ++use helper qw($_point $_real $_pidfile);
351 + use strict;
352 + use Test::More tests => 1;
353 + use POSIX qw(WEXITSTATUS);
354 +diff --git a/test/statfs.t b/test/statfs.t
355 +index 52fa3ce..eaaa3f9 100644
356 +--- a/test/statfs.t
357 ++++ b/test/statfs.t
358 +@@ -1,5 +1,6 @@
359 + #!/usr/bin/perl
360 +-use test::helper qw($_real $_point);
361 ++use lib './test/';
362 ++use helper qw($_real $_point);
363 + use Test::More;
364 + use Config;
365 + use Filesys::Statvfs;
366 +diff --git a/test/symlink.t b/test/symlink.t
367 +index 25e1934..ad99dae 100644
368 +--- a/test/symlink.t
369 ++++ b/test/symlink.t
370 +@@ -1,5 +1,6 @@
371 + #!/usr/bin/perl
372 +-use test::helper qw($_point $_real);
373 ++use lib './test/';
374 ++use helper qw($_point $_real);
375 + use Test::More;
376 + plan tests => 6;
377 + chdir($_point);
378 +diff --git a/test/truncate.t b/test/truncate.t
379 +index 0e9ceab..1b9f693 100644
380 +--- a/test/truncate.t
381 ++++ b/test/truncate.t
382 +@@ -1,5 +1,6 @@
383 + #!/usr/bin/perl
384 +-use test::helper qw($_real $_point);
385 ++use lib './test/';
386 ++use helper qw($_real $_point);
387 + use Test::More;
388 + plan tests => 5;
389 + chdir($_point);
390 +diff --git a/test/unlink.t b/test/unlink.t
391 +index 85c255f..fc52531 100644
392 +--- a/test/unlink.t
393 ++++ b/test/unlink.t
394 +@@ -1,5 +1,6 @@
395 + #!/usr/bin/perl
396 +-use test::helper qw($_real $_point);
397 ++use lib './test/';
398 ++use helper qw($_real $_point);
399 + use Test::More;
400 + plan tests => 4;
401 + chdir($_point);
402 +diff --git a/test/utime.t b/test/utime.t
403 +index e6bc7b8..53f637c 100644
404 +--- a/test/utime.t
405 ++++ b/test/utime.t
406 +@@ -1,5 +1,6 @@
407 + #!/usr/bin/perl
408 +-use test::helper qw($_real $_point);
409 ++use lib './test/';
410 ++use helper qw($_real $_point);
411 + use Test::More;
412 + plan tests => 3;
413 + my (@stat);
414 +diff --git a/test/write.t b/test/write.t
415 +index 406a7e3..e914045 100644
416 +--- a/test/write.t
417 ++++ b/test/write.t
418 +@@ -1,5 +1,6 @@
419 + #!/usr/bin/perl
420 +-use test::helper qw($_real $_point);
421 ++use lib './test/';
422 ++use helper qw($_real $_point);
423 + use Test::More;
424 + plan tests => 15;
425 + my ($data);
426 +--
427 +2.28.0
428 +
429
430 diff --git a/dev-perl/Fuse/files/Fuse-0.16.1-tempdir-override.patch b/dev-perl/Fuse/files/Fuse-0.16.1-tempdir-override.patch
431 new file mode 100644
432 index 00000000000..e865d3b1a13
433 --- /dev/null
434 +++ b/dev-perl/Fuse/files/Fuse-0.16.1-tempdir-override.patch
435 @@ -0,0 +1,162 @@
436 +From bbb2a0de816f0cb506a0bdb34c9ca7ba94e53f9a Mon Sep 17 00:00:00 2001
437 +From: Kent Fredric <kentnl@g.o>
438 +Date: Fri, 18 Sep 2020 04:53:23 +1200
439 +Subject: Enable overriding tempdir used for base of fuse mounts
440 +
441 +- Add 5 new external variables to control locations for mountpoints,
442 + scratch directories, pid files and logs:
443 + - FUSE_TEMPDIR (weak support) : Change the base directory for various
444 + path defaults
445 + - FUSE_MOUNTPOINT : Change where the test filesystem is mounted
446 + - FUSE_TESTMOUNT : Change the path to the "fusetest-" directory used
447 + in various tests
448 + - FUSE_PIDFILE : Change the path to the PID file for the fuse daemon
449 + - FUSE_LOGFILE : Change the path to the log file for the fuse daemon
450 +- Convert stringy $_opts into a proper array to avoid path escaping
451 + headaches.
452 +- Use `opendir` to check existence/traversability of the mountpoint
453 + instead of a cruddy stringy system($string) call, avoiding need for
454 + stdout redirection and dangerous path handling, as well as removing
455 + the need for POSIX module hacks to check the exit status of "ls"
456 +- Use array based invocation of the $_loop script to avoid problems with
457 + path handling/escaping
458 +- Use list-mode system(@args) for `rm` call to avoid dangerous
459 + nightmares in path handling/escaping.
460 +- Use native perl file IO for reading pid files instead of consuming the
461 + output of a system("cat"), both avoiding a lot of silly shenanigans
462 + with IPC and path handling/escaping
463 +
464 +Signed-off-by: Kent Fredric <kentnl@g.o>
465 +---
466 + examples/loopback.pl | 7 ++++++-
467 + test/helper.pm | 40 ++++++++++++++++++++++++++++++----------
468 + test/s/mount.t | 24 +++++++++++++++++-------
469 + 3 files changed, 53 insertions(+), 18 deletions(-)
470 +
471 +diff --git a/examples/loopback.pl b/examples/loopback.pl
472 +index ef53e9d..c1ddfc2 100755
473 +--- a/examples/loopback.pl
474 ++++ b/examples/loopback.pl
475 +@@ -65,7 +65,12 @@ GetOptions(
476 + 'logfile=s' => \$logfile,
477 + ) || die('Error parsing options');
478 +
479 +-sub fixup { return "/tmp/fusetest-" . $ENV{LOGNAME} . shift }
480 ++sub fixup {
481 ++ my $tempdir = $ENV{FUSE_TESTMOUNT};
482 ++ $tempdir = "/tmp/fusetest-" . $ENV{LOGNAME}
483 ++ unless defined $tempdir and length $tempdir;
484 ++ return $tempdir . shift;
485 ++}
486 +
487 + sub x_getattr {
488 + my ($file) = fixup(shift);
489 +diff --git a/test/helper.pm b/test/helper.pm
490 +index f210105..f24f2a4 100644
491 +--- a/test/helper.pm
492 ++++ b/test/helper.pm
493 +@@ -4,15 +4,37 @@ package # avoid cpan indexing
494 + use strict;
495 + use Exporter;
496 + use Config;
497 +-use POSIX qw(WEXITSTATUS);
498 + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
499 + @ISA = "Exporter";
500 +-@EXPORT_OK = qw($_loop $_opts $_point $_pidfile $_real);
501 +-my $tmp = -d '/private' ? '/private/tmp' : '/tmp';
502 +-our($_loop, $_point, $_pidfile, $_real, $_opts) = ('examples/loopback.pl',"$tmp/fusemnt-".$ENV{LOGNAME},$ENV{'PWD'} . "/test/s/mounted.pid","$tmp/fusetest-".$ENV{LOGNAME}, '');
503 +-$_opts = ' --pidfile ' . $_pidfile;
504 +-$_opts .= ' --logfile /tmp/fusemnt.log';
505 +-$_opts .= $Config{useithreads} ? ' --use-threads' : '';
506 ++@EXPORT_OK = qw($_loop @_opts $_point $_pidfile $_real);
507 ++
508 ++our $_loop = 'examples/loopback.pl';
509 ++my $tmp = $ENV{FUSE_TEMPDIR};
510 ++$tmp = -d '/private' ? '/private/tmp' : '/tmp'
511 ++ unless defined $tmp and length $tmp;
512 ++
513 ++our $_point = $ENV{FUSE_MOUNTPOINT};
514 ++$_point = "$tmp/fusemnt-$ENV{LOGNAME}"
515 ++ unless defined $_point and length $_point;
516 ++
517 ++our $_pidfile = $ENV{FUSE_PIDFILE};
518 ++$_pidfile = "$ENV{PWD}/test/s/mounted.pid"
519 ++ unless defined $_pidfile and length $_pidfile;
520 ++
521 ++our $_real = $ENV{FUSE_TESTMOUNT};
522 ++$_real = "$tmp/fusetest-$ENV{LOGNAME}"
523 ++ unless defined $_real and length $_real;
524 ++
525 ++our $_logfile = $ENV{FUSE_LOGFILE};
526 ++$_logfile = "/tmp/fusemnt.log"
527 ++ unless defined $_logfile and length $_logfile;
528 ++
529 ++our @_opts = (
530 ++ '--pidfile' => $_pidfile,
531 ++ '--logfile' => $_logfile,
532 ++ ( $Config{useithreads} ? '--use-threads' : () ),
533 ++);
534 ++
535 + if($0 !~ qr|s/u?mount\.t$|) {
536 + my ($reject) = 1;
537 + if(open my $fh, '<', $_pidfile) {
538 +@@ -27,8 +49,6 @@ if($0 !~ qr|s/u?mount\.t$|) {
539 + }
540 + }
541 + }
542 +- system("ls $_point >/dev/null");
543 +- $reject = 1 if (POSIX::WEXITSTATUS($?));
544 +- die "not properly mounted\n" if $reject;
545 ++ opendir my $dfh, $_point or die "$_point not properly mounted: $!";
546 + }
547 + 1;
548 +diff --git a/test/s/mount.t b/test/s/mount.t
549 +index 0f545b7..3bf65c6 100644
550 +--- a/test/s/mount.t
551 ++++ b/test/s/mount.t
552 +@@ -1,6 +1,6 @@
553 + #!/usr/bin/perl -w
554 + use lib './test/';
555 +-use helper qw($_point $_loop $_opts $_real $_pidfile);
556 ++use helper qw($_point $_loop @_opts $_real $_pidfile);
557 + use strict;
558 + use Errno qw(:POSIX);
559 + use Test::More tests => 3;
560 +@@ -21,7 +21,7 @@ open REALSTDOUT, '>&STDOUT';
561 + open REALSTDERR, '>&STDERR';
562 + open STDOUT, '>', '/dev/null';
563 + open STDERR, '>&', \*STDOUT;
564 +-system("perl -Iblib/lib -Iblib/arch $_loop $_opts $_point");
565 ++system('perl','-Iblib/lib','-Iblib/arch',$_loop, @_opts, $_point);
566 + open STDOUT, '>&', \*REALSTDOUT;
567 + open STDERR, '>&', \*REALSTDERR;
568 +
569 +@@ -33,10 +33,20 @@ while ($count++ < 50 && !$success) {
570 + diag "Mounted in ", $count/10, " secs";
571 +
572 + ok($success,"mount succeeded");
573 +-system("rm -rf $_real");
574 +-unless($success) {
575 +- kill('INT',`cat $_pidfile`);
576 +- unlink($_pidfile);
577 +-} else {
578 ++
579 ++system("rm","-vrf",$_real);
580 ++if ($success) {
581 + mkdir($_real);
582 ++} else {
583 ++ my $pid;
584 ++ if ( open my $fh, '<', "$_pidfile" ) {
585 ++ local $/ = undef;
586 ++ $pid = scalar <$fh>;
587 ++ } else {
588 ++ warn "Can't read pidfile $_pidfile, $!"
589 ++ }
590 ++ if ( $pid ) {
591 ++ kill('INT',$pid);
592 ++ }
593 ++ unlink($_pidfile);
594 + }
595 +--
596 +2.28.0
597 +