Skip to contentSkip to conversation

syscalls/*: fix TERRNO

PATCH New Xiao Yang 2 participants 2 messages Nov 2, 2016

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 syscalls/*: fix TERRNO

1) we should use TTERRNO instead of TERRNO after calling TEST() function
2) remove unnecessary TERRNO

---
 testcases/kernel/syscalls/llistxattr/llistxattr01.c   | 2 +-
 testcases/kernel/syscalls/llistxattr/llistxattr03.c   | 2 +-
 testcases/kernel/syscalls/quotactl/quotactl01.c       | 4 ++--
 testcases/kernel/syscalls/quotactl/quotactl02.c       | 2 +-
 testcases/kernel/syscalls/request_key/request_key01.c | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
testcases/kernel/syscalls/llistxattr/llistxattr01.c +1 -1
index 03d7f85..2e95faf 100644
@@ -82,7 +82,7 @@ static void verify_llistxattr(void)
 
 	TEST(llistxattr("symlink", buf, size));
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TERRNO, "llistxattr() failed");
+		tst_res(TFAIL | TTERRNO, "llistxattr() failed");
 		return;
 	}
 
testcases/kernel/syscalls/llistxattr/llistxattr03.c +1 -1
index 9b65de9..e6e4c68 100644
@@ -59,7 +59,7 @@ static void verify_llistxattr(unsigned int n)
 
 	TEST(llistxattr(name, NULL, 0));
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TERRNO, "llistxattr() failed");
+		tst_res(TFAIL | TTERRNO, "llistxattr() failed");
 		return;
 	}
 
testcases/kernel/syscalls/quotactl/quotactl01.c +2 -2
index 89b5dc2..586272a 100644
@@ -189,12 +189,12 @@ static void verify_quota(unsigned int n)
 
 	TEST(quotactl(tc->cmd, tst_device->dev, *tc->id, tc->addr));
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TERRNO, "quotactl failed to %s", tc->des);
+		tst_res(TFAIL | TTERRNO, "quotactl failed to %s", tc->des);
 		return;
 	}
 
 	if (*tc->set_data != *tc->res_data) {
-		tst_res(TFAIL | TERRNO, "quotactl got unexpected info %lu, "
+		tst_res(TFAIL, "quotactl got unexpected info %lu, "
 			"expected %lu", *tc->res_data, *tc->set_data);
 		return;
 	}
testcases/kernel/syscalls/quotactl/quotactl02.c +1 -1
index 4f07fbd..97e7844 100644
@@ -160,7 +160,7 @@ static void verify_quota(unsigned int n)
 
 	TEST(quotactl(tc->cmd, tst_device->dev, test_id, tc->addr));
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TERRNO, "quotactl() failed to %s", tc->des);
+		tst_res(TFAIL | TTERRNO, "quotactl() failed to %s", tc->des);
 		return;
 	}
 
testcases/kernel/syscalls/request_key/request_key01.c +1 -1
index 3b7bc36..583ecdc 100644
@@ -43,7 +43,7 @@ static void verify_request_key(void)
 
 	TEST(request_key("keyring", "ltp", NULL, KEY_REQKEY_DEFL_DEFAULT));
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TERRNO, "request_key() failed");
+		tst_res(TFAIL | TTERRNO, "request_key() failed");
 		return;
 	}
 
Signature · 1 line
1.8.3.1