Apply the fix for the issue noted below.
Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Hi,
I ran "runltp" with "ltp-2009-12-16" cvs.
And I found the following failure in "BindMounts" testcase:
------------
sh: /opt/ltp/testscripts/test_fs_bind.sh: Permission denied
------------
When I added execution permission and tested this testcase, the
following errors occurred.
------------
ls: /opt/ltp/testcases/kernel/fs/fs_bind/move/test*: No such file or
directory
ls: /opt/ltp/testcases/kernel/fs/fs_bind/bind/test*: No such file or
directory
ls: /opt/ltp/testcases/kernel/fs/fs_bind/rbind/test*: No such file or
directory
ls: /opt/ltp/testcases/kernel/fs/fs_bind/regression/test*: No such file or
directory
------------
This error is caused by following:
(1) Execution files haven't permissions.
(2) "${LTPROOT}" directory isn't the current directory in which
"make install" executed.
By default, "${LTPROOT}" directory is "/opt/ltp".
(3) ".../ltp-2009-12-16/testcases/kernel/fs/fs_bind/" directory does exist,
but "/opt/ltp/testcases/kernel/fs/fs_bind/" directory doesn't exist.
(I want to suggest using "/opt/ltp/testcases/bin/fs_bind/"
instead of "/opt/ltp/testcases/kernel/fs/fs_bind/".)
Then, I think that it requires following three modifications to run
"BindMounts" test exactly:
(1) Add the execution permissions to "${LTPROOT}/testscripts" directory
when installation.
(2) Deploy following four directories under the "${LTPROOT}/testcases/bin"
directory when installation.
"./fs_bind/move/"
"./fs_bind/bind/"
"./fs_bind/rbind/"
"./fs_bind/regression/"
(3) Apply the following patch:
============
--- test_fs_bind.sh 2008-06-29 04:30:19.000000000 +0900
+++ test_fs_bind.sh.new 2009-12-17 11:32:27.000000000 +0900
@@ -60,7 +60,7 @@
LTPROOT="${PWD}"
fi
- FS_BIND_ROOT="${LTPROOT}/testcases/kernel/fs/fs_bind"
+ FS_BIND_ROOT="${LTPROOT}/testcases/bin/fs_bind"
total=0 # total number of tests
for dir in "${test_dirs[@]}" ; do
============
Regards--
-Tomonori Mitani
diff --git a/testcases/kernel/fs/fs_bind/Makefile b/testcases/kernel/fs/fs_bind/Makefile
index dccb027..cf06da8 100644
--- a/testcases/kernel/fs/fs_bind/Makefile
+++ b/testcases/kernel/fs/fs_bind/Makefile
@@ -24,6 +24,10 @@
include $(top_srcdir)/include/mk/env_pre.mk
+INSTALL_DIR := $(prefix)/testcases/bin/fs_bind
+
+INSTALL_TARGETS := */test*
+
RECURSIVE_TARGETS := all install uninstall
include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/fs/fs_bind/bin/Makefile b/testcases/kernel/fs/fs_bind/bin/Makefile
index 43aa2fe..750840b 100644
--- a/testcases/kernel/fs/fs_bind/bin/Makefile
+++ b/testcases/kernel/fs/fs_bind/bin/Makefile
@@ -24,4 +24,8 @@
include $(top_srcdir)/include/mk/testcases.mk
+INSTALL_DIR := $(prefix)/testcases/bin/fs_bind/bin
+
+INSTALL_TARGETS := check_prop lockfile makedir setup setupnslock
+
include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testscripts/Makefile b/testscripts/Makefile
index cc25e24..c0cec15 100644
--- a/testscripts/Makefile
+++ b/testscripts/Makefile
@@ -26,7 +26,7 @@
INSTALL_DIR := testscripts
-INSTALL_MODE := 00644
+INSTALL_MODE := 00755
INSTALL_TARGETS := *.sh
diff --git a/testscripts/test_fs_bind.sh b/testscripts/test_fs_bind.sh
index 30eafa9..39a237e 100755
--- a/testscripts/test_fs_bind.sh
+++ b/testscripts/test_fs_bind.sh
@@ -60,7 +60,7 @@
LTPROOT="${PWD}"
fi
- FS_BIND_ROOT="${LTPROOT}/testcases/kernel/fs/fs_bind"
+ FS_BIND_ROOT="${LTPROOT}/testcases/bin/fs_bind"
total=0 # total number of tests
for dir in "${test_dirs[@]}" ; do