mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL for 3.18 01/16] selftest/powerpc: Fix false failures for skipped tests
@ 2017-11-29 17:22 alexander.levin
  2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 03/16] USB: gadgetfs: Fix a potential memory leak in 'dev_config()' alexander.levin
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: alexander.levin @ 2017-11-29 17:22 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Sachin Sant, Michael Ellerman, alexander.levin

From: Sachin Sant <sachinp@linux.vnet.ibm.com>

[ Upstream commit a6d8a21596df041f36f4c2ccc260c459e3e851f1 ]

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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 tools/testing/selftests/powerpc/harness.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c
index 8ebc58a09311..d1ed7bab65a5 100644
--- a/tools/testing/selftests/powerpc/harness.c
+++ b/tools/testing/selftests/powerpc/harness.c
@@ -105,9 +105,11 @@ int test_harness(int (test_function)(void), char *name)
 
 	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;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-11-30 21:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 17:22 [PATCH AUTOSEL for 3.18 01/16] selftest/powerpc: Fix false failures for skipped tests alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 03/16] USB: gadgetfs: Fix a potential memory leak in 'dev_config()' alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 02/16] usb: gadget: configs: plug memory leak alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 04/16] libata: drop WARN from protocol error in ata_sff_qc_issue() alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 06/16] scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 05/16] workqueue: trigger WARN if queue_delayed_work() is called with NULL @wq alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 07/16] irqchip/crossbar: Fix incorrect type of register size alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 08/16] KVM: nVMX: reset nested_run_pending if the vCPU is going to be reset alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 12/16] ipv6: reorder icmpv6_init() and ip6_mr_init() alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 10/16] spi_ks8995: fix "BUG: key accdaa28 not in .data!" alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 09/16] arm: KVM: Survive unknown traps from guests alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 11/16] bnx2x: fix possible overrun of VFPF multicast addresses array alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 14/16] i2c: riic: fix restart condition alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 13/16] crypto: s5p-sss - Fix completing crypto request in IRQ handler alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 15/16] axonram: Fix gendisk handling alexander.levin
2017-11-29 17:22 ` [PATCH AUTOSEL for 3.18 16/16] EDAC, i5000, i5400: Fix use of MTR_DRAM_WIDTH macro alexander.levin
2017-11-30  1:34   ` Jérémy Lefaure
2017-11-30 21:33     ` alexander.levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®