diff options
author | Petr Vorel <pvorel@suse.cz> | 2020-02-27 15:18:29 +0100 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2020-02-28 15:06:45 +0100 |
commit | 5ccca9c20d16b3572146481c3d44fcdd2dd2278e (patch) | |
tree | 28a927d450a9e757ed298e972a5f45754d6cfdd9 /testcases/kernel/syscalls/keyctl/keyctl05.c | |
parent | 59d278d61ed90117607f389326e0816a14dbf53c (diff) | |
download | ltp-5ccca9c20d16b3572146481c3d44fcdd2dd2278e.tar.gz |
Avoid using tst_res(TBROK)
Mostly TFAIL is better, TBROK should be used only with tst_brk().
This is a preparation for next commit.
+ Adding cleanup() for io_pgetevents01.c
Acked-by: Li Wang <liwang@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
Diffstat (limited to 'testcases/kernel/syscalls/keyctl/keyctl05.c')
-rw-r--r-- | testcases/kernel/syscalls/keyctl/keyctl05.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testcases/kernel/syscalls/keyctl/keyctl05.c b/testcases/kernel/syscalls/keyctl/keyctl05.c index c592eb49e..55ce852b8 100644 --- a/testcases/kernel/syscalls/keyctl/keyctl05.c +++ b/testcases/kernel/syscalls/keyctl/keyctl05.c @@ -103,7 +103,7 @@ static void test_update_nonupdatable(const char *type, "and/or CONFIG_CRYPTO_SHA256)"); return; } - tst_res(TBROK | TTERRNO, "unexpected error adding '%s' key", + tst_res(TFAIL | TTERRNO, "unexpected error adding '%s' key", type); return; } @@ -115,7 +115,7 @@ static void test_update_nonupdatable(const char *type, */ TEST(keyctl(KEYCTL_SETPERM, keyid, KEY_POS_ALL)); if (TST_RET != 0) { - tst_res(TBROK | TTERRNO, + tst_res(TFAIL | TTERRNO, "failed to grant write permission to '%s' key", type); return; } @@ -123,12 +123,12 @@ static void test_update_nonupdatable(const char *type, tst_res(TINFO, "Try to update the '%s' key...", type); TEST(keyctl(KEYCTL_UPDATE, keyid, payload, plen)); if (TST_RET == 0) { - tst_res(TBROK, + tst_res(TFAIL, "updating '%s' key unexpectedly succeeded", type); return; } if (TST_ERR != EOPNOTSUPP) { - tst_res(TBROK | TTERRNO, + tst_res(TFAIL | TTERRNO, "updating '%s' key unexpectedly failed", type); return; } @@ -151,7 +151,7 @@ static void test_update_setperm_race(void) TEST(add_key("user", "desc", payload, sizeof(payload), KEY_SPEC_SESSION_KEYRING)); if (TST_RET < 0) { - tst_res(TBROK | TTERRNO, "failed to add 'user' key"); + tst_res(TFAIL | TTERRNO, "failed to add 'user' key"); return; } keyid = TST_RET; @@ -172,7 +172,7 @@ static void test_update_setperm_race(void) for (i = 0; i < 10000; i++) { TEST(keyctl(KEYCTL_UPDATE, keyid, payload, sizeof(payload))); if (TST_RET != 0 && TST_ERR != EACCES) { - tst_res(TBROK | TTERRNO, "failed to update 'user' key"); + tst_res(TFAIL | TTERRNO, "failed to update 'user' key"); return; } } |