From d0370b2c7e441f74667a3ecbe66e9f217364777b Mon Sep 17 00:00:00 2001
From: huanghua <huanghua>
Date: Thu, 17 Jul 2008 14:43:37 +0000
Subject: [PATCH] Branch b1_8_gate b=15993

a=17865
i=adilger,nikita

a=17883
i=adilger

- remove common EA (in downgraded mode) if it exists, and its test case.
---
 lustre/tests/conf-sanity.sh | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
index bf500c5bac..cd6732557e 100644
--- a/lustre/tests/conf-sanity.sh
+++ b/lustre/tests/conf-sanity.sh
@@ -1614,5 +1614,32 @@ test_42() { #bug 14693
 }
 run_test 42 "invalid config param should not prevent client from mounting"
 
+test_43() { #bug 15993
+        setup
+        check_mount || return 2
+        testfile=$DIR/$tfile
+        lma="this-should-be-removed-after-remount-and-accessed"
+        touch $testfile
+        echo "set/get trusted.lma"
+        setfattr -n trusted.lma -v $lma $testfile || error "create common EA"
+        ATTR=$(getfattr -n trusted.lma $testfile 2> /dev/null | grep trusted.lma)
+        [ "$ATTR" = "trusted.lma=\"$lma\"" ] || error "check common EA"
+        umount_client $MOUNT
+        stop_mds
+        sleep 5
+        start_mds
+        mount_client $MOUNT
+        check_mount || return 3
+#define OBD_FAIL_MDS_REMOVE_COMMON_EA    0x13e
+        do_facet mds "lctl set_param fail_loc=0x13e"
+        stat $testfile
+        do_facet mds "lctl set_param fail_loc=0"
+        getfattr -d -m trusted $testfile 2> /dev/null | \
+            grep "trusted.lma" && error "common EA not removed" || true
+        cleanup
+        return 0
+}
+run_test 43 "remove common EA if it exists"
+
 equals_msg `basename $0`: test complete
 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
-- 
GitLab