From 00b4cdeed78d43e3f9dca769ef444f68cbb681c1 Mon Sep 17 00:00:00 2001 From: Xiao Yang Date: Wed, 2 Nov 2016 18:27:35 +0800 Subject: [PATCH] syscalls/*: fix TERRNO 1) we should use TTERRNO instead of TERRNO after calling TEST() function 2) remove unnecessary TERRNO Signed-off-by: Xiao Yang --- 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(-) diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr01.c b/testcases/kernel/syscalls/llistxattr/llistxattr01.c index 03d7f851a1d..2e95faf7d96 100644 --- a/testcases/kernel/syscalls/llistxattr/llistxattr01.c +++ b/testcases/kernel/syscalls/llistxattr/llistxattr01.c @@ -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; } diff --git a/testcases/kernel/syscalls/llistxattr/llistxattr03.c b/testcases/kernel/syscalls/llistxattr/llistxattr03.c index 9b65de9e722..e6e4c68eec8 100644 --- a/testcases/kernel/syscalls/llistxattr/llistxattr03.c +++ b/testcases/kernel/syscalls/llistxattr/llistxattr03.c @@ -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; } diff --git a/testcases/kernel/syscalls/quotactl/quotactl01.c b/testcases/kernel/syscalls/quotactl/quotactl01.c index 89b5dc26e9a..586272af1d0 100644 --- a/testcases/kernel/syscalls/quotactl/quotactl01.c +++ b/testcases/kernel/syscalls/quotactl/quotactl01.c @@ -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; } diff --git a/testcases/kernel/syscalls/quotactl/quotactl02.c b/testcases/kernel/syscalls/quotactl/quotactl02.c index 4f07fbd2a72..97e784480f2 100644 --- a/testcases/kernel/syscalls/quotactl/quotactl02.c +++ b/testcases/kernel/syscalls/quotactl/quotactl02.c @@ -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; } diff --git a/testcases/kernel/syscalls/request_key/request_key01.c b/testcases/kernel/syscalls/request_key/request_key01.c index 3b7bc36b7a5..583ecdc3d20 100644 --- a/testcases/kernel/syscalls/request_key/request_key01.c +++ b/testcases/kernel/syscalls/request_key/request_key01.c @@ -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; }