All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18 ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)
  To: shuah, pintu.ping, daniel.diaz; +Cc: linux-kselftest, linux-kernel

Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
---
 tools/testing/selftests/android/Makefile | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
index f6304d2be90c..72c25a3cb658 100644
--- a/tools/testing/selftests/android/Makefile
+++ b/tools/testing/selftests/android/Makefile
@@ -18,10 +18,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -33,10 +29,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

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

* [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18 ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/android/Makefile | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
index f6304d2be90c..72c25a3cb658 100644
--- a/tools/testing/selftests/android/Makefile
+++ b/tools/testing/selftests/android/Makefile
@@ -18,10 +18,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -33,10 +29,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18 ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/android/Makefile | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
index f6304d2be90c..72c25a3cb658 100644
--- a/tools/testing/selftests/android/Makefile
+++ b/tools/testing/selftests/android/Makefile
@@ -18,10 +18,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -33,10 +29,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18 ` shuah
  (?)
@ 2018-05-02 21:18   ` shuah
  -1 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)
  To: shuah, dvhart; +Cc: tglx, mingo, peterz, linux-kernel, linux-kselftest

Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
---
 tools/testing/selftests/futex/Makefile | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 8497a376ef9d..12631f0076a1 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -17,14 +17,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@export KSFT_TAP_LEVEL=`echo 1`;
-	@echo "TAP version 13";
-	@echo "selftests: futex";
-	@echo "========================================";
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -36,10 +28,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/futex/Makefile | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 8497a376ef9d..12631f0076a1 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -17,14 +17,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@export KSFT_TAP_LEVEL=`echo 1`;
-	@echo "TAP version 13";
-	@echo "selftests: futex";
-	@echo "========================================";
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -36,10 +28,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/futex/Makefile | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index 8497a376ef9d..12631f0076a1 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -17,14 +17,6 @@ all:
 		fi \
 	done
 
-override define RUN_TESTS
-	@export KSFT_TAP_LEVEL=`echo 1`;
-	@echo "TAP version 13";
-	@echo "selftests: futex";
-	@echo "========================================";
-	@cd $(OUTPUT); ./run.sh
-endef
-
 override define INSTALL_RULE
 	mkdir -p $(INSTALL_PATH)
 	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
@@ -36,10 +28,6 @@ override define INSTALL_RULE
 	done;
 endef
 
-override define EMIT_TESTS
-	echo "./run.sh"
-endef
-
 override define CLEAN
 	@for DIR in $(SUBDIRS); do		\
 		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18 ` shuah
  (?)
@ 2018-05-02 21:18   ` shuah
  -1 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)
  To: shuah, lei.yang, po-hsu.lin; +Cc: linux-kselftest, linux-kernel

Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work after making the change the test to run
with ratio=2 as the default mode to be able to invoke the test without
the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.

The run_full_tests target now calls the test with "-r 10".

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
---
 tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
 tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
index 686da510f989..e0a625e34f40 100644
--- a/tools/testing/selftests/memory-hotplug/Makefile
+++ b/tools/testing/selftests/memory-hotplug/Makefile
@@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
-
-override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
 
 run_full_test:
-	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
 
 clean:
diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
index ae2c790d0880..ff4991704d07 100755
--- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
+++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
@@ -133,7 +133,8 @@ offline_memory_expect_fail()
 
 error=-12
 priority=0
-ratio=10
+# Run with default of ratio=2 for Kselftest run
+ratio=2
 retval=0
 
 while getopts e:hp:r: opt; do
-- 
2.14.1

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work after making the change the test to run
with ratio=2 as the default mode to be able to invoke the test without
the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.

The run_full_tests target now calls the test with "-r 10".

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
 tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
index 686da510f989..e0a625e34f40 100644
--- a/tools/testing/selftests/memory-hotplug/Makefile
+++ b/tools/testing/selftests/memory-hotplug/Makefile
@@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
-
-override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
 
 run_full_test:
-	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
 
 clean:
diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
index ae2c790d0880..ff4991704d07 100755
--- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
+++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
@@ -133,7 +133,8 @@ offline_memory_expect_fail()
 
 error=-12
 priority=0
-ratio=10
+# Run with default of ratio=2 for Kselftest run
+ratio=2
 retval=0
 
 while getopts e:hp:r: opt; do
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work after making the change the test to run
with ratio=2 as the default mode to be able to invoke the test without
the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.

The run_full_tests target now calls the test with "-r 10".

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
 tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
index 686da510f989..e0a625e34f40 100644
--- a/tools/testing/selftests/memory-hotplug/Makefile
+++ b/tools/testing/selftests/memory-hotplug/Makefile
@@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
-
-override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
 
 run_full_test:
-	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
 
 clean:
diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
index ae2c790d0880..ff4991704d07 100755
--- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
+++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
@@ -133,7 +133,8 @@ offline_memory_expect_fail()
 
 error=-12
 priority=0
-ratio=10
+# Run with default of ratio=2 for Kselftest run
+ratio=2
 retval=0
 
 while getopts e:hp:r: opt; do
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18 ` shuah
  (?)
@ 2018-05-02 21:18   ` shuah
  -1 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)
  To: shuah; +Cc: linux-kernel, linux-kselftest

Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Add new run_tests.sh to do the dependency checks the custom
RUN_TESTS did. Common defines work with the run_tests.sh set as the
TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.

Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
them via RUN_TESTS and include it in EMIT_TESTS. With this change the
new run_tests.sh runs the test after checking dependencies.

This change also adds Skip handling to return kselftest skip code when
test is skipped to clearly identify when the test is skipped instead of
reporting it as failed.

Output with this change:

TAP version 13
selftests: mount: run_tests.sh
========================================
WARN: No /proc/self/uid_map exist, test skipped.
not ok 1..1 selftests: mount: run_tests.sh [SKIP]

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
---
 tools/testing/selftests/mount/Makefile     | 12 ++----------
 tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
 2 files changed, 14 insertions(+), 10 deletions(-)
 create mode 100755 tools/testing/selftests/mount/run_tests.sh

diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
index e094f71c6dbc..026890744215 100644
--- a/tools/testing/selftests/mount/Makefile
+++ b/tools/testing/selftests/mount/Makefile
@@ -3,15 +3,7 @@
 CFLAGS = -Wall \
          -O2
 
-TEST_GEN_PROGS := unprivileged-remount-test
+TEST_PROGS := run_tests.sh
+TEST_GEN_FILES := unprivileged-remount-test
 
 include ../lib.mk
