diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2016-11-01 00:01:18 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-11-13 19:11:51 -0500 |
commit | 997e200182347d2cc7e37bc43eaafe249b4571b9 (patch) | |
tree | e9e586cf5b19c1ef0f00e597fd72c60af324f139 | |
parent | 06236f4efb926aa433e2cb3e36e8467f4a0e42c0 (diff) |
selftests/powerpc: Fail load_unaligned_zeropad on miscompare
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>
-rw-r--r-- | tools/testing/selftests/powerpc/primitives/load_unaligned_zeropad.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
118 | 118 | ||
119 | got = load_unaligned_zeropad(p); | 119 | got = load_unaligned_zeropad(p); |
120 | 120 | ||
121 | if (should != got) | 121 | if (should != got) { |
122 | printf("offset %u load_unaligned_zeropad returned 0x%lx, should be 0x%lx\n", page_offset, got, should); | 122 | printf("offset %u load_unaligned_zeropad returned 0x%lx, should be 0x%lx\n", page_offset, got, should); |
123 | return 1; | ||
124 | } | ||
123 | 125 | ||
124 | return 0; | 126 | return 0; |
125 | } | 127 | } |