* [PATCH RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests
@ 2017-02-26 6:08 Sachin Sant
2017-03-08 7:25 ` [RESEND] " Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Sant @ 2017-02-26 6:08 UTC (permalink / raw)
To: linux-kselftest; +Cc: Sachin Sant, linuxppc-dev, shuahkh
Tests under alignment subdirectory are skipped when executed on previous
generation hardware, but harness still marks them as failed.
test: test_copy_unaligned
tags: git_version:unknown
[SKIP] Test skipped on line 26
skip: test_copy_unaligned
selftests: copy_unaligned [FAIL]
The MAGIC_SKIP_RETURN_VALUE value assigned to rc variable is retained till
the program exit which causes the test to be marked as failed.
This patch resets the value before returning to the main() routine.
With this patch the test o/p is as follows:
test: test_copy_unaligned
tags: git_version:unknown
[SKIP] Test skipped on line 26
skip: test_copy_unaligned
selftests: copy_unaligned [PASS]
Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
---
Resend the patch as previous email did not reach the kselftest mailing list.
---
diff -Naurp a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c
--- a/tools/testing/selftests/powerpc/harness.c 2017-02-19 16:34:00.000000000 -0600
+++ b/tools/testing/selftests/powerpc/harness.c 2017-02-22 23:53:44.347242893 -0600
@@ -114,9 +114,11 @@ int test_harness(int (test_function)(voi
rc = run_test(test_function, name);
- if (rc == MAGIC_SKIP_RETURN_VALUE)
+ if (rc == MAGIC_SKIP_RETURN_VALUE) {
test_skip(name);
- else
+ /* so that skipped test is not marked as failed */
+ rc = 0;
+ } else
test_finish(name, rc);
return rc;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests
2017-02-26 6:08 [PATCH RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests Sachin Sant
@ 2017-03-08 7:25 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-03-08 7:25 UTC (permalink / raw)
To: Sachin Sant, linux-kselftest; +Cc: Sachin Sant, linuxppc-dev, shuahkh
On Sun, 2017-02-26 at 06:08:39 UTC, Sachin Sant wrote:
> Tests under alignment subdirectory are skipped when executed on previous
> generation hardware, but harness still marks them as failed.
>
> test: test_copy_unaligned
> tags: git_version:unknown
> [SKIP] Test skipped on line 26
> skip: test_copy_unaligned
> selftests: copy_unaligned [FAIL]
>
> The MAGIC_SKIP_RETURN_VALUE value assigned to rc variable is retained till
> the program exit which causes the test to be marked as failed.
>
> This patch resets the value before returning to the main() routine.
> With this patch the test o/p is as follows:
>
> test: test_copy_unaligned
> tags: git_version:unknown
> [SKIP] Test skipped on line 26
> skip: test_copy_unaligned
> selftests: copy_unaligned [PASS]
>
> Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/a6d8a21596df041f36f4c2ccc260c4
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-08 7:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-26 6:08 [PATCH RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests Sachin Sant
2017-03-08 7:25 ` [RESEND] " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).