diff mbox

[2/2] selftests/powerpc: Fail load_unaligned_zeropad on miscompare

Message ID 1478148061-5724-2-git-send-email-mpe@ellerman.id.au (mailing list archive)
State Accepted
Headers show

Commit Message

Michael Ellerman Nov. 3, 2016, 4:41 a.m. UTC
If the result returned by load_unaligned_zeropad() doesn't match what we
expect we should fail the test!

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Michael Ellerman Nov. 14, 2016, 12:17 p.m. UTC | #1
On Thu, 2016-03-11 at 04:41:01 UTC, Michael Ellerman wrote:
> If the result returned by load_unaligned_zeropad() doesn't match what we
> expect we should fail the test!
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/997e200182347d2cc7e37bc43eaafe

cheers
diff mbox

Patch

diff --git a/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c b/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c
index cf7a4a114a90..cd7af4e1b65a 100644
--- a/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c
+++ b/tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c
@@ -118,8 +118,10 @@  static int do_one_test(char *p, int page_offset)
 
 	got = load_unaligned_zeropad(p);
 
-	if (should != got)
+	if (should != got) {
 		printf("offset %u load_unaligned_zeropad returned 0x%lx, should be 0x%lx\n", page_offset, got, should);
+		return 1;
+	}
 
 	return 0;
 }