-
-override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
-		      then	\
-				./unprivileged-remount-test ; \
-		      else	\
-				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
-		      fi
-override EMIT_TESTS := echo "$(RUN_TESTS)"
-
diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
new file mode 100755
index 000000000000..4ab8f507dcba
--- /dev/null
+++ b/tools/testing/selftests/mount/run_tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+# Run mount selftests
+if [ -f /proc/self/uid_map ] ; then
+	./unprivileged-remount-test ;
+else
+	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
+	exit $ksft_skip
+fi
-- 
2.14.1

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

* [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Add new run_tests.sh to do the dependency checks the custom
RUN_TESTS did. Common defines work with the run_tests.sh set as the
TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.

Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
them via RUN_TESTS and include it in EMIT_TESTS. With this change the
new run_tests.sh runs the test after checking dependencies.

This change also adds Skip handling to return kselftest skip code when
test is skipped to clearly identify when the test is skipped instead of
reporting it as failed.

Output with this change:

TAP version 13
selftests: mount: run_tests.sh
========================================
WARN: No /proc/self/uid_map exist, test skipped.
not ok 1..1 selftests: mount: run_tests.sh [SKIP]

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/mount/Makefile     | 12 ++----------
 tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
 2 files changed, 14 insertions(+), 10 deletions(-)
 create mode 100755 tools/testing/selftests/mount/run_tests.sh

diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
index e094f71c6dbc..026890744215 100644
--- a/tools/testing/selftests/mount/Makefile
+++ b/tools/testing/selftests/mount/Makefile
@@ -3,15 +3,7 @@
 CFLAGS = -Wall \
          -O2
 
-TEST_GEN_PROGS := unprivileged-remount-test
+TEST_PROGS := run_tests.sh
+TEST_GEN_FILES := unprivileged-remount-test
 
 include ../lib.mk
-
-override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
-		      then	\
-				./unprivileged-remount-test ; \
-		      else	\
-				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
-		      fi
-override EMIT_TESTS := echo "$(RUN_TESTS)"
-
diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
new file mode 100755
index 000000000000..4ab8f507dcba
--- /dev/null
+++ b/tools/testing/selftests/mount/run_tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+# Run mount selftests
+if [ -f /proc/self/uid_map ] ; then
+	./unprivileged-remount-test ;
+else
+	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
+	exit $ksft_skip
+fi
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Add new run_tests.sh to do the dependency checks the custom
RUN_TESTS did. Common defines work with the run_tests.sh set as the
TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.

Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
them via RUN_TESTS and include it in EMIT_TESTS. With this change the
new run_tests.sh runs the test after checking dependencies.

This change also adds Skip handling to return kselftest skip code when
test is skipped to clearly identify when the test is skipped instead of
reporting it as failed.

Output with this change:

TAP version 13
selftests: mount: run_tests.sh
========================================
WARN: No /proc/self/uid_map exist, test skipped.
not ok 1..1 selftests: mount: run_tests.sh [SKIP]

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/mount/Makefile     | 12 ++----------
 tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
 2 files changed, 14 insertions(+), 10 deletions(-)
 create mode 100755 tools/testing/selftests/mount/run_tests.sh

diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
index e094f71c6dbc..026890744215 100644
--- a/tools/testing/selftests/mount/Makefile
+++ b/tools/testing/selftests/mount/Makefile
@@ -3,15 +3,7 @@
 CFLAGS = -Wall \
          -O2
 
-TEST_GEN_PROGS := unprivileged-remount-test
+TEST_PROGS := run_tests.sh
+TEST_GEN_FILES := unprivileged-remount-test
 
 include ../lib.mk
-
-override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
-		      then	\
-				./unprivileged-remount-test ; \
-		      else	\
-				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
-		      fi
-override EMIT_TESTS := echo "$(RUN_TESTS)"
-
diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
new file mode 100755
index 000000000000..4ab8f507dcba
--- /dev/null
+++ b/tools/testing/selftests/mount/run_tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+# Run mount selftests
+if [ -f /proc/self/uid_map ] ; then
+	./unprivileged-remount-test ;
+else
+	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
+	exit $ksft_skip
+fi
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18 ` shuah
  (?)
@ 2018-05-02 21:18   ` shuah
  -1 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)
  To: shuah; +Cc: linux-kselftest, linux-kernel

Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
The overrides are in place to call mq_open_tests with queue name argument.
The change to delete overrides is coupled with a change to mq_open_tests
to use default queue name when it is called without one.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
---
 tools/testing/selftests/mqueue/Makefile        | 12 +----------
 tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
 2 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 743d3f9e5918..8a58055fc1f5 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,17 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O2
 LDLIBS = -lrt -lpthread -lpopt
+
 TEST_GEN_PROGS := mq_open_tests mq_perf_tests
 
 include ../lib.mk
-
-override define RUN_TESTS
-	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
-	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
-endef
-
-override define EMIT_TESTS
-	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
-	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
-endef
-
diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
index e0a74bd207a5..677140aa25fd 100644
--- a/tools/testing/selftests/mqueue/mq_open_tests.c
+++ b/tools/testing/selftests/mqueue/mq_open_tests.c
@@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
 int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
 FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
 char *queue_path;
+char *default_queue_path = "/test1";
 mqd_t queue = -1;
 
 static inline void __set(FILE *stream, int value, char *err_msg);
