From: Andreas Dilger Date: Sat, 14 Sep 2019 07:46:44 +0000 (-0600) Subject: LU-12760 tests: stack_trap defaults to sigspec=EXIT X-Git-Tag: 2.12.4-RC1~61 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=517c08e2e83eaf14ecf03eb593246fb2e408bf69;p=fs%2Flustre-release.git LU-12760 tests: stack_trap defaults to sigspec=EXIT If the "sigspec" argument is not specified for stack_trap(), default to "EXIT" as the signal, since this is what we use for all callers of stack_trap() today anyway. Lustre-change: https://review.whamcloud.com/36186 Lustre-commit: 5a911faae25784a91fc085debeb6dbe8512d80b6 Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I2c8d986cdf8743e1d956cd7941a47bd4cd772592 Reviewed-by: James Nunez Reviewed-by: Li Xi Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/36938 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 0edebf6..50ff81c 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5848,7 +5848,7 @@ report_error() { # usage: stack_trap arg sigspec # # stack_trap() behaves like bash's built-in trap, except that it "stacks" the -# command ``arg`` on top of previously defined commands for ``sigspec`` instead +# command "arg" on top of previously defined commands for "sigspec" instead # of overwriting them. # stacked traps are executed in reverse order of their registration # @@ -5856,7 +5856,7 @@ report_error() { stack_trap() { local arg="$1" - local sigspec="$2" + local sigspec="${2:-EXIT}" # Use "trap -p" to get the quoting right local old_trap="$(trap -p "$sigspec")"