From 8b4ace9c50842c5b83401ea7b179dcab940387e1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 23 Sep 2020 10:22:15 +0100 Subject: gentoo resync : 23.09.2020 --- dev-perl/Fuse/Fuse-0.16.1-r2.ebuild | 62 +++++ dev-perl/Fuse/Manifest | 4 + dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch | 22 ++ .../Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch | 286 +++++++++++++++++++++ .../Fuse/files/Fuse-0.16.1-tempdir-override.patch | 162 ++++++++++++ 5 files changed, 536 insertions(+) create mode 100644 dev-perl/Fuse/Fuse-0.16.1-r2.ebuild create mode 100644 dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch create mode 100644 dev-perl/Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch create mode 100644 dev-perl/Fuse/files/Fuse-0.16.1-tempdir-override.patch (limited to 'dev-perl/Fuse') diff --git a/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild b/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild new file mode 100644 index 000000000000..c4b3462bcde1 --- /dev/null +++ b/dev-perl/Fuse/Fuse-0.16.1-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DIST_AUTHOR=DPATES +inherit perl-module + +DESCRIPTION="Fuse module for perl" + +SLOT="0" +LICENSE="LGPL-2.1" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-fs/fuse:0= + dev-perl/Filesys-Statvfs + dev-perl/Lchown + dev-perl/Unix-Mknod +" +DEPEND=" + sys-fs/fuse:0= +" +BDEPEND=" + virtual/perl-ExtUtils-MakeMaker + test? ( + ${RDEPEND} + ) +" +PATCHES=( + "${FILESDIR}/${PN}-0.16.1-no-dot-inc-tests.patch" + "${FILESDIR}/${PN}-0.16.1-tempdir-override.patch" + "${FILESDIR}/${PN}-0.16.1-ioctl-header.patch" +) +PERL_RM_FILES=( + test/pod.t +) + +src_compile() { + mymake=( + "OPTIMIZE=${CFLAGS}" + ) + perl-module_src_compile +} + +src_test() { + if has usersandbox ${FEATURES}; then + ewarn "'FEATURES=usersandbox' detected, skipping tests" + return + fi + export FUSE_TEMPDIR="${T}/fuse" + mkdir -p "${FUSE_TEMPDIR}" || die "Can't mkdir ${FUSE_TEMPDIR}" + export FUSE_MOUNTPOINT="${FUSE_TEMPDIR}/fuse-mount" + export FUSE_TESTMOUNT="${FUSE_TEMPDIR}/fuse-test" + export FUSE_PIDFILE="${FUSE_TEMPDIR}/mounted.pid" + export FUSE_LOGFILE="${FUSE_TEMPDIR}/fusemnt.log" + # Strict ordering required + export DIST_TEST="do verbose" + perl-module_src_test +} diff --git a/dev-perl/Fuse/Manifest b/dev-perl/Fuse/Manifest index 748347796c51..33ce7ee7808d 100644 --- a/dev-perl/Fuse/Manifest +++ b/dev-perl/Fuse/Manifest @@ -1,4 +1,8 @@ +AUX Fuse-0.16.1-ioctl-header.patch 538 BLAKE2B 5847af1a52ee65786769ffc0470eb9e6e9413b0d43e06fd748ad83326a7f838f04d42d721bd36cc633fd6e678cf98f6935b0430eaedf5dceb657880440d5775b SHA512 22aaa88f7da1d415b6413b09632ab9f2764bd54a4d313c7f7c00e78f247724162fb7420fb2361d74261b4d10d02ce6c22d8b89dff7444abfc9f6b0bc9ed7a827 +AUX Fuse-0.16.1-no-dot-inc-tests.patch 7183 BLAKE2B 929d96c80644042c24f7142008d48406202dc63c6080e987828ac60a99144e935462d1b202cb52a3e7e88c93b0dc87902d6b057654e3c37ef6dc4c73ff6b48f2 SHA512 6ff2e591e903461524d5b077b423383c1be84d9a2dfec8fffafa0bec2c476c3dc9c9564de0e928cb00182c8cf4b28a9e5223f07c740747559caf0e5b41901830 +AUX Fuse-0.16.1-tempdir-override.patch 5423 BLAKE2B 8dde768491065c2034bf4eaf7658d8bf34c680a2bd5d2ed0b0ee25b1e66970f650b0dd15dee131ec50a4fd43de8d084011b229c81416022941645a8a7e9f4398 SHA512 61ea03089f35ddb112e8d04326ea7973b9d9f2117f6c3597f6fc04e4516fd5289bf0d4a2ce5aff68627013d8f6b6c4ac60e4e0c0bf07832aca617fdf52bf71f1 DIST Fuse-0.16.1.tar.gz 43004 BLAKE2B fe3a1b39c7c6d4198c06dfc8deccff592b3c546823adcc7b5b910b5f50760db382a349084d82749cb9eff205d39e71221557b8a93d34f9d603ea5551acf2c397 SHA512 77de154f537fba0fb2d896d6eb35d7787c0863ec48ad1cbeb9040de0e73e593798cddfa279e88157e78c6716dcfd16f045558e15ff663b82e4fa11d87779c1d0 EBUILD Fuse-0.16.1-r1.ebuild 456 BLAKE2B 903598c489b94b42ea5b1645d7dfea0c6436a902c0da1bc81b6df51492659c0620aacc262f2bc38152ba6d9e5f582fabd0985a84536d56e6b7d6a4ab4bce9a65 SHA512 e59a9dc9bd4a3b46397a16194de2f6ac35e2ea50f5189a388e2854146d9b63992219819ef28a2fcac6d97e925662989c72935128f6308bdfc2b0bbcd72824661 +EBUILD Fuse-0.16.1-r2.ebuild 1250 BLAKE2B 18fa4cda078e02e8a9fb36070e62be50112927c23afbcd2688d8f9bcfc6764d52deb9de1e1f0a71e9494b182a8fcf833696152a2557c17e4248c66b1c1225c2a SHA512 157f1e404c00dcce025c3f7b5905d120413906f790d88d7f97dc9cfe156968f25e6a56cc955ef4822a3acecf0b861fad7a750353c09e22ca4b21b38e73b8f3fb EBUILD Fuse-0.16.1.ebuild 328 BLAKE2B 4db624f39ee79824d7791338c8571f15022189f05361a85ddfaaf52a23424adf8f5a3fc35a7f6f4f1bf0b860cfff3ac761287455c153925869369f9bab9df0d7 SHA512 1227737867cb5d2282b13ae9edc44d8404187c5b2f7fad816ec1824b6509883ca9272c48932a3cf92e2397cdad1d7d0619fcb2d0dc091d251cbb84f4f5c9f49d MISC metadata.xml 438 BLAKE2B 9c164dae47c2e4689de12848d5680b7ec63f5f22fd1835feb7824cf950818543a366b7d08d519ada377cd424f6dc763c1a3670386b53c8a4cbdb47473a032faa SHA512 1ea08ff1c4f5898f51f190ee42358b90972d9dd89fc9bb3eea782fa4d4573343b7663edc5e488dc990b58e215f98f1185e8543782b76e4192ad4482291c388ac 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 new file mode 100644 index 000000000000..4a9f6a09cc6c --- /dev/null +++ b/dev-perl/Fuse/files/Fuse-0.16.1-ioctl-header.patch @@ -0,0 +1,22 @@ +From ecddb700c4551157fb5604c59c38eefc9a99d21b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bastien=20Roucari=C3=A8s?= +Date: Sun, 1 Jul 2018 22:10:44 +0200 +Subject: Include ioctl header in order to close FTBFS in MIPS + +Workarround a glibc bug + +Forwarded: no, not-needed +--- + Fuse.xs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Fuse.xs b/Fuse.xs +index e9cce2e..4504a29 100755 +--- a/Fuse.xs ++++ b/Fuse.xs +@@ -1,3 +1,5 @@ ++#include ++ + #define PERL_NO_GET_CONTEXT + #include "EXTERN.h" + #include "perl.h" 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 new file mode 100644 index 000000000000..b0526aebcd40 --- /dev/null +++ b/dev-perl/Fuse/files/Fuse-0.16.1-no-dot-inc-tests.patch @@ -0,0 +1,286 @@ +From 64eb5b9e760a90a78d4a508bf916242849212b41 Mon Sep 17 00:00:00 2001 +From: Kent Fredric +Date: Fri, 18 Sep 2020 04:26:16 +1200 +Subject: Hack around path resolution problems caused by '.' removal + +This avoids problems on perl 5.26+ where cwd ('.') is no longer in the +@INC search path. +--- + test/chmod.t | 3 ++- + test/chown.t | 3 ++- + test/getattr.t | 3 ++- + test/getdir.t | 3 ++- + test/helper.pm | 2 +- + test/link.t | 3 ++- + test/mkdir.t | 3 ++- + test/mknod.t | 3 ++- + test/open.t | 3 ++- + test/read.t | 3 ++- + test/readlink.t | 3 ++- + test/rename.t | 3 ++- + test/rmdir.t | 3 ++- + test/s/mount.t | 3 ++- + test/s/umount.t | 3 ++- + test/statfs.t | 3 ++- + test/symlink.t | 3 ++- + test/truncate.t | 3 ++- + test/unlink.t | 3 ++- + test/utime.t | 3 ++- + test/write.t | 3 ++- + 21 files changed, 41 insertions(+), 21 deletions(-) + +diff --git a/test/chmod.t b/test/chmod.t +index 1ccb3ef..26ddbf9 100644 +--- a/test/chmod.t ++++ b/test/chmod.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 4; + chdir($_point); +diff --git a/test/chown.t b/test/chown.t +index 74adb14..194f2fb 100644 +--- a/test/chown.t ++++ b/test/chown.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + use English; + plan tests => 4; +diff --git a/test/getattr.t b/test/getattr.t +index 5d8c85d..ba575c1 100644 +--- a/test/getattr.t ++++ b/test/getattr.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + use Data::Dumper; + plan tests => 203; +diff --git a/test/getdir.t b/test/getdir.t +index e6d402a..789b667 100644 +--- a/test/getdir.t ++++ b/test/getdir.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + 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); + @names = sort(@names); +diff --git a/test/helper.pm b/test/helper.pm +index d44b486..f210105 100644 +--- a/test/helper.pm ++++ b/test/helper.pm +@@ -1,6 +1,6 @@ + #!/usr/bin/perl + package # avoid cpan indexing +- test::helper; ++ helper; + use strict; + use Exporter; + use Config; +diff --git a/test/link.t b/test/link.t +index f617c93..f301ee8 100644 +--- a/test/link.t ++++ b/test/link.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 8; + chdir($_point); +diff --git a/test/mkdir.t b/test/mkdir.t +index 90ec6f3..b622aa9 100644 +--- a/test/mkdir.t ++++ b/test/mkdir.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 3; + chdir($_point); +diff --git a/test/mknod.t b/test/mknod.t +index c35853a..7c867c6 100644 +--- a/test/mknod.t ++++ b/test/mknod.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 24; + use English; +diff --git a/test/open.t b/test/open.t +index b3afaf6..c3b79b6 100644 +--- a/test/open.t ++++ b/test/open.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 1; + chdir($_real); +diff --git a/test/read.t b/test/read.t +index b4297f3..4477ab7 100644 +--- a/test/read.t ++++ b/test/read.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 3; + chdir($_real); +diff --git a/test/readlink.t b/test/readlink.t +index 85b9ffc..14457da 100644 +--- a/test/readlink.t ++++ b/test/readlink.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_point $_real); ++use lib './test/'; ++use helper qw($_point $_real); + use Test::More; + plan tests => 4; + chdir($_real); +diff --git a/test/rename.t b/test/rename.t +index 454da8b..6f61e56 100644 +--- a/test/rename.t ++++ b/test/rename.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + if ($^O eq 'openbsd') { exit(); } + plan tests => 5; +diff --git a/test/rmdir.t b/test/rmdir.t +index 36f0378..b8a5bfc 100644 +--- a/test/rmdir.t ++++ b/test/rmdir.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 5; + chdir($_real); +diff --git a/test/s/mount.t b/test/s/mount.t +index 97b47ea..0f545b7 100644 +--- a/test/s/mount.t ++++ b/test/s/mount.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl -w +-use test::helper qw($_point $_loop $_opts $_real $_pidfile); ++use lib './test/'; ++use helper qw($_point $_loop $_opts $_real $_pidfile); + use strict; + use Errno qw(:POSIX); + use Test::More tests => 3; +diff --git a/test/s/umount.t b/test/s/umount.t +index c77301a..d964b28 100644 +--- a/test/s/umount.t ++++ b/test/s/umount.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_point $_real $_pidfile); ++use lib './test/'; ++use helper qw($_point $_real $_pidfile); + use strict; + use Test::More tests => 1; + use POSIX qw(WEXITSTATUS); +diff --git a/test/statfs.t b/test/statfs.t +index 52fa3ce..eaaa3f9 100644 +--- a/test/statfs.t ++++ b/test/statfs.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + use Config; + use Filesys::Statvfs; +diff --git a/test/symlink.t b/test/symlink.t +index 25e1934..ad99dae 100644 +--- a/test/symlink.t ++++ b/test/symlink.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_point $_real); ++use lib './test/'; ++use helper qw($_point $_real); + use Test::More; + plan tests => 6; + chdir($_point); +diff --git a/test/truncate.t b/test/truncate.t +index 0e9ceab..1b9f693 100644 +--- a/test/truncate.t ++++ b/test/truncate.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 5; + chdir($_point); +diff --git a/test/unlink.t b/test/unlink.t +index 85c255f..fc52531 100644 +--- a/test/unlink.t ++++ b/test/unlink.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 4; + chdir($_point); +diff --git a/test/utime.t b/test/utime.t +index e6bc7b8..53f637c 100644 +--- a/test/utime.t ++++ b/test/utime.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 3; + my (@stat); +diff --git a/test/write.t b/test/write.t +index 406a7e3..e914045 100644 +--- a/test/write.t ++++ b/test/write.t +@@ -1,5 +1,6 @@ + #!/usr/bin/perl +-use test::helper qw($_real $_point); ++use lib './test/'; ++use helper qw($_real $_point); + use Test::More; + plan tests => 15; + my ($data); +-- +2.28.0 + 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 new file mode 100644 index 000000000000..e865d3b1a135 --- /dev/null +++ b/dev-perl/Fuse/files/Fuse-0.16.1-tempdir-override.patch @@ -0,0 +1,162 @@ +From bbb2a0de816f0cb506a0bdb34c9ca7ba94e53f9a Mon Sep 17 00:00:00 2001 +From: Kent Fredric +Date: Fri, 18 Sep 2020 04:53:23 +1200 +Subject: Enable overriding tempdir used for base of fuse mounts + +- Add 5 new external variables to control locations for mountpoints, + scratch directories, pid files and logs: + - FUSE_TEMPDIR (weak support) : Change the base directory for various + path defaults + - FUSE_MOUNTPOINT : Change where the test filesystem is mounted + - FUSE_TESTMOUNT : Change the path to the "fusetest-" directory used + in various tests + - FUSE_PIDFILE : Change the path to the PID file for the fuse daemon + - FUSE_LOGFILE : Change the path to the log file for the fuse daemon +- Convert stringy $_opts into a proper array to avoid path escaping + headaches. +- Use `opendir` to check existence/traversability of the mountpoint + instead of a cruddy stringy system($string) call, avoiding need for + stdout redirection and dangerous path handling, as well as removing + the need for POSIX module hacks to check the exit status of "ls" +- Use array based invocation of the $_loop script to avoid problems with + path handling/escaping +- Use list-mode system(@args) for `rm` call to avoid dangerous + nightmares in path handling/escaping. +- Use native perl file IO for reading pid files instead of consuming the + output of a system("cat"), both avoiding a lot of silly shenanigans + with IPC and path handling/escaping + +Signed-off-by: Kent Fredric +--- + examples/loopback.pl | 7 ++++++- + test/helper.pm | 40 ++++++++++++++++++++++++++++++---------- + test/s/mount.t | 24 +++++++++++++++++------- + 3 files changed, 53 insertions(+), 18 deletions(-) + +diff --git a/examples/loopback.pl b/examples/loopback.pl +index ef53e9d..c1ddfc2 100755 +--- a/examples/loopback.pl ++++ b/examples/loopback.pl +@@ -65,7 +65,12 @@ GetOptions( + 'logfile=s' => \$logfile, + ) || die('Error parsing options'); + +-sub fixup { return "/tmp/fusetest-" . $ENV{LOGNAME} . shift } ++sub fixup { ++ my $tempdir = $ENV{FUSE_TESTMOUNT}; ++ $tempdir = "/tmp/fusetest-" . $ENV{LOGNAME} ++ unless defined $tempdir and length $tempdir; ++ return $tempdir . shift; ++} + + sub x_getattr { + my ($file) = fixup(shift); +diff --git a/test/helper.pm b/test/helper.pm +index f210105..f24f2a4 100644 +--- a/test/helper.pm ++++ b/test/helper.pm +@@ -4,15 +4,37 @@ package # avoid cpan indexing + use strict; + use Exporter; + use Config; +-use POSIX qw(WEXITSTATUS); + our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); + @ISA = "Exporter"; +-@EXPORT_OK = qw($_loop $_opts $_point $_pidfile $_real); +-my $tmp = -d '/private' ? '/private/tmp' : '/tmp'; +-our($_loop, $_point, $_pidfile, $_real, $_opts) = ('examples/loopback.pl',"$tmp/fusemnt-".$ENV{LOGNAME},$ENV{'PWD'} . "/test/s/mounted.pid","$tmp/fusetest-".$ENV{LOGNAME}, ''); +-$_opts = ' --pidfile ' . $_pidfile; +-$_opts .= ' --logfile /tmp/fusemnt.log'; +-$_opts .= $Config{useithreads} ? ' --use-threads' : ''; ++@EXPORT_OK = qw($_loop @_opts $_point $_pidfile $_real); ++ ++our $_loop = 'examples/loopback.pl'; ++my $tmp = $ENV{FUSE_TEMPDIR}; ++$tmp = -d '/private' ? '/private/tmp' : '/tmp' ++ unless defined $tmp and length $tmp; ++ ++our $_point = $ENV{FUSE_MOUNTPOINT}; ++$_point = "$tmp/fusemnt-$ENV{LOGNAME}" ++ unless defined $_point and length $_point; ++ ++our $_pidfile = $ENV{FUSE_PIDFILE}; ++$_pidfile = "$ENV{PWD}/test/s/mounted.pid" ++ unless defined $_pidfile and length $_pidfile; ++ ++our $_real = $ENV{FUSE_TESTMOUNT}; ++$_real = "$tmp/fusetest-$ENV{LOGNAME}" ++ unless defined $_real and length $_real; ++ ++our $_logfile = $ENV{FUSE_LOGFILE}; ++$_logfile = "/tmp/fusemnt.log" ++ unless defined $_logfile and length $_logfile; ++ ++our @_opts = ( ++ '--pidfile' => $_pidfile, ++ '--logfile' => $_logfile, ++ ( $Config{useithreads} ? '--use-threads' : () ), ++); ++ + if($0 !~ qr|s/u?mount\.t$|) { + my ($reject) = 1; + if(open my $fh, '<', $_pidfile) { +@@ -27,8 +49,6 @@ if($0 !~ qr|s/u?mount\.t$|) { + } + } + } +- system("ls $_point >/dev/null"); +- $reject = 1 if (POSIX::WEXITSTATUS($?)); +- die "not properly mounted\n" if $reject; ++ opendir my $dfh, $_point or die "$_point not properly mounted: $!"; + } + 1; +diff --git a/test/s/mount.t b/test/s/mount.t +index 0f545b7..3bf65c6 100644 +--- a/test/s/mount.t ++++ b/test/s/mount.t +@@ -1,6 +1,6 @@ + #!/usr/bin/perl -w + use lib './test/'; +-use helper qw($_point $_loop $_opts $_real $_pidfile); ++use helper qw($_point $_loop @_opts $_real $_pidfile); + use strict; + use Errno qw(:POSIX); + use Test::More tests => 3; +@@ -21,7 +21,7 @@ open REALSTDOUT, '>&STDOUT'; + open REALSTDERR, '>&STDERR'; + open STDOUT, '>', '/dev/null'; + open STDERR, '>&', \*STDOUT; +-system("perl -Iblib/lib -Iblib/arch $_loop $_opts $_point"); ++system('perl','-Iblib/lib','-Iblib/arch',$_loop, @_opts, $_point); + open STDOUT, '>&', \*REALSTDOUT; + open STDERR, '>&', \*REALSTDERR; + +@@ -33,10 +33,20 @@ while ($count++ < 50 && !$success) { + diag "Mounted in ", $count/10, " secs"; + + ok($success,"mount succeeded"); +-system("rm -rf $_real"); +-unless($success) { +- kill('INT',`cat $_pidfile`); +- unlink($_pidfile); +-} else { ++ ++system("rm","-vrf",$_real); ++if ($success) { + mkdir($_real); ++} else { ++ my $pid; ++ if ( open my $fh, '<', "$_pidfile" ) { ++ local $/ = undef; ++ $pid = scalar <$fh>; ++ } else { ++ warn "Can't read pidfile $_pidfile, $!" ++ } ++ if ( $pid ) { ++ kill('INT',$pid); ++ } ++ unlink($_pidfile); + } +-- +2.28.0 + -- cgit v1.2.3