From f1522139007af3f1631496b2fb6936012060fe71 Mon Sep 17 00:00:00 2001 From: grev Date: Thu, 26 Mar 2009 14:27:17 +0000 Subject: [PATCH] b=18874 i=Alexey.Lyashkov test_48: remove useless code; cleanup properly --- lustre/tests/conf-sanity.sh | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index db1deae..415757f 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1659,8 +1659,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 @@ -1671,18 +1679,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 - setfacl -m $acl $MOUNT/widestripe - done - awk -F : '{ print "g:"$1":rwx" }' /etc/groups | 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