Skip to content

Commit

Permalink
syscalls/*: fix TERRNO
Browse files Browse the repository at this point in the history
1) we should use TTERRNO instead of TERRNO after calling TEST() function
2) remove unnecessary TERRNO

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
  • Loading branch information
yangx-jy authored and metan-ucw committed Nov 2, 2016
1 parent 63da99c commit 00b4cde
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/llistxattr/llistxattr01.c
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/llistxattr/llistxattr03.c
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions testcases/kernel/syscalls/quotactl/quotactl01.c
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/quotactl/quotactl02.c
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion testcases/kernel/syscalls/request_key/request_key01.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 00b4cde

Please sign in to comment.