sh testsuite: add tests for exitcode on failure to exec
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Oct 2016 22:55:34 +0000 (00:55 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Oct 2016 22:55:34 +0000 (00:55 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/ash-misc/exitcode_EACCES.right [new file with mode: 0644]
shell/ash_test/ash-misc/exitcode_EACCES.tests [new file with mode: 0755]
shell/ash_test/ash-misc/exitcode_ENOENT.right [new file with mode: 0644]
shell/ash_test/ash-misc/exitcode_ENOENT.tests [new file with mode: 0755]
shell/hush_test/hush-misc/exitcode_EACCES.right [new file with mode: 0644]
shell/hush_test/hush-misc/exitcode_EACCES.tests [new file with mode: 0755]
shell/hush_test/hush-misc/exitcode_ENOENT.right [new file with mode: 0644]
shell/hush_test/hush-misc/exitcode_ENOENT.tests [new file with mode: 0755]

diff --git a/shell/ash_test/ash-misc/exitcode_EACCES.right b/shell/ash_test/ash-misc/exitcode_EACCES.right
new file mode 100644 (file)
index 0000000..0a332f5
--- /dev/null
@@ -0,0 +1,2 @@
+exitcode_EACCES.tests: line 1: ./: Permission denied
+126
diff --git a/shell/ash_test/ash-misc/exitcode_EACCES.tests b/shell/ash_test/ash-misc/exitcode_EACCES.tests
new file mode 100755 (executable)
index 0000000..26b5c61
--- /dev/null
@@ -0,0 +1,2 @@
+./
+echo $?
diff --git a/shell/ash_test/ash-misc/exitcode_ENOENT.right b/shell/ash_test/ash-misc/exitcode_ENOENT.right
new file mode 100644 (file)
index 0000000..45b27b3
--- /dev/null
@@ -0,0 +1,2 @@
+exitcode_ENOENT.tests: line 1: ./does_not_exist_for_sure: not found
+127
diff --git a/shell/ash_test/ash-misc/exitcode_ENOENT.tests b/shell/ash_test/ash-misc/exitcode_ENOENT.tests
new file mode 100755 (executable)
index 0000000..7f1b88a
--- /dev/null
@@ -0,0 +1,2 @@
+./does_not_exist_for_sure
+echo $?
diff --git a/shell/hush_test/hush-misc/exitcode_EACCES.right b/shell/hush_test/hush-misc/exitcode_EACCES.right
new file mode 100644 (file)
index 0000000..a80d551
--- /dev/null
@@ -0,0 +1,2 @@
+hush: can't execute './': Permission denied
+126
diff --git a/shell/hush_test/hush-misc/exitcode_EACCES.tests b/shell/hush_test/hush-misc/exitcode_EACCES.tests
new file mode 100755 (executable)
index 0000000..26b5c61
--- /dev/null
@@ -0,0 +1,2 @@
+./
+echo $?
diff --git a/shell/hush_test/hush-misc/exitcode_ENOENT.right b/shell/hush_test/hush-misc/exitcode_ENOENT.right
new file mode 100644 (file)
index 0000000..d831550
--- /dev/null
@@ -0,0 +1,2 @@
+hush: can't execute './does_not_exist_for_sure': No such file or directory
+127
diff --git a/shell/hush_test/hush-misc/exitcode_ENOENT.tests b/shell/hush_test/hush-misc/exitcode_ENOENT.tests
new file mode 100755 (executable)
index 0000000..7f1b88a
--- /dev/null
@@ -0,0 +1,2 @@
+./does_not_exist_for_sure
+echo $?