Add acl/{974,974_remote,2561,2561_zfs}.test to the
lustre/tests/Makefile.am nobase_noinst_DATA list, and fix acl/run
test to fail if the test scripts are missing.
acl/2561_zfs.test is a newly created test file for zfs. Since zfs
allocates a 512 byte dnode for empty file, its "ls -s" result is
different from ldiskfs'.
Lustre-change: http://review.whamcloud.com/9541
Lustre-commit:
1116d8a6233e307abab579e2ee0a63b450087413
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ifba5b76fa7302f8b129b979aeccf3844f4fe334d
Reviewed-on: http://review.whamcloud.com/10512
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
nobase_noinst_DATA = acl/cp.test acl/getfacl-noacl.test acl/inheritance.test
nobase_noinst_DATA += acl/misc.test acl/permissions.test acl/setfacl.test
nobase_noinst_DATA += acl/974.test acl/974_remote.test
-nobase_noinst_DATA += acl/2561.test acl/4924.test
+nobase_noinst_DATA += acl/2561.test acl/2561_zfs.test acl/4924.test
nobase_noinst_DATA += rmtacl/misc.test rmtacl/permissions.test
nobase_noinst_DATA += rmtacl/setfacl.test rmtacl/cp.test
nobase_noinst_DATA += rmtacl/getfacl-noacl.test rmtacl/inheritance.test
$ touch f1
$ ls -s f1
> 0 f1
+ $ cd ..
$ rm -rf 2561
--- /dev/null
+LU-2561 newly created file is same size as directory
+
+ $ mkdir -p 2561
+ $ cd 2561
+ $ getfacl --access . | setfacl -d -M- .
+ $ touch f1
+ $ ls -s f1
+ > 1 f1
+ $ cd ..
+ $ rm -rf 2561
+
my $line_number = 0;
my $prog_line;
my ($tests, $failed) = (0,0);
+my $testfile;
+if (!defined($ARGV[0])) {
+ print "No test file specified\n";
+ exit 1;
+}
+
+open($testfile, $ARGV[0]) or die "Can't open file $ARGV[0]: $!";
for (;;) {
- my $line = <>; $line_number++;
+ my $line = <$testfile>; $line_number++;
if (defined $line) {
# Substitute %VAR and %{VAR} with environment variables.
$line =~ s[%(?:(\w+)|\{(\w+)\})][$ENV{"$1$2"}]eg;
last;
}
}
+close($testfile);
my $status = sprintf("%d commands (%d passed, %d failed)",
$tests, $tests-$failed, $failed);
fi
echo "LU-2561 newly created file is same size as directory..."
- run_acl_subtest 2561 || error "LU-2561 test failed"
+ if [ $(facet_fstype $SINGLEMDS) != "zfs" ]; then
+ run_acl_subtest 2561 || error "LU-2561 test failed"
+ else
+ run_acl_subtest 2561_zfs || error "LU-2561 zfs test failed"
+ fi
run_acl_subtest 4924 || error "LU-4924 test failed"