syscalls/*: fix TERRNO
PATCH 1/1 syscalls/*: fix TERRNO
1) we should use TTERRNO instead of TERRNO after calling TEST() function
2) remove unnecessary TERRNO
Signed-off-by Xiao Yang <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 1/1 syscalls/*: fix TERRNO
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]