All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/keyctl06: Print TFAIL if keyring_read() returns wrong size
@ 2017-10-17 12:53 Xiao Yang
  2017-10-17 16:12 ` Eric Biggers
  0 siblings, 1 reply; 7+ messages in thread
From: Xiao Yang @ 2017-10-17 12:53 UTC (permalink / raw)
  To: ltp

According to keyctl06's message, the mentioned bug is introduced
by the following patch which is merged into kernel since v3.13:
'b2a4df200d57 ("KEYS: Expand the capacity of a keyring")'

However, we still got the following output before v3.13:
 tst_test.c:958: INFO: Timeout per run is 0h 05m 00s
 keyctl06.c:60: BROK: KEYCTL_READ returned 8 but expected 4

In old kernels, the output exposed that keyring_read() could not
return the size of data read into buffer, because it just returned
the size of a keyring.  So i think this issue should be targeted
as TFAIL.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/kernel/syscalls/keyctl/keyctl06.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/keyctl/keyctl06.c b/testcases/kernel/syscalls/keyctl/keyctl06.c
index 8873431..bf30fb6 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl06.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl06.c
@@ -56,7 +56,7 @@ static void do_test(void)
 		tst_brk(TBROK, "KEYCTL_READ didn't return correct key ID");
 
 	if (TEST_RETURN != sizeof(key_serial_t)) {
-		tst_brk(TBROK, "KEYCTL_READ returned %ld but expected %zu",
+		tst_brk(TFAIL, "KEYCTL_READ returned %ld but expected %zu",
 			TEST_RETURN, sizeof(key_serial_t));
 	}
 
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-27  9:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 12:53 [LTP] [PATCH] syscalls/keyctl06: Print TFAIL if keyring_read() returns wrong size Xiao Yang
2017-10-17 16:12 ` Eric Biggers
2017-10-18  6:25   ` Xiao Yang
2017-10-18 17:19     ` Eric Biggers
2017-10-19  2:14       ` Xiao Yang
2017-10-19  6:09       ` [LTP] [PATCH v2] syscalls/keyctl06: Accept two kinds of return values for the time being Xiao Yang
2017-10-27  9:00       ` [LTP] [PATCH v3] syscalls/keyctl06: Fix return value Xiao Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.