linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sachin Sant <sachinp@linux.vnet.ibm.com>
To: linux-kselftest@vger.kernel.org
Cc: Sachin Sant <sachinp@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, shuahkh@osg.samsung.com
Subject: [PATCH RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests
Date: Sun, 26 Feb 2017 11:38:39 +0530	[thread overview]
Message-ID: <20170226060834.91303.20851.sendpatchset@Sachins-MacBook-Pro.local> (raw)

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;

             reply	other threads:[~2017-02-26  6:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-26  6:08 Sachin Sant [this message]
2017-03-08  7:25 ` [RESEND] selftest/powerpc/alignment: Fix false failures for skipped tests Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170226060834.91303.20851.sendpatchset@Sachins-MacBook-Pro.local \
    --to=sachinp@linux.vnet.ibm.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=shuahkh@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).