Skip to contentSkip to conversation

Minor selftests cleanups

PATCH In review Ramkumar Ramachandra 2 participants 6 messages Jun 30, 2013 – Jul 1, 2013

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

cover Minor selftests cleanups

Just ran a few of them. Unsure about [4/4] because of aabccae6 and a58130d.

Thanks.

Ramkumar Ramachandra (4):
selftests: add .gitignore for vm
selftests: fix clean target in kcmp Makefile
selftests: add .gitignore for kcmp
selftests: get {cpu,memory}-hotplug tests to run

 tools/testing/selftests/cpu-hotplug/on-off-test.sh    | 0
 tools/testing/selftests/kcmp/.gitignore               | 2 ++
 tools/testing/selftests/kcmp/Makefile                 | 3 +--
 tools/testing/selftests/memory-hotplug/on-off-test.sh | 0
 tools/testing/selftests/vm/.gitignore                 | 4 ++++
 5 files changed, 7 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 tools/testing/selftests/cpu-hotplug/on-off-test.sh
 create mode 100644 tools/testing/selftests/kcmp/.gitignore
 mode change 100644 => 100755 tools/testing/selftests/memory-hotplug/on-off-test.sh
 create mode 100644 tools/testing/selftests/vm/.gitignore
Signature · 1 line
1.8.3.1.643.gebeea52.dirty
#1 lore raw

PATCH 1/4 selftests: add .gitignore for vm

---
 tools/testing/selftests/vm/.gitignore | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 tools/testing/selftests/vm/.gitignore
tools/testing/selftests/vm/.gitignore new file +4 -0
new file mode 100644
index 0000000..ff1bb16
@@ -0,0 +1,4 @@
+hugepage-mmap
+hugepage-shm
+map_hugetlb
+thuge-gen
Signature · 1 line
1.8.3.1.643.gebeea52.dirty
#2 lore raw

PATCH 2/4 selftests: fix clean target in kcmp Makefile

In reply to Ramkumar Ramachandra
---
 tools/testing/selftests/kcmp/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/kcmp/Makefile +1 -2
index 56eb552..d7d6bbe 100644
@@ -25,5 +25,4 @@ run_tests: all
 	@./kcmp_test || echo "kcmp_test: [FAIL]"
 
 clean:
-	rm -fr ./run_test
-	rm -fr ./test-file
+	$(RM) kcmp_test kcmp-test-file
Signature · 1 line
1.8.3.1.643.gebeea52.dirty
#3 lore raw

PATCH 3/4 selftests: add .gitignore for kcmp

In reply to Ramkumar Ramachandra
---
 tools/testing/selftests/kcmp/.gitignore | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 tools/testing/selftests/kcmp/.gitignore
tools/testing/selftests/kcmp/.gitignore new file +2 -0
new file mode 100644
index 0000000..5a9b373
@@ -0,0 +1,2 @@
+kcmp_test
+kcmp-test-file
Signature · 1 line
1.8.3.1.643.gebeea52.dirty
#4 lore raw

PATCH 4/4 selftests: get {cpu,memory}-hotplug tests to run

In reply to Ramkumar Ramachandra

The cpu-hotplug and memory-hotplug tests don't run:

  $ sudo make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests
  /bin/sh: ./on-off-test.sh: Permission denied
  $ sudo make -C tools/testing/selftests TARGETS=memory-hotplug run_tests
  /bin/sh: ./on-off-test.sh: Permission denied

Flip the executable bit fixing this.

---
 tools/testing/selftests/cpu-hotplug/on-off-test.sh    | 0
 tools/testing/selftests/memory-hotplug/on-off-test.sh | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 tools/testing/selftests/cpu-hotplug/on-off-test.sh
 mode change 100644 => 100755 tools/testing/selftests/memory-hotplug/on-off-test.sh
tools/testing/selftests/cpu-hotplug/on-off-test.sh +0 -0
old mode 100644
new mode 100755
tools/testing/selftests/memory-hotplug/on-off-test.sh +0 -0
old mode 100644
new mode 100755
Signature · 1 line
1.8.3.1.643.gebeea52.dirty
#5 lore raw

Re: [PATCH 4/4] selftests: get {cpu,memory}-hotplug tests to run

tools/testing/selftests/memory-hotplug/on-off-test.sh

Quoted 22 lines · On Sun, 30 Jun 2013 18:23:11 +0530 Ramkumar Ramachandra <[email protected]>…

The cpu-hotplug and memory-hotplug tests don't run:

  $ sudo make -C tools/testing/selftests TARGETS=cpu-hotplug run_tests
  /bin/sh: ./on-off-test.sh: Permission denied
  $ sudo make -C tools/testing/selftests TARGETS=memory-hotplug run_tests
  /bin/sh: ./on-off-test.sh: Permission denied

Flip the executable bit fixing this.

...

 2 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 tools/testing/selftests/cpu-hotplug/on-off-test.sh
 mode change 100644 => 100755 tools/testing/selftests/memory-hotplug/on-off-test.sh
tools/testing/selftests/cpu-hotplug/on-off-test.sh +0 -0
old mode 100644
new mode 100755
tools/testing/selftests/memory-hotplug/on-off-test.sh +0 -0
old mode 100644
new mode 100755

That won't work. The x bit will too easily get lost again - for example, patch(1) will rub it out.

This:

tools/testing/selftests/cpu-hotplug/Makefile renamed from tools/testing/selftests/cpu-hotplug/Makefile~tools-testing-selftests-dont-assume-the-x-bit-is-set-on-scripts +1 -1
@@ -1,6 +1,6 @@
 all:
 
 run_tests:
-	@./on-off-test.sh || echo "cpu-hotplug selftests: [FAIL]"
+	@/bin/sh ./on-off-test.sh || echo "cpu-hotplug selftests: [FAIL]"
 
 clean:
tools/testing/selftests/memory-hotplug/Makefile renamed from tools/testing/selftests/memory-hotplug/Makefile~tools-testing-selftests-dont-assume-the-x-bit-is-set-on-scripts +1 -1
@@ -1,6 +1,6 @@
 all:
 
 run_tests:
-	@./on-off-test.sh || echo "memory-hotplug selftests: [FAIL]"
+	@/bin/sh ./on-off-test.sh || echo "memory-hotplug selftests: [FAIL]"
 
 clean:

_