diff options
Diffstat (limited to 'tests/misc/stty.sh')
-rwxr-xr-x | tests/misc/stty.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/stty.sh b/tests/misc/stty.sh index f6200e715..e549adb65 100755 --- a/tests/misc/stty.sh +++ b/tests/misc/stty.sh @@ -22,6 +22,7 @@ print_ver_ stty require_controlling_input_terminal_ require_trap_signame_ +require_strace_ ioctl trap '' TTOU # Ignore SIGTTOU @@ -81,4 +82,11 @@ done stty $(cat $saved_state) +# Ensure we validate options before accessing the device +strace -o log1 -e ioctl stty --version || fail=1 +n_ioctl1=$(wc -l < log1) || framework_failure_ +returns_ 1 strace -o log2 -e ioctl stty -blahblah || fail=1 +n_ioctl2=$(wc -l < log2) || framework_failure_ +test "$n_ioctl1" = "$n_ioctl2" || fail=1 + Exit $fail |