]> granicus.if.org Git - strace/blobdiff - tests/options-syntax.test
tests: extend TEST_NETLINK_OBJECT macro
[strace] / tests / options-syntax.test
index 4c778b31b7626ad513e30c585f106e3a5030735e..7cfc579b5defa42c2eb8c836e82eaddd9c8ff186 100755 (executable)
@@ -127,8 +127,20 @@ check_h 'piping the output and -ff are mutually exclusive' -o '!' -ff true
 check_h "invalid -a argument: '-42'" -a -42
 check_h "invalid -O argument: '-42'" -O -42
 check_h "invalid -s argument: '-42'" -s -42
+check_h "invalid -s argument: '1073741824'" -s 1073741824
 check_h "invalid -I argument: '5'" -I 5
 
+cat > "$EXP" << '__EOF__'
+strace: must have PROG [ARGS] or -p PID
+Try 'strace -h' for more information.
+__EOF__
+../zeroargc "$strace_exp" /bin/true 2> "$LOG" &&
+       dump_log_and_fail_with \
+               'zeroargc strace failed to handle the error properly'
+match_diff "$LOG" "$EXP" ||
+       dump_log_and_fail_with \
+               'zeroargc strace failed to print expected diagnostics'
+
 if [ -n "${UID-}" ]; then
        if [ "${UID-}" = 0 ]; then
                umsg="Cannot find user ':nosuchuser:'"