require_valgrind_
require_perl_
-: ${PERL=perl}
$PERL -e 'for (1..600) { sysseek (*STDOUT, 4096, 1)' \
-e '&& syswrite (*STDOUT, "a" x 1024) or die "$!"}' > j || fail=1
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ cp
+require_perl_
require_root_
# Some of the tests expect a umask that grants group and/or world read access.
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ du
+require_perl_
+
# ecryptfs for example uses some of the file name space
# for encrypting filenames, so we must check dynamically.
name_max=$(stat -f -c %l .)
cwd=$(pwd)
# Use perl instead:
-: ${PERL=perl}
$PERL \
-e 'my $d = '$dir'; foreach my $i (1..52)' \
-e ' { mkdir ($d, 0700) && chdir $d or die "$!" }' \
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ env
print_ver_ printf
+
require_perl_
# a shortcut to avoid long lines
# Ignoring the absolute paths, the script is:
# #!env -S perl -w -T
# print "hello\n";
-{ printf "#!$dir/env -S perl -w -T\n" ;
+{ printf "#!$dir/env -S $PERL -w -T\n" ;
printf 'print "hello\\n";\n' ; } > env5 || framework_failure_
chmod a+x env5 || framework_failure_
cat<<\EOF>exp5 || framework_failure_
# The backslash before the '$' is required to prevent env(1) from treating
# $ARGV as an (invalid syntax) envvar, and pass it as-is to Perl.
{ printf "#!$dir/env -S " ;
- printf 'perl -mFile::Basename=basename -e ' ;
+ printf "$PERL -mFile::Basename=basename -e " ;
printf '"print basename(\\$ARGV[0]);"\n' ; } > env6 || framework_failure_
chmod a+x env6 || framework_failure_
# Note: the perl script does not output a newline.
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ sort
+require_perl_
very_expensive_
-perl -e '
+$PERL -e '
my $num_lines = 500000;
my $length = 100;
# We need to generate a lot of data for sort to show a noticeable
# improvement in performance. Sorting it in PERL may take awhile.
-perl -e '
+$PERL -e '
open (FILE, "<in");
my @list = <FILE>;
print sort(@list);
cd x || framework_failure_
# Construct a hierarchy containing a relative file with a long name
-: ${PERL=perl}
$PERL \
-e 'my $d = "x" x 200; foreach my $i (1..52)' \
-e ' { mkdir ($d, 0700) && chdir $d or die "$!" }' \