diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-11-24 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-11-24 08:00:00 +0000 |
commit | 3f0e8cc1fbc4b785df7b1780b8e931904da986af (patch) | |
tree | ed2644a3f39db8c80b72206e15126d577574120d | |
parent | 463643b710b11032b90cdc1457b51e4213c133a2 (diff) | |
download | strace-3f0e8cc1fbc4b785df7b1780b8e931904da986af.tar.gz |
tests: check diagnostics that -k has no effect with -c
* tests/options-syntax.test: Check strace -c -k diagnostics.
-rwxr-xr-x | tests/options-syntax.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/options-syntax.test b/tests/options-syntax.test index c5ba389bc..5924ade85 100755 --- a/tests/options-syntax.test +++ b/tests/options-syntax.test @@ -11,6 +11,7 @@ . "${srcdir=.}/syntax.sh" compiled_with_secontext=$(get_config_option ENABLE_SECONTEXT "y") +compiled_with_stacktrace="$(get_config_option ENABLE_STACKTRACE 1)" check_e "Invalid process id: '0'" -p 0 check_e "Invalid process id: '0'" --attach=0 @@ -292,6 +293,11 @@ $STRACE_EXE: $umsg" -u :nosuchuser: -cinrtTyzZ true $STRACE_EXE: $umsg" -u :nosuchuser: -c --secontext true fi + if [ -n "$compiled_with_stacktrace" ]; then + check_e "-k/--stack-traces has no effect with -c/--summary-only +$STRACE_EXE: $umsg" -u :nosuchuser: -c -k true + fi + for c in --output-separately -A/--output-append-mode; do check_e "$c has no effect without -o/--output $STRACE_EXE: $umsg" -u :nosuchuser: ${c%%/*} true @@ -324,7 +330,7 @@ fi check_e_using_grep 'ptrace_setoptions = 0x[[:xdigit:]]+' -d / check_e_using_grep 'ptrace_setoptions = 0x[[:xdigit:]]+' --debug / -if [ -z "$(get_config_option ENABLE_STACKTRACE 1)" ]; then +if [ -z "$compiled_with_stacktrace" ]; then check_e "Stack traces (-k/--stack-traces option) are not supported by this build of strace" -k check_e "Stack traces (-k/--stack-traces option) are not supported by this build of strace" --stack-traces fi |