From 4b130e652557acac104a2d7ddadc52ec5d9b448b Mon Sep 17 00:00:00 2001 From: grev Date: Tue, 24 Mar 2009 17:17:01 +0000 Subject: [PATCH] b=18874 i=Alexey.Lyashkov test_48: cleanup properly --- lustre/tests/conf-sanity.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 84eb3bc..4dd2123 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1573,8 +1573,16 @@ test_47() { #17674 } run_test 47 "server restart does not make client loss lru_resize settings" -# reformat after this test must need - if test will failed -# we will have unkillable file at FS +cleanup_48() { + trap 0 + + # reformat after this test is needed - if test will failed + # we will have unkillable file at FS + reformat + setup_noconfig + cleanup || error "can't cleanup" +} + test_48() { # bug 17636 reformat setup_noconfig @@ -1585,14 +1593,17 @@ test_48() { # bug 17636 echo "ok" > $MOUNT/widestripe $LFS getstripe $MOUNT/widestripe || return 11 + + trap cleanup_48 EXIT ERR + # fill acl buffer for avoid expand lsm to them - awk -F : '{ print "u:"$1":rwx" }' /etc/passwd | while read acl; do + getent passwd | awk -F : '{ print "u:"$1":rwx" }' | while read acl; do setfacl -m $acl $MOUNT/widestripe done stat $MOUNT/widestripe || return 12 - cleanup || error "can't cleanup" + cleanup_48 return 0 } run_test 48 "too many acls on file" -- 1.8.3.1