Skip to contentSkip to conversation

selftests/vm: fix a rename typo, fix executable issues

PATCH New John Hubbard 1 participant 3 messages Oct 3, 2020

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

v3 cover selftests/vm: fix a rename typo, fix executable issues

Here's v3, which treats the executable permissions of the two scripts here as optional nice-to-have features.

It fixes the rename as well.

Again, I've put in commit hashes that are only valid in linux-next, so those will need adjustment if these patches remain as distinct patches.

John Hubbard (2):
selftests/vm: fix an improper dependency upon executable script
permissions
selftests/vm: fix a rename typo: run_vmtest.sh --> run_vmtests.sh

 tools/testing/selftests/vm/Makefile                          | 2 +-
 tools/testing/selftests/vm/check_config.sh                   | 0
 tools/testing/selftests/vm/{run_vmtest.sh => run_vmtests.sh} | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 tools/testing/selftests/vm/check_config.sh
 rename tools/testing/selftests/vm/{run_vmtest.sh => run_vmtests.sh} (100%)
 mode change 100644 => 100755
Signature · 1 line
2.28.0
#1 lore raw

PATCH v3 1/2 selftests/vm: fix an improper dependency upon executable script permissions

commit 30fb9454ab23 ("selftests/vm: hmm-tests: remove the libhugetlbfs dependency") created the new check_config.sh file without the execute bit set. This is a problem because that same commit caused the Makefile to invoke it "./check_config.sh", so now "make" is failing in that directory.

Scripts are not supposed to depend on the executable bit being set, because patch(1) doesn't set it, and using patch to install a kernel is supported. Therefore, this fix involves two parts:

1) Invoke the new script via /bin/sh, to fix the problem, and

2) As an nice touch, make check_config.sh executable as well.

Fixes commit 30fb9454ab23 ("selftests/vm: hmm-tests: remove the libhugetlbfs dependency")
---
 tools/testing/selftests/vm/Makefile        | 2 +-
 tools/testing/selftests/vm/check_config.sh | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 tools/testing/selftests/vm/check_config.sh
tools/testing/selftests/vm/Makefile +1 -1
index 019cbb7f3cf8..a9332a7cf33f 100644
@@ -138,7 +138,7 @@ $(OUTPUT)/hmm-tests: local_config.h
 $(OUTPUT)/hmm-tests: LDLIBS += $(HMM_EXTRA_LIBS)
 
 local_config.mk local_config.h: check_config.sh
-	./check_config.sh $(CC)
+	/bin/sh ./check_config.sh $(CC)
 
 EXTRA_CLEAN += local_config.mk local_config.h
 
tools/testing/selftests/vm/check_config.sh +0 -0
old mode 100644
new mode 100755
Signature · 1 line
2.28.0
#2 lore raw

PATCH v3 2/2 selftests/vm: fix a rename typo: run_vmtest.sh --> run_vmtests.sh

In reply to John Hubbard

commit cb2ab76685d7 ("selftests/vm: rename run_vmtests --> run_vmtests.sh") claims to rename this file to run_vmtests.sh, but the actual commit botched the job and left out an "s". We all miss the "s", so let's restore it. :)

This patch also restores the executable bit on that same file, as a nice touch if it sticks. (Which it won't, if someone uses patch(1) to apply this, but it's worth setting it for everyone else.)

Fixes cb2ab76685d7 ("selftests/vm: rename run_vmtests --> run_vmtests.sh")
---
 tools/testing/selftests/vm/{run_vmtest.sh => run_vmtests.sh} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename tools/testing/selftests/vm/{run_vmtest.sh => run_vmtests.sh} (100%)
 mode change 100644 => 100755
tools/testing/selftests/vm/run_vmtests.sh renamed from tools/testing/selftests/vm/run_vmtest.sh +0 -0
old mode 100644
new mode 100755
similarity index 100%
rename from tools/testing/selftests/vm/run_vmtest.sh
rename to tools/testing/selftests/vm/run_vmtests.sh
Signature · 1 line
2.28.0