[LTP] [PATCH 2/2] [COMMITTED] syscalls/shmat: Print expected and actual address on failure

Cyril Hrubis chrubis@suse.cz
Tue Sep 12 17:18:27 CEST 2017


Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 testcases/kernel/syscalls/ipc/shmat/shmat01.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat01.c b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
index 4c6ce58d3..b46ba6831 100644
--- a/testcases/kernel/syscalls/ipc/shmat/shmat01.c
+++ b/testcases/kernel/syscalls/ipc/shmat/shmat01.c
@@ -129,7 +129,9 @@ static void verify_shmat(unsigned int n)
 	}
 
 	if (expected_addr(*tc->shmaddr, addr) != addr) {
-		tst_res(TFAIL, "shared memory address was not correct");
+		tst_res(TFAIL,
+			"shared memory address %p is not correct, expected %p",
+			addr, expected_addr(*tc->shmaddr, addr));
 		goto end;
 	}
 
-- 
2.13.0



More information about the ltp mailing list