Skip to contentSkip to conversation

selftests: add missing test result status in memory-hotplug test

PATCH In review [email protected] 2 participants 2 messages Oct 17, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: add missing test result status in memory-hotplug test

From: Lei Yang <[email protected]>

it only prints FAIL status when test fails, but doesn't print PASS status when test pass,this patch is to add PASS status in the test log.

---
 tools/testing/selftests/memory-hotplug/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/memory-hotplug/Makefile +2 -2
index afb2624..61d9b04 100644
@@ -3,10 +3,10 @@ all:
 include ../lib.mk
 
 TEST_PROGS := mem-on-off-test.sh
-override RUN_TESTS := ./mem-on-off-test.sh -r 2 || echo "selftests: memory-hotplug [FAIL]"
+override RUN_TESTS := ./mem-on-off-test.sh -r 2 && echo "selftests: memory-hotplug [PASS]" || echo "selftests: memory-hotplug [FAIL]"
 override EMIT_TESTS := echo "$(RUN_TESTS)"
 
 run_full_test:
-	@/bin/bash ./mem-on-off-test.sh || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
 
 clean:
Signature · 1 line
1.9.1
#1 lore raw
Quoted 18 lines · On 10/17/2017 01:06 AM, [email protected] wrote:

From: Lei Yang <[email protected]>

it only prints FAIL status when test fails, but doesn't print PASS status when test pass,this patch is to add PASS status in the test log.

---
 tools/testing/selftests/memory-hotplug/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/memory-hotplug/Makefile +0 -0
index afb2624..61d9b04 100644
@@ -3,10 +3,10 @@ all:
 include ../lib.mk
 

tools/testing/selftests/memory-hotplug/Makefile all: · line 12

Quoted 10 lines
tools/testing/selftests/memory-hotplug/Makefile +2 -2
 TEST_PROGS := mem-on-off-test.sh
-override RUN_TESTS := ./mem-on-off-test.sh -r 2 || echo "selftests: memory-hotplug [FAIL]"
+override RUN_TESTS := ./mem-on-off-test.sh -r 2 && echo "selftests: memory-hotplug [PASS]" || echo "selftests: memory-hotplug [FAIL]"
 override EMIT_TESTS := echo "$(RUN_TESTS)"
 
 run_full_test:
-	@/bin/bash ./mem-on-off-test.sh || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
 
 clean:

Looks good to me. I will get this into 4.15-rc1

thanks,
-- Shuah