From c775f829db2e25ffa384ffe1b6b6859cdddfa935 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 3 Oct 2016 00:55:34 +0200 Subject: [PATCH] sh testsuite: add tests for exitcode on failure to exec Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-misc/exitcode_EACCES.right | 2 ++ shell/ash_test/ash-misc/exitcode_EACCES.tests | 2 ++ shell/ash_test/ash-misc/exitcode_ENOENT.right | 2 ++ shell/ash_test/ash-misc/exitcode_ENOENT.tests | 2 ++ shell/hush_test/hush-misc/exitcode_EACCES.right | 2 ++ shell/hush_test/hush-misc/exitcode_EACCES.tests | 2 ++ shell/hush_test/hush-misc/exitcode_ENOENT.right | 2 ++ shell/hush_test/hush-misc/exitcode_ENOENT.tests | 2 ++ 8 files changed, 16 insertions(+) create mode 100644 shell/ash_test/ash-misc/exitcode_EACCES.right create mode 100755 shell/ash_test/ash-misc/exitcode_EACCES.tests create mode 100644 shell/ash_test/ash-misc/exitcode_ENOENT.right create mode 100755 shell/ash_test/ash-misc/exitcode_ENOENT.tests create mode 100644 shell/hush_test/hush-misc/exitcode_EACCES.right create mode 100755 shell/hush_test/hush-misc/exitcode_EACCES.tests create mode 100644 shell/hush_test/hush-misc/exitcode_ENOENT.right create mode 100755 shell/hush_test/hush-misc/exitcode_ENOENT.tests diff --git a/shell/ash_test/ash-misc/exitcode_EACCES.right b/shell/ash_test/ash-misc/exitcode_EACCES.right new file mode 100644 index 000000000..0a332f56c --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode_EACCES.right @@ -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 index 000000000..26b5c6116 --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode_EACCES.tests @@ -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 index 000000000..45b27b32e --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode_ENOENT.right @@ -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 index 000000000..7f1b88a99 --- /dev/null +++ b/shell/ash_test/ash-misc/exitcode_ENOENT.tests @@ -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 index 000000000..a80d55137 --- /dev/null +++ b/shell/hush_test/hush-misc/exitcode_EACCES.right @@ -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 index 000000000..26b5c6116 --- /dev/null +++ b/shell/hush_test/hush-misc/exitcode_EACCES.tests @@ -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 index 000000000..d8315503f --- /dev/null +++ b/shell/hush_test/hush-misc/exitcode_ENOENT.right @@ -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 index 000000000..7f1b88a99 --- /dev/null +++ b/shell/hush_test/hush-misc/exitcode_ENOENT.tests @@ -0,0 +1,2 @@ +./does_not_exist_for_sure +echo $? -- 2.25.1