@@ -238,27 +239,27 @@ int main(int argc, char *argv[])
 	struct mq_attr attr, result;
 
 	if (argc != 2) {
-		fprintf(stderr, "Must pass a valid queue name\n\n");
-		fprintf(stderr, usage, argv[0]);
-		exit(1);
-	}
+		printf("Using Default queue path - %s\n", default_queue_path);
+		queue_path = default_queue_path;
+	} else {
 
 	/*
 	 * Although we can create a msg queue with a non-absolute path name,
 	 * unlink will fail.  So, if the name doesn't start with a /, add one
 	 * when we save it.
 	 */
-	if (*argv[1] == '/')
-		queue_path = strdup(argv[1]);
-	else {
-		queue_path = malloc(strlen(argv[1]) + 2);
-		if (!queue_path) {
-			perror("malloc()");
-			exit(1);
+		if (*argv[1] == '/')
+			queue_path = strdup(argv[1]);
+		else {
+			queue_path = malloc(strlen(argv[1]) + 2);
+			if (!queue_path) {
+				perror("malloc()");
+				exit(1);
+			}
+			queue_path[0] = '/';
+			queue_path[1] = 0;
+			strcat(queue_path, argv[1]);
 		}
-		queue_path[0] = '/';
-		queue_path[1] = 0;
-		strcat(queue_path, argv[1]);
 	}
 
 	if (getuid() != 0) {
-- 
2.14.1

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

* [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
The overrides are in place to call mq_open_tests with queue name argument.
The change to delete overrides is coupled with a change to mq_open_tests
to use default queue name when it is called without one.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/mqueue/Makefile        | 12 +----------
 tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
 2 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 743d3f9e5918..8a58055fc1f5 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,17 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O2
 LDLIBS = -lrt -lpthread -lpopt
+
 TEST_GEN_PROGS := mq_open_tests mq_perf_tests
 
 include ../lib.mk
-
-override define RUN_TESTS
-	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
-	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
-endef
-
-override define EMIT_TESTS
-	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
-	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
-endef
-
diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
index e0a74bd207a5..677140aa25fd 100644
--- a/tools/testing/selftests/mqueue/mq_open_tests.c
+++ b/tools/testing/selftests/mqueue/mq_open_tests.c
@@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
 int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
 FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
 char *queue_path;
+char *default_queue_path = "/test1";
 mqd_t queue = -1;
 
 static inline void __set(FILE *stream, int value, char *err_msg);
@@ -238,27 +239,27 @@ int main(int argc, char *argv[])
 	struct mq_attr attr, result;
 
 	if (argc != 2) {
-		fprintf(stderr, "Must pass a valid queue name\n\n");
-		fprintf(stderr, usage, argv[0]);
-		exit(1);
-	}
+		printf("Using Default queue path - %s\n", default_queue_path);
+		queue_path = default_queue_path;
+	} else {
 
 	/*
 	 * Although we can create a msg queue with a non-absolute path name,
 	 * unlink will fail.  So, if the name doesn't start with a /, add one
 	 * when we save it.
 	 */
-	if (*argv[1] == '/')
-		queue_path = strdup(argv[1]);
-	else {
-		queue_path = malloc(strlen(argv[1]) + 2);
-		if (!queue_path) {
-			perror("malloc()");
-			exit(1);
+		if (*argv[1] == '/')
+			queue_path = strdup(argv[1]);
+		else {
+			queue_path = malloc(strlen(argv[1]) + 2);
+			if (!queue_path) {
+				perror("malloc()");
+				exit(1);
+			}
+			queue_path[0] = '/';
+			queue_path[1] = 0;
+			strcat(queue_path, argv[1]);
 		}
-		queue_path[0] = '/';
-		queue_path[1] = 0;
-		strcat(queue_path, argv[1]);
 	}
 
 	if (getuid() != 0) {
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-02 21:18   ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan (Samsung OSG) @ 2018-05-02 21:18 UTC (permalink / raw)


Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
The overrides are in place to call mq_open_tests with queue name argument.
The change to delete overrides is coupled with a change to mq_open_tests
to use default queue name when it is called without one.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
---
 tools/testing/selftests/mqueue/Makefile        | 12 +----------
 tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
 2 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
index 743d3f9e5918..8a58055fc1f5 100644
--- a/tools/testing/selftests/mqueue/Makefile
+++ b/tools/testing/selftests/mqueue/Makefile
@@ -1,17 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 CFLAGS += -O2
 LDLIBS = -lrt -lpthread -lpopt
+
 TEST_GEN_PROGS := mq_open_tests mq_perf_tests
 
 include ../lib.mk
-
-override define RUN_TESTS
-	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
-	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
-endef
-
-override define EMIT_TESTS
-	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
-	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
-endef
-
diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
index e0a74bd207a5..677140aa25fd 100644
--- a/tools/testing/selftests/mqueue/mq_open_tests.c
+++ b/tools/testing/selftests/mqueue/mq_open_tests.c
@@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
 int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
 FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
 char *queue_path;
+char *default_queue_path = "/test1";
 mqd_t queue = -1;
 
 static inline void __set(FILE *stream, int value, char *err_msg);
@@ -238,27 +239,27 @@ int main(int argc, char *argv[])
 	struct mq_attr attr, result;
 
 	if (argc != 2) {
-		fprintf(stderr, "Must pass a valid queue name\n\n");
-		fprintf(stderr, usage, argv[0]);
-		exit(1);
-	}
+		printf("Using Default queue path - %s\n", default_queue_path);
+		queue_path = default_queue_path;
+	} else {
 
 	/*
 	 * Although we can create a msg queue with a non-absolute path name,
 	 * unlink will fail.  So, if the name doesn't start with a /, add one
 	 * when we save it.
 	 */
-	if (*argv[1] == '/')
-		queue_path = strdup(argv[1]);
-	else {
-		queue_path = malloc(strlen(argv[1]) + 2);
-		if (!queue_path) {
-			perror("malloc()");
-			exit(1);
+		if (*argv[1] == '/')
+			queue_path = strdup(argv[1]);
+		else {
+			queue_path = malloc(strlen(argv[1]) + 2);
+			if (!queue_path) {
+				perror("malloc()");
+				exit(1);
+			}
+			queue_path[0] = '/';
+			queue_path[1] = 0;
+			strcat(queue_path, argv[1]);
 		}
-		queue_path[0] = '/';
-		queue_path[1] = 0;
-		strcat(queue_path, argv[1]);
 	}
 
 	if (getuid() != 0) {
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-09  9:46     ` anders.roxell
  -1 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:46 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG)
  Cc: dvhart, tglx, mingo, peterz, linux-kernel, linux-kselftest

On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

> ---
>  tools/testing/selftests/futex/Makefile | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
> index 8497a376ef9d..12631f0076a1 100644
> --- a/tools/testing/selftests/futex/Makefile
> +++ b/tools/testing/selftests/futex/Makefile
> @@ -17,14 +17,6 @@ all:
>  		fi \
>  	done
>  
> -override define RUN_TESTS
> -	@export KSFT_TAP_LEVEL=`echo 1`;
> -	@echo "TAP version 13";
> -	@echo "selftests: futex";
> -	@echo "========================================";
> -	@cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>  	mkdir -p $(INSTALL_PATH)
>  	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -36,10 +28,6 @@ override define INSTALL_RULE
>  	done;
>  endef
>  
> -override define EMIT_TESTS
> -	echo "./run.sh"
> -endef
> -
>  override define CLEAN
>  	@for DIR in $(SUBDIRS); do		\
>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
> -- 
> 2.14.1
> 

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:46     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: anders.roxell @ 2018-05-09  9:46 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/futex/Makefile | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
> index 8497a376ef9d..12631f0076a1 100644
> --- a/tools/testing/selftests/futex/Makefile
> +++ b/tools/testing/selftests/futex/Makefile
> @@ -17,14 +17,6 @@ all:
>  		fi \
>  	done
>  
> -override define RUN_TESTS
> -	@export KSFT_TAP_LEVEL=`echo 1`;
> -	@echo "TAP version 13";
> -	@echo "selftests: futex";
> -	@echo "========================================";
> -	@cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>  	mkdir -p $(INSTALL_PATH)
>  	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -36,10 +28,6 @@ override define INSTALL_RULE
>  	done;
>  endef
>  
> -override define EMIT_TESTS
> -	echo "./run.sh"
> -endef
> -
>  override define CLEAN
>  	@for DIR in $(SUBDIRS); do		\
>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:46     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:46 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/futex/Makefile | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
> index 8497a376ef9d..12631f0076a1 100644
> --- a/tools/testing/selftests/futex/Makefile
> +++ b/tools/testing/selftests/futex/Makefile
> @@ -17,14 +17,6 @@ all:
>  		fi \
>  	done
>  
> -override define RUN_TESTS
> -	@export KSFT_TAP_LEVEL=`echo 1`;
> -	@echo "TAP version 13";
> -	@echo "selftests: futex";
> -	@echo "========================================";
> -	@cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>  	mkdir -p $(INSTALL_PATH)
>  	install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -36,10 +28,6 @@ override define INSTALL_RULE
>  	done;
>  endef
>  
> -override define EMIT_TESTS
> -	echo "./run.sh"
> -endef
> -
>  override define CLEAN
>  	@for DIR in $(SUBDIRS); do		\
>  		BUILD_TARGET=$(OUTPUT)/$$DIR;	\
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-09  9:46     ` anders.roxell
  -1 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:46 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG)
  Cc: lei.yang, po-hsu.lin, linux-kselftest, linux-kernel

On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
> 
> The run_full_tests target now calls the test with "-r 10".
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

> ---
>  tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>  tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>  
>  run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>  
>  clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>  
>  error=-12
>  priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>  retval=0
>  
>  while getopts e:hp:r: opt; do
> -- 
> 2.14.1
> 

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:46     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: anders.roxell @ 2018-05-09  9:46 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
> 
> The run_full_tests target now calls the test with "-r 10".
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>  tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>  
>  run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>  
>  clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>  
>  error=-12
>  priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>  retval=0
>  
>  while getopts e:hp:r: opt; do
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:46     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:46 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
> 
> The run_full_tests target now calls the test with "-r 10".
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>  tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>  
>  run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>  
>  clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>  
>  error=-12
>  priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>  retval=0
>  
>  while getopts e:hp:r: opt; do
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-09  9:49     ` anders.roxell
  -1 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:49 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG); +Cc: linux-kernel, linux-kselftest

On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Add new run_tests.sh to do the dependency checks the custom
> RUN_TESTS did. Common defines work with the run_tests.sh set as the
> TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.
> 
> Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
> them via RUN_TESTS and include it in EMIT_TESTS. With this change the
> new run_tests.sh runs the test after checking dependencies.
> 
> This change also adds Skip handling to return kselftest skip code when
> test is skipped to clearly identify when the test is skipped instead of
> reporting it as failed.
> 
> Output with this change:
> 
> TAP version 13
> selftests: mount: run_tests.sh
> ========================================
> WARN: No /proc/self/uid_map exist, test skipped.
> not ok 1..1 selftests: mount: run_tests.sh [SKIP]
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

> ---
>  tools/testing/selftests/mount/Makefile     | 12 ++----------
>  tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
>  2 files changed, 14 insertions(+), 10 deletions(-)
>  create mode 100755 tools/testing/selftests/mount/run_tests.sh
> 
> diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
> index e094f71c6dbc..026890744215 100644
> --- a/tools/testing/selftests/mount/Makefile
> +++ b/tools/testing/selftests/mount/Makefile
> @@ -3,15 +3,7 @@
>  CFLAGS = -Wall \
>           -O2
>  
> -TEST_GEN_PROGS := unprivileged-remount-test
> +TEST_PROGS := run_tests.sh
> +TEST_GEN_FILES := unprivileged-remount-test
>  
>  include ../lib.mk
> -
> -override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
> -		      then	\
> -				./unprivileged-remount-test ; \
> -		      else	\
> -				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
> -		      fi
> -override EMIT_TESTS := echo "$(RUN_TESTS)"
> -
> diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
> new file mode 100755
> index 000000000000..4ab8f507dcba
> --- /dev/null
> +++ b/tools/testing/selftests/mount/run_tests.sh
> @@ -0,0 +1,12 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Kselftest framework requirement - SKIP code is 4.
> +ksft_skip=4
> +
> +# Run mount selftests
> +if [ -f /proc/self/uid_map ] ; then
> +	./unprivileged-remount-test ;
> +else
> +	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
> +	exit $ksft_skip
> +fi
> -- 
> 2.14.1
> 

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

* [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:49     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: anders.roxell @ 2018-05-09  9:49 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Add new run_tests.sh to do the dependency checks the custom
> RUN_TESTS did. Common defines work with the run_tests.sh set as the
> TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.
> 
> Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
> them via RUN_TESTS and include it in EMIT_TESTS. With this change the
> new run_tests.sh runs the test after checking dependencies.
> 
> This change also adds Skip handling to return kselftest skip code when
> test is skipped to clearly identify when the test is skipped instead of
> reporting it as failed.
> 
> Output with this change:
> 
> TAP version 13
> selftests: mount: run_tests.sh
> ========================================
> WARN: No /proc/self/uid_map exist, test skipped.
> not ok 1..1 selftests: mount: run_tests.sh [SKIP]
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/mount/Makefile     | 12 ++----------
>  tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
>  2 files changed, 14 insertions(+), 10 deletions(-)
>  create mode 100755 tools/testing/selftests/mount/run_tests.sh
> 
> diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
> index e094f71c6dbc..026890744215 100644
> --- a/tools/testing/selftests/mount/Makefile
> +++ b/tools/testing/selftests/mount/Makefile
> @@ -3,15 +3,7 @@
>  CFLAGS = -Wall \
>           -O2
>  
> -TEST_GEN_PROGS := unprivileged-remount-test
> +TEST_PROGS := run_tests.sh
> +TEST_GEN_FILES := unprivileged-remount-test
>  
>  include ../lib.mk
> -
> -override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
> -		      then	\
> -				./unprivileged-remount-test ; \
> -		      else	\
> -				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
> -		      fi
> -override EMIT_TESTS := echo "$(RUN_TESTS)"
> -
> diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
> new file mode 100755
> index 000000000000..4ab8f507dcba
> --- /dev/null
> +++ b/tools/testing/selftests/mount/run_tests.sh
> @@ -0,0 +1,12 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Kselftest framework requirement - SKIP code is 4.
> +ksft_skip=4
> +
> +# Run mount selftests
> +if [ -f /proc/self/uid_map ] ; then
> +	./unprivileged-remount-test ;
> +else
> +	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
> +	exit $ksft_skip
> +fi
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mount: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:49     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:49 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Add new run_tests.sh to do the dependency checks the custom
> RUN_TESTS did. Common defines work with the run_tests.sh set as the
> TEST_PROGS and defining unprivileged-remount-test in TEST_GEN_FILES.
> 
> Kselftest framework builds and installs TEST_GEN_FILES and doesn't run
> them via RUN_TESTS and include it in EMIT_TESTS. With this change the
> new run_tests.sh runs the test after checking dependencies.
> 
> This change also adds Skip handling to return kselftest skip code when
> test is skipped to clearly identify when the test is skipped instead of
> reporting it as failed.
> 
> Output with this change:
> 
> TAP version 13
> selftests: mount: run_tests.sh
> ========================================
> WARN: No /proc/self/uid_map exist, test skipped.
> not ok 1..1 selftests: mount: run_tests.sh [SKIP]
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/mount/Makefile     | 12 ++----------
>  tools/testing/selftests/mount/run_tests.sh | 12 ++++++++++++
>  2 files changed, 14 insertions(+), 10 deletions(-)
>  create mode 100755 tools/testing/selftests/mount/run_tests.sh
> 
> diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile
> index e094f71c6dbc..026890744215 100644
> --- a/tools/testing/selftests/mount/Makefile
> +++ b/tools/testing/selftests/mount/Makefile
> @@ -3,15 +3,7 @@
>  CFLAGS = -Wall \
>           -O2
>  
> -TEST_GEN_PROGS := unprivileged-remount-test
> +TEST_PROGS := run_tests.sh
> +TEST_GEN_FILES := unprivileged-remount-test
>  
>  include ../lib.mk
> -
> -override RUN_TESTS := if [ -f /proc/self/uid_map ] ; \
> -		      then	\
> -				./unprivileged-remount-test ; \
> -		      else	\
> -				echo "WARN: No /proc/self/uid_map exist, test skipped." ; \
> -		      fi
> -override EMIT_TESTS := echo "$(RUN_TESTS)"
> -
> diff --git a/tools/testing/selftests/mount/run_tests.sh b/tools/testing/selftests/mount/run_tests.sh
> new file mode 100755
> index 000000000000..4ab8f507dcba
> --- /dev/null
> +++ b/tools/testing/selftests/mount/run_tests.sh
> @@ -0,0 +1,12 @@
> +#!/bin/bash
> +# SPDX-License-Identifier: GPL-2.0
> +# Kselftest framework requirement - SKIP code is 4.
> +ksft_skip=4
> +
> +# Run mount selftests
> +if [ -f /proc/self/uid_map ] ; then
> +	./unprivileged-remount-test ;
> +else
> +	echo "WARN: No /proc/self/uid_map exist, test skipped." ;
> +	exit $ksft_skip
> +fi
> -- 
> 2.14.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-09  9:49     ` anders.roxell
  -1 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:49 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG); +Cc: linux-kselftest, linux-kernel

On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
> The overrides are in place to call mq_open_tests with queue name argument.
> The change to delete overrides is coupled with a change to mq_open_tests
> to use default queue name when it is called without one.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

> ---
>  tools/testing/selftests/mqueue/Makefile        | 12 +----------
>  tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
>  2 files changed, 16 insertions(+), 25 deletions(-)
> 
> diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
> index 743d3f9e5918..8a58055fc1f5 100644
> --- a/tools/testing/selftests/mqueue/Makefile
> +++ b/tools/testing/selftests/mqueue/Makefile
> @@ -1,17 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  CFLAGS += -O2
>  LDLIBS = -lrt -lpthread -lpopt
> +
>  TEST_GEN_PROGS := mq_open_tests mq_perf_tests
>  
>  include ../lib.mk
> -
> -override define RUN_TESTS
> -	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
> -	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
> -endef
> -
> -override define EMIT_TESTS
> -	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
> -	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
> -endef
> -
> diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
> index e0a74bd207a5..677140aa25fd 100644
> --- a/tools/testing/selftests/mqueue/mq_open_tests.c
> +++ b/tools/testing/selftests/mqueue/mq_open_tests.c
> @@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
>  int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
>  FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
>  char *queue_path;
> +char *default_queue_path = "/test1";
>  mqd_t queue = -1;
>  
>  static inline void __set(FILE *stream, int value, char *err_msg);
> @@ -238,27 +239,27 @@ int main(int argc, char *argv[])
>  	struct mq_attr attr, result;
>  
>  	if (argc != 2) {
> -		fprintf(stderr, "Must pass a valid queue name\n\n");
> -		fprintf(stderr, usage, argv[0]);
> -		exit(1);
> -	}
> +		printf("Using Default queue path - %s\n", default_queue_path);
> +		queue_path = default_queue_path;
> +	} else {
>  
>  	/*
>  	 * Although we can create a msg queue with a non-absolute path name,
>  	 * unlink will fail.  So, if the name doesn't start with a /, add one
>  	 * when we save it.
>  	 */
> -	if (*argv[1] == '/')
> -		queue_path = strdup(argv[1]);
> -	else {
> -		queue_path = malloc(strlen(argv[1]) + 2);
> -		if (!queue_path) {
> -			perror("malloc()");
> -			exit(1);
> +		if (*argv[1] == '/')
> +			queue_path = strdup(argv[1]);
> +		else {
> +			queue_path = malloc(strlen(argv[1]) + 2);
> +			if (!queue_path) {
> +				perror("malloc()");
> +				exit(1);
> +			}
> +			queue_path[0] = '/';
> +			queue_path[1] = 0;
> +			strcat(queue_path, argv[1]);
>  		}
> -		queue_path[0] = '/';
> -		queue_path[1] = 0;
> -		strcat(queue_path, argv[1]);
>  	}
>  
>  	if (getuid() != 0) {
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Anders Roxell
anders.roxell@linaro.org
M: +46 709 71 42 85 | IRC: roxell

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

* [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:49     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: anders.roxell @ 2018-05-09  9:49 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
> The overrides are in place to call mq_open_tests with queue name argument.
> The change to delete overrides is coupled with a change to mq_open_tests
> to use default queue name when it is called without one.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/mqueue/Makefile        | 12 +----------
>  tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
>  2 files changed, 16 insertions(+), 25 deletions(-)
> 
> diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
> index 743d3f9e5918..8a58055fc1f5 100644
> --- a/tools/testing/selftests/mqueue/Makefile
> +++ b/tools/testing/selftests/mqueue/Makefile
> @@ -1,17 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  CFLAGS += -O2
>  LDLIBS = -lrt -lpthread -lpopt
> +
>  TEST_GEN_PROGS := mq_open_tests mq_perf_tests
>  
>  include ../lib.mk
> -
> -override define RUN_TESTS
> -	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
> -	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
> -endef
> -
> -override define EMIT_TESTS
> -	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
> -	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
> -endef
> -
> diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
> index e0a74bd207a5..677140aa25fd 100644
> --- a/tools/testing/selftests/mqueue/mq_open_tests.c
> +++ b/tools/testing/selftests/mqueue/mq_open_tests.c
> @@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
>  int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
>  FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
>  char *queue_path;
> +char *default_queue_path = "/test1";
>  mqd_t queue = -1;
>  
>  static inline void __set(FILE *stream, int value, char *err_msg);
> @@ -238,27 +239,27 @@ int main(int argc, char *argv[])
>  	struct mq_attr attr, result;
>  
>  	if (argc != 2) {
> -		fprintf(stderr, "Must pass a valid queue name\n\n");
> -		fprintf(stderr, usage, argv[0]);
> -		exit(1);
> -	}
> +		printf("Using Default queue path - %s\n", default_queue_path);
> +		queue_path = default_queue_path;
> +	} else {
>  
>  	/*
>  	 * Although we can create a msg queue with a non-absolute path name,
>  	 * unlink will fail.  So, if the name doesn't start with a /, add one
>  	 * when we save it.
>  	 */
> -	if (*argv[1] == '/')
> -		queue_path = strdup(argv[1]);
> -	else {
> -		queue_path = malloc(strlen(argv[1]) + 2);
> -		if (!queue_path) {
> -			perror("malloc()");
> -			exit(1);
> +		if (*argv[1] == '/')
> +			queue_path = strdup(argv[1]);
> +		else {
> +			queue_path = malloc(strlen(argv[1]) + 2);
> +			if (!queue_path) {
> +				perror("malloc()");
> +				exit(1);
> +			}
> +			queue_path[0] = '/';
> +			queue_path[1] = 0;
> +			strcat(queue_path, argv[1]);
>  		}
> -		queue_path[0] = '/';
> -		queue_path[1] = 0;
> -		strcat(queue_path, argv[1]);
>  	}
>  
>  	if (getuid() != 0) {
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Anders Roxell
anders.roxell at linaro.org
M: +46 709 71 42 85 | IRC: roxell
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09  9:49     ` anders.roxell
  0 siblings, 0 replies; 39+ messages in thread
From: Anders Roxell @ 2018-05-09  9:49 UTC (permalink / raw)


On 2018-05-02 15:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in lib.mk.
> The overrides are in place to call mq_open_tests with queue name argument.
> The change to delete overrides is coupled with a change to mq_open_tests
> to use default queue name when it is called without one.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Anders Roxell <anders.roxell at linaro.org>

> ---
>  tools/testing/selftests/mqueue/Makefile        | 12 +----------
>  tools/testing/selftests/mqueue/mq_open_tests.c | 29 +++++++++++++-------------
>  2 files changed, 16 insertions(+), 25 deletions(-)
> 
> diff --git a/tools/testing/selftests/mqueue/Makefile b/tools/testing/selftests/mqueue/Makefile
> index 743d3f9e5918..8a58055fc1f5 100644
> --- a/tools/testing/selftests/mqueue/Makefile
> +++ b/tools/testing/selftests/mqueue/Makefile
> @@ -1,17 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  CFLAGS += -O2
>  LDLIBS = -lrt -lpthread -lpopt
> +
>  TEST_GEN_PROGS := mq_open_tests mq_perf_tests
>  
>  include ../lib.mk
> -
> -override define RUN_TESTS
> -	@$(OUTPUT)/mq_open_tests /test1 || echo "selftests: mq_open_tests [FAIL]"
> -	@$(OUTPUT)/mq_perf_tests || echo "selftests: mq_perf_tests [FAIL]"
> -endef
> -
> -override define EMIT_TESTS
> -	echo "./mq_open_tests /test1 || echo \"selftests: mq_open_tests [FAIL]\""
> -	echo "./mq_perf_tests || echo \"selftests: mq_perf_tests [FAIL]\""
> -endef
> -
> diff --git a/tools/testing/selftests/mqueue/mq_open_tests.c b/tools/testing/selftests/mqueue/mq_open_tests.c
> index e0a74bd207a5..677140aa25fd 100644
> --- a/tools/testing/selftests/mqueue/mq_open_tests.c
> +++ b/tools/testing/selftests/mqueue/mq_open_tests.c
> @@ -53,6 +53,7 @@ int saved_def_msgs, saved_def_msgsize, saved_max_msgs, saved_max_msgsize;
>  int cur_def_msgs, cur_def_msgsize, cur_max_msgs, cur_max_msgsize;
>  FILE *def_msgs, *def_msgsize, *max_msgs, *max_msgsize;
>  char *queue_path;
> +char *default_queue_path = "/test1";
>  mqd_t queue = -1;
>  
>  static inline void __set(FILE *stream, int value, char *err_msg);
> @@ -238,27 +239,27 @@ int main(int argc, char *argv[])
>  	struct mq_attr attr, result;
>  
>  	if (argc != 2) {
> -		fprintf(stderr, "Must pass a valid queue name\n\n");
> -		fprintf(stderr, usage, argv[0]);
> -		exit(1);
> -	}
> +		printf("Using Default queue path - %s\n", default_queue_path);
> +		queue_path = default_queue_path;
> +	} else {
>  
>  	/*
>  	 * Although we can create a msg queue with a non-absolute path name,
>  	 * unlink will fail.  So, if the name doesn't start with a /, add one
>  	 * when we save it.
>  	 */
> -	if (*argv[1] == '/')
> -		queue_path = strdup(argv[1]);
> -	else {
> -		queue_path = malloc(strlen(argv[1]) + 2);
> -		if (!queue_path) {
> -			perror("malloc()");
> -			exit(1);
> +		if (*argv[1] == '/')
> +			queue_path = strdup(argv[1]);
> +		else {
> +			queue_path = malloc(strlen(argv[1]) + 2);
> +			if (!queue_path) {
> +				perror("malloc()");
> +				exit(1);
> +			}
> +			queue_path[0] = '/';
> +			queue_path[1] = 0;
> +			strcat(queue_path, argv[1]);
>  		}
> -		queue_path[0] = '/';
> -		queue_path[1] = 0;
> -		strcat(queue_path, argv[1]);
>  	}
>  
>  	if (getuid() != 0) {
> -- 
> 2.14.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Anders Roxell
anders.roxell at linaro.org
M: +46 709 71 42 85 | IRC: roxell
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-09 11:39     ` lei.yang
  -1 siblings, 0 replies; 39+ messages in thread
From: lei yang @ 2018-05-09 11:39 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG), po-hsu.lin; +Cc: linux-kselftest, linux-kernel


On 2018年05月03日 05:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
>
> The run_full_tests target now calls the test with "-r 10".
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

Reviewed-by: Lei.Yang@windriver.com

Lei



> ---
>   tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>   tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>   2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>   
>   run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>   
>   clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>   
>   error=-12
>   priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>   retval=0
>   
>   while getopts e:hp:r: opt; do

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09 11:39     ` lei.yang
  0 siblings, 0 replies; 39+ messages in thread
From: lei.yang @ 2018-05-09 11:39 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]


On 2018年05月03日 05:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
>
> The run_full_tests target now calls the test with "-r 10".
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Lei.Yang at windriver.com

Lei



> ---
>   tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>   tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>   2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>   
>   run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>   
>   clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>   
>   error=-12
>   priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>   retval=0
>   
>   while getopts e:hp:r: opt; do

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: memory-hotplug: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-09 11:39     ` lei.yang
  0 siblings, 0 replies; 39+ messages in thread
From: lei yang @ 2018-05-09 11:39 UTC (permalink / raw)



On 2018年05月03日 05:18, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work after making the change the test to run
> with ratio=2 as the default mode to be able to invoke the test without
> the "-r 2" argument from the common RUN_TESTS and EMIT_TESTS.
>
> The run_full_tests target now calls the test with "-r 10".
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

Reviewed-by: Lei.Yang at windriver.com

Lei



> ---
>   tools/testing/selftests/memory-hotplug/Makefile           | 5 +----
>   tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 3 ++-
>   2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/memory-hotplug/Makefile b/tools/testing/selftests/memory-hotplug/Makefile
> index 686da510f989..e0a625e34f40 100644
> --- a/tools/testing/selftests/memory-hotplug/Makefile
> +++ b/tools/testing/selftests/memory-hotplug/Makefile
> @@ -4,11 +4,8 @@ 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 [PASS]" || echo "selftests: memory-hotplug [FAIL]"
> -
> -override EMIT_TESTS := echo "$(subst @,,$(RUN_TESTS))"
>   
>   run_full_test:
> -	@/bin/bash ./mem-on-off-test.sh && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
> +	@/bin/bash ./mem-on-off-test.sh -r 10 && echo "memory-hotplug selftests: [PASS]" || echo "memory-hotplug selftests: [FAIL]"
>   
>   clean:
> diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> index ae2c790d0880..ff4991704d07 100755
> --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh
> @@ -133,7 +133,8 @@ offline_memory_expect_fail()
>   
>   error=-12
>   priority=0
> -ratio=10
> +# Run with default of ratio=2 for Kselftest run
> +ratio=2
>   retval=0
>   
>   while getopts e:hp:r: opt; do

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18   ` shuah
  (?)
@ 2018-05-11 15:13     ` dvhart
  -1 siblings, 0 replies; 39+ messages in thread
From: Darren Hart @ 2018-05-11 15:13 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG)
  Cc: tglx, mingo, peterz, linux-kernel, linux-kselftest

On Wed, May 02, 2018 at 03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

I was concerned because this override was a deliberate decision made in:

9705315b7562 selftests/futex: Update Makefile to use lib.mk

But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
function running TEST_PROGS.

Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>

-- 
Darren Hart
VMware Open Source Technology Center

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-11 15:13     ` dvhart
  0 siblings, 0 replies; 39+ messages in thread
From: dvhart @ 2018-05-11 15:13 UTC (permalink / raw)


On Wed, May 02, 2018 at 03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

I was concerned because this override was a deliberate decision made in:

9705315b7562 selftests/futex: Update Makefile to use lib.mk

But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
function running TEST_PROGS.

Reviewed-by: Darren Hart (VMware) <dvhart at infradead.org>

-- 
Darren Hart
VMware Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-11 15:13     ` dvhart
  0 siblings, 0 replies; 39+ messages in thread
From: Darren Hart @ 2018-05-11 15:13 UTC (permalink / raw)


On Wed, May 02, 2018@03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
> 
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>

I was concerned because this override was a deliberate decision made in:

9705315b7562 selftests/futex: Update Makefile to use lib.mk

But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
function running TEST_PROGS.

Reviewed-by: Darren Hart (VMware) <dvhart at infradead.org>

-- 
Darren Hart
VMware Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-11 15:13     ` dvhart
  (?)
@ 2018-05-11 15:25       ` shuah
  -1 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan @ 2018-05-11 15:25 UTC (permalink / raw)
  To: Darren Hart
  Cc: tglx, mingo, peterz, linux-kernel, linux-kselftest, Shuah Khan

On 05/11/2018 09:13 AM, Darren Hart wrote:
> On Wed, May 02, 2018 at 03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
>> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
>> lib.mk. Common defines work just fine and there is no need to define
>> custom overrides.
>>
>> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
> 
> I was concerned because this override was a deliberate decision made in:
> 
> 9705315b7562 selftests/futex: Update Makefile to use lib.mk

Yes I had the same concern.
> 
> But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
> function running TEST_PROGS.
> 
> Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>
> 

Thanks. Yes I was surprised as well. I ran a few times to make sure. :)

-- Shuah

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-11 15:25       ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: shuah @ 2018-05-11 15:25 UTC (permalink / raw)


On 05/11/2018 09:13 AM, Darren Hart wrote:
> On Wed, May 02, 2018 at 03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
>> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
>> lib.mk. Common defines work just fine and there is no need to define
>> custom overrides.
>>
>> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
> 
> I was concerned because this override was a deliberate decision made in:
> 
> 9705315b7562 selftests/futex: Update Makefile to use lib.mk

Yes I had the same concern.
> 
> But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
> function running TEST_PROGS.
> 
> Reviewed-by: Darren Hart (VMware) <dvhart at infradead.org>
> 

Thanks. Yes I was surprised as well. I ran a few times to make sure. :)

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: futex: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-11 15:25       ` shuah
  0 siblings, 0 replies; 39+ messages in thread
From: Shuah Khan @ 2018-05-11 15:25 UTC (permalink / raw)


On 05/11/2018 09:13 AM, Darren Hart wrote:
> On Wed, May 02, 2018@03:18:45PM -0600, Shuah Khan (Samsung OSG) wrote:
>> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
>> lib.mk. Common defines work just fine and there is no need to define
>> custom overrides.
>>
>> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
> 
> I was concerned because this override was a deliberate decision made in:
> 
> 9705315b7562 selftests/futex: Update Makefile to use lib.mk

Yes I had the same concern.
> 
> But reviewing lib.mk today, the RUN_TESTS and EMIT_TESTS perform the same
> function running TEST_PROGS.
> 
> Reviewed-by: Darren Hart (VMware) <dvhart at infradead.org>
> 

Thanks. Yes I was surprised as well. I ran a few times to make sure. :)

-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
  2018-05-02 21:18 ` shuah
  (?)
@ 2018-05-12 16:12   ` pintu.ping
  -1 siblings, 0 replies; 39+ messages in thread
From: Pintu Kumar @ 2018-05-12 16:12 UTC (permalink / raw)
  To: Shuah Khan (Samsung OSG); +Cc: Daniel Díaz, linux-kselftest, open list

On Thu, May 3, 2018 at 2:48 AM, Shuah Khan (Samsung OSG)
<shuah@kernel.org> wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
> ---
>  tools/testing/selftests/android/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
> index f6304d2be90c..72c25a3cb658 100644
> --- a/tools/testing/selftests/android/Makefile
> +++ b/tools/testing/selftests/android/Makefile
> @@ -18,10 +18,6 @@ all:
>                 fi \
>         done
>
> -override define RUN_TESTS
> -       @cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>         mkdir -p $(INSTALL_PATH)
>         install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -33,10 +29,6 @@ override define INSTALL_RULE
>         done;
>  endef
>
> -override define EMIT_TESTS
> -       echo "./run.sh"
> -endef
> -
>  override define CLEAN
>         @for DIR in $(SUBDIRS); do              \
>                 BUILD_TARGET=$(OUTPUT)/$$DIR;   \
> --
> 2.14.1
>

OK.

Acked-by: Pintu Agarwal <pintu.ping@gmail.com>

---

Note: This mail goes into my spam email box.

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

* [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-12 16:12   ` pintu.ping
  0 siblings, 0 replies; 39+ messages in thread
From: pintu.ping @ 2018-05-12 16:12 UTC (permalink / raw)


On Thu, May 3, 2018 at 2:48 AM, Shuah Khan (Samsung OSG)
<shuah at kernel.org> wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
> ---
>  tools/testing/selftests/android/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
> index f6304d2be90c..72c25a3cb658 100644
> --- a/tools/testing/selftests/android/Makefile
> +++ b/tools/testing/selftests/android/Makefile
> @@ -18,10 +18,6 @@ all:
>                 fi \
>         done
>
> -override define RUN_TESTS
> -       @cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>         mkdir -p $(INSTALL_PATH)
>         install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -33,10 +29,6 @@ override define INSTALL_RULE
>         done;
>  endef
>
> -override define EMIT_TESTS
> -       echo "./run.sh"
> -endef
> -
>  override define CLEAN
>         @for DIR in $(SUBDIRS); do              \
>                 BUILD_TARGET=$(OUTPUT)/$$DIR;   \
> --
> 2.14.1
>

OK.

Acked-by: Pintu Agarwal <pintu.ping at gmail.com>

---

Note: This mail goes into my spam email box.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides
@ 2018-05-12 16:12   ` pintu.ping
  0 siblings, 0 replies; 39+ messages in thread
From: Pintu Kumar @ 2018-05-12 16:12 UTC (permalink / raw)


On Thu, May 3, 2018 at 2:48 AM, Shuah Khan (Samsung OSG)
<shuah@kernel.org> wrote:
> Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
> lib.mk. Common defines work just fine and there is no need to define
> custom overrides.
>
> Signed-off-by: Shuah Khan (Samsung OSG) <shuah at kernel.org>
> ---
>  tools/testing/selftests/android/Makefile | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefile
> index f6304d2be90c..72c25a3cb658 100644
> --- a/tools/testing/selftests/android/Makefile
> +++ b/tools/testing/selftests/android/Makefile
> @@ -18,10 +18,6 @@ all:
>                 fi \
>         done
>
> -override define RUN_TESTS
> -       @cd $(OUTPUT); ./run.sh
> -endef
> -
>  override define INSTALL_RULE
>         mkdir -p $(INSTALL_PATH)
>         install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
> @@ -33,10 +29,6 @@ override define INSTALL_RULE
>         done;
>  endef
>
> -override define EMIT_TESTS
> -       echo "./run.sh"
> -endef
> -
>  override define CLEAN
>         @for DIR in $(SUBDIRS); do              \
>                 BUILD_TARGET=$(OUTPUT)/$$DIR;   \
> --
> 2.14.1
>

OK.

Acked-by: Pintu Agarwal <pintu.ping at gmail.com>

---

Note: This mail goes into my spam email box.
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-05-12 16:12 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 21:18 [PATCH] selftests: android: delete RUN_TESTS and EMIT_TESTS overrides Shuah Khan (Samsung OSG)
2018-05-02 21:18 ` Shuah Khan (Samsung OSG)
2018-05-02 21:18 ` shuah
2018-05-02 21:18 ` [PATCH] selftests: futex: " Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` shuah
2018-05-09  9:46   ` Anders Roxell
2018-05-09  9:46     ` Anders Roxell
2018-05-09  9:46     ` anders.roxell
2018-05-11 15:13   ` Darren Hart
2018-05-11 15:13     ` Darren Hart
2018-05-11 15:13     ` dvhart
2018-05-11 15:25     ` Shuah Khan
2018-05-11 15:25       ` Shuah Khan
2018-05-11 15:25       ` shuah
2018-05-02 21:18 ` [PATCH] selftests: memory-hotplug: " Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` shuah
2018-05-09  9:46   ` Anders Roxell
2018-05-09  9:46     ` Anders Roxell
2018-05-09  9:46     ` anders.roxell
2018-05-09 11:39   ` lei yang
2018-05-09 11:39     ` lei yang
2018-05-09 11:39     ` lei.yang
2018-05-02 21:18 ` [PATCH] selftests: mount: " Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` shuah
2018-05-09  9:49   ` Anders Roxell
2018-05-09  9:49     ` Anders Roxell
2018-05-09  9:49     ` anders.roxell
2018-05-02 21:18 ` [PATCH] selftests: mqueue: " Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` Shuah Khan (Samsung OSG)
2018-05-02 21:18   ` shuah
2018-05-09  9:49   ` Anders Roxell
2018-05-09  9:49     ` Anders Roxell
2018-05-09  9:49     ` anders.roxell
2018-05-12 16:12 ` [PATCH] selftests: android: " Pintu Kumar
2018-05-12 16:12   ` Pintu Kumar
2018-05-12 16:12   ` pintu.ping

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.