[LTP] [PATCH] syscalls/removexattr02:skip the test if no xattr support

shuang.qiu@oracle.com shuang.qiu@oracle.com
Fri Jun 24 05:36:02 CEST 2016


From: Shuang Qiu <shuang.qiu@oracle.com>

Return TCONF if there is no xattr support in fs or mount without user_xattr option

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
 .../kernel/syscalls/removexattr/removexattr02.c    |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testcases/kernel/syscalls/removexattr/removexattr02.c b/testcases/kernel/syscalls/removexattr/removexattr02.c
index 58f310a..cea8733 100644
--- a/testcases/kernel/syscalls/removexattr/removexattr02.c
+++ b/testcases/kernel/syscalls/removexattr/removexattr02.c
@@ -85,6 +85,10 @@ static void verify_removexattr(struct test_case *tc)
 {
 
 	TEST(removexattr(tc->path, tc->name));
+	if (TEST_RETURN == -1 && TEST_ERRNO == ENOTSUP)
+		tst_brkm(TCONF, cleanup, "No xattr support in fs or "
+			 "mount without user_xattr option");
+
 	if (TEST_RETURN != -1) {
 		tst_resm(TFAIL, "removexattr() succeeded unexpectedly");
 		return;
-- 
1.7.9.5



More information about the ltp mailing list