From 2b4de8ec10ba2085823ef53f7bc1925bc28de125 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 13 Feb 2009 17:55:43 -0800 Subject: acl: move nfs tests to their own folder Since these tests require nfs mounts to run move them into a seperate folder so they don't run by default. Signed-off-by: Brandon Philips --- test/nfs-dir.test | 50 -------------------------------------------------- test/nfs/nfs-dir.test | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ test/nfs/nfsacl.test | 42 ++++++++++++++++++++++++++++++++++++++++++ test/nfsacl.test | 42 ------------------------------------------ 4 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 test/nfs-dir.test create mode 100644 test/nfs/nfs-dir.test create mode 100644 test/nfs/nfsacl.test delete mode 100644 test/nfsacl.test (limited to 'test') diff --git a/test/nfs-dir.test b/test/nfs-dir.test deleted file mode 100644 index 9dfd19a..0000000 --- a/test/nfs-dir.test +++ /dev/null @@ -1,50 +0,0 @@ -This is a regression test for a bug in 2.4 kernels. The test must be run -as root on a machine that has a loopback mounted NFS export. The mount -must have root squashing enabled. The test must be run in the root of -the nfs mount, and requires the following environment variable: - -EXPORT_PATH => the path that is mounted at the working directory. - - Create a test directory and file. - - $ umask 022 - $ mkdir %{EXPORT_PATH}/test - $ echo blah > %{EXPORT_PATH}/test/blah - - Make sure the file can be accessed before. - - $ su bin - $ cat test/blah - > blah - - Set up a situation that triggers the bug. - - $ su - $ chmod go-rwx %{EXPORT_PATH}/test - $ setfacl -m u:bin:rx %{EXPORT_PATH}/test - $ ls -dl %{EXPORT_PATH}/test | awk '{print $1, $3, $4}' - > drwxr-x---+ root root - $ getfacl --omit-header %{EXPORT_PATH}/test 2> /dev/null - > user::rwx - > user:bin:r-x - > group::--- - > mask::r-x - > other::--- - > - - This should also succeed. With the bug, reading the file would - fail with "Stale NFS file handle" or "Input/output error". - - $ su bin - $ cat test/blah - > blah - $ sleep 3 - $ cat test/blah - > blah - $ cat test/blah - > blah - - Clean up. - - $ su - $ rm -rf %{EXPORT_PATH}/test diff --git a/test/nfs/nfs-dir.test b/test/nfs/nfs-dir.test new file mode 100644 index 0000000..33e5f5f --- /dev/null +++ b/test/nfs/nfs-dir.test @@ -0,0 +1,50 @@ +This is a regression test for a bug in 2.4 kernels. The test must be run +as root on a machine that has a loopback mounted NFS export. The mount +must have root squashing enabled. The test must be run in the root of +the nfs mount, and requires the following environment variable: + +EXPORT_PATH => the path that is mounted at the working directory. + + Create a test directory and file. + + $ umask 022 + $ mkdir %{EXPORT_PATH}/test + $ echo blah > %{EXPORT_PATH}/test/blah + + Make sure the file can be accessed before. + + $ su bin + $ cat test/blah + > blah + + Set up a situation that triggers the bug. + + $ su + $ chmod go-rwx %{EXPORT_PATH}/test + $ setfacl -m u:bin:rx %{EXPORT_PATH}/test + $ ls -dl %{EXPORT_PATH}/test | awk '{print $1, $3, $4}' + > drwxr-x---+ root root + $ getfacl --omit-header %{EXPORT_PATH}/test 2> /dev/null + > user::rwx + > user:bin:r-x + > group::--- + > mask::r-x + > other::--- + > + + This should also succeed. With the bug, reading the file would + fail with "Stale NFS file handle" or "Input/output error". + + $ su bin + $ cat test/blah + > blah + $ sleep 3 + $ cat test/blah + > blah + $ cat test/blah + > blah + + Clean up. + + $ su + $ rm -rf %{EXPORT_PATH}/test diff --git a/test/nfs/nfsacl.test b/test/nfs/nfsacl.test new file mode 100644 index 0000000..4f37322 --- /dev/null +++ b/test/nfs/nfsacl.test @@ -0,0 +1,42 @@ +This is a regression test for bugs in the nfsacl protocol extension. +The test should be run on an NFS export mount with ACL support. + + Create a test directory and file. + + $ umask 022 + $ mkdir -p test/sub + $ echo blah > test/sub/blah + + $ cp -rp test/sub test/sub2 + $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' + > drwxr-xr-x test/sub2 + > -rw-r--r-- test/sub2/blah + + $ rm -rf test/sub2 + + $ setfacl -m u:daemon:rwx test/sub + $ setfacl -dm u:daemon:rwx test/sub + $ getfattr -m- test/sub + > # file: test/sub + > system.posix_acl_access + > system.posix_acl_default + > + + $ cp -rp test/sub test/sub2 + $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' + > drwxrwxr-x+ test/sub2 + > -rw-r--r-- test/sub2/blah + + $ rm -rf test/sub2 + + $ setfacl -m u:daemon:rw test/sub/blah + $ cp -rp test/sub test/sub2 + $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' + > drwxrwxr-x+ test/sub2 + > -rw-rw-r--+ test/sub2/blah + + $ rm -rf test/sub2 + + Clean up. + + $ rm -rf test diff --git a/test/nfsacl.test b/test/nfsacl.test deleted file mode 100644 index ce80140..0000000 --- a/test/nfsacl.test +++ /dev/null @@ -1,42 +0,0 @@ -This is a regression test for bugs in the nfsacl protocol extension. -The test should be run on an NFS export mount with ACL support. - - Create a test directory and file. - - $ umask 022 - $ mkdir -p test/sub - $ echo blah > test/sub/blah - - $ cp -rp test/sub test/sub2 - $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' - > drwxr-xr-x test/sub2 - > -rw-r--r-- test/sub2/blah - - $ rm -rf test/sub2 - - $ setfacl -m u:daemon:rwx test/sub - $ setfacl -dm u:daemon:rwx test/sub - $ getfattr -m- test/sub - > # file: test/sub - > system.posix_acl_access - > system.posix_acl_default - > - - $ cp -rp test/sub test/sub2 - $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' - > drwxrwxr-x+ test/sub2 - > -rw-r--r-- test/sub2/blah - - $ rm -rf test/sub2 - - $ setfacl -m u:daemon:rw test/sub/blah - $ cp -rp test/sub test/sub2 - $ find test/sub2 | sort | xargs ls -dl | awk '{print $1,$8}' - > drwxrwxr-x+ test/sub2 - > -rw-rw-r--+ test/sub2/blah - - $ rm -rf test/sub2 - - Clean up. - - $ rm -rf test -- cgit v1.2.1