summaryrefslogtreecommitdiff
path: root/shell/msh_test/msh-execution
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-30 22:28:32 +0000
committerDenis Vlasenko2008-05-30 22:28:32 +0000
commit447bd6683729eb6d0f09e30eb68add6297881d01 (patch)
tree778c20dc4b7f7f176ea43934d8fca9ac3056f5cc /shell/msh_test/msh-execution
parentf9a07841441e63a96d1a416f68ee2eeb78bface0 (diff)
downloadbusybox-447bd6683729eb6d0f09e30eb68add6297881d01.zip
busybox-447bd6683729eb6d0f09e30eb68add6297881d01.tar.gz
msh: fix the case where the file has exec bit but can't be run directly
(run "$SHELL $file" instead) msh: fix exit codes when command is not found or can't be execed (with testcases)
Diffstat (limited to 'shell/msh_test/msh-execution')
-rw-r--r--shell/msh_test/msh-execution/exitcode_EACCES.right2
-rwxr-xr-xshell/msh_test/msh-execution/exitcode_EACCES.tests2
-rw-r--r--shell/msh_test/msh-execution/exitcode_ENOENT.right2
-rwxr-xr-xshell/msh_test/msh-execution/exitcode_ENOENT.tests2
4 files changed, 8 insertions, 0 deletions
diff --git a/shell/msh_test/msh-execution/exitcode_EACCES.right b/shell/msh_test/msh-execution/exitcode_EACCES.right
new file mode 100644
index 0000000..b13682c
--- /dev/null
+++ b/shell/msh_test/msh-execution/exitcode_EACCES.right
@@ -0,0 +1,2 @@
+./: cannot execute
+126
diff --git a/shell/msh_test/msh-execution/exitcode_EACCES.tests b/shell/msh_test/msh-execution/exitcode_EACCES.tests
new file mode 100755
index 0000000..26b5c61
--- /dev/null
+++ b/shell/msh_test/msh-execution/exitcode_EACCES.tests
@@ -0,0 +1,2 @@
+./
+echo $?
diff --git a/shell/msh_test/msh-execution/exitcode_ENOENT.right b/shell/msh_test/msh-execution/exitcode_ENOENT.right
new file mode 100644
index 0000000..e2bad05
--- /dev/null
+++ b/shell/msh_test/msh-execution/exitcode_ENOENT.right
@@ -0,0 +1,2 @@
+./does_exist_for_sure: not found
+127
diff --git a/shell/msh_test/msh-execution/exitcode_ENOENT.tests b/shell/msh_test/msh-execution/exitcode_ENOENT.tests
new file mode 100755
index 0000000..c886653
--- /dev/null
+++ b/shell/msh_test/msh-execution/exitcode_ENOENT.tests
@@ -0,0 +1,2 @@
+./does_exist_for_sure
+echo $?