xfs
[Top] [All Lists]

[patch 4/4] [PATCH] attr: Tests for path recursion with -L -P -R

To: xfs@xxxxxxxxxxx
Subject: [patch 4/4] [PATCH] attr: Tests for path recursion with -L -P -R
From: brandon@xxxxxxxx
Date: Wed, 07 Jan 2009 18:19:51 -0800
Cc: Brandon Philips <bphilips@xxxxxxx>
References: <20090108021947.404730068@xxxxxxxx>
User-agent: quilt/0.47-14.12
Add tests against patches from Andreas to fix up walk_tree.c.

Signed-off-by: Brandon Philips <bphilips@xxxxxxx>

---
 test/attr.test |  116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

Index: attr-2.4.43/test/attr.test
===================================================================
--- attr-2.4.43.orig/test/attr.test
+++ attr-2.4.43/test/attr.test
@@ -253,3 +253,119 @@ Tests for attribute names that contains
 
        $ cd ..
        $ rm -rf d
+
+Tests for proper path recursion reported by Tony Ernst <tee@xxxxxxx> bnc#457660
+
+       $ mkdir -p 1/2/3
+       $ setfattr -n "user.9" 1
+       $ setfattr -n "user.a" 1
+       $ setfattr -n "user.9" 1/2
+       $ setfattr -n "user.a" 1/2
+       $ setfattr -n "user.9" 1/2/3
+       $ setfattr -n "user.a" 1/2/3
+
+       $ getfattr -h -L -R -m '.' -e hex 1
+       > # file: 1
+       > user.9
+       > user.a
+       >
+       > # file: 1/2
+       > user.9
+       > user.a
+       >
+       > # file: 1/2/3
+       > user.9
+       > user.a
+       >
+
+       $ getfattr -h -P -R -m '.' -e hex 1/2
+       > # file: 1/2
+       > user.9
+       > user.a
+       >
+       > # file: 1/2/3
+       > user.9
+       > user.a
+       >
+
+       $ rm -R 1
+
+Test for proper recursion of directory structures with -L -P -R
+
+       $ mkdir -p 1/sub
+       $ mkdir 1/link
+       $ touch 1/link/link-file
+       $ touch 1/sub/sub-file
+       $ ln -s `pwd`/1/link 1/sub/link
+       $ setfattr -n "user.a" 1
+       $ setfattr -n "user.a" 1/link/link-file
+       $ setfattr -n "user.a" 1/link
+       $ setfattr -n "user.a" 1/sub/sub-file
+       $ setfattr -n "user.a" 1/sub
+       $ getfattr -P -R 1
+       > # file: 1
+       > user.a
+       >
+       > # file: 1/sub
+       > user.a
+       >
+       > # file: 1/sub/link
+       > user.a
+       >
+       > # file: 1/sub/sub-file
+       > user.a
+       >
+       > # file: 1/link
+       > user.a
+       >
+       > # file: 1/link/link-file
+       > user.a
+       >
+       $ getfattr -R -P 1/sub
+       > # file: 1/sub
+       > user.a
+       >
+       > # file: 1/sub/link
+       > user.a
+       >
+       > # file: 1/sub/sub-file
+       > user.a
+       >
+       $ getfattr -L -R 1
+       > # file: 1
+       > user.a
+       >
+       > # file: 1/sub
+       > user.a
+       >
+       > # file: 1/sub/link
+       > user.a
+       >
+       > # file: 1/sub/link/link-file
+       > user.a
+       >
+       > # file: 1/sub/sub-file
+       > user.a
+       >
+       > # file: 1/link
+       > user.a
+       >
+       > # file: 1/link/link-file
+       > user.a
+       >
+       $ getfattr -R 1/sub/link
+       > # file: 1/sub/link
+       > user.a
+       >
+       > # file: 1/sub/link/link-file
+       > user.a
+       >
+       $ getfattr -L -R 1/sub/link
+       > # file: 1/sub/link
+       > user.a
+       >
+       > # file: 1/sub/link/link-file
+       > user.a
+       >
+
+       $ rm -R 1

<Prev in Thread] Current Thread [Next in Thread>