← Commit list

c91950f31

Denys Vlasenko
Denys Vlasenko
2020-02-19
SUCCESS Duration: 153s

Subject

ash,hush: testcase for "exit" without arguments in a trap

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash_test/ash-misc/exitcode_trap2.right+1 -0
@@ -0,0 +1 @@
+42:42
shell/ash_test/ash-misc/exitcode_trap2.tests+9 -0
@@ -0,0 +1,9 @@
+# "exit" in trap should not use last command's exitcode,
+# but exitcode on entering the trap.
+$THIS_SH -c '
+ trap "false;exit" term
+ kill $$ &
+ (exit 42)
+ wait
+'
+echo 42:$?
shell/hush_test/hush-misc/exitcode_trap2.right+1 -0
@@ -0,0 +1 @@
+42:42
shell/hush_test/hush-misc/exitcode_trap2.tests+9 -0
@@ -0,0 +1,9 @@
+# "exit" in trap should not use last command's exitcode,
+# but exitcode on entering the trap.
+$THIS_SH -c '
+ trap "false;exit" term
+ kill $$ &
+ (exit 42)
+ wait
+'
+echo 42:$?