Browse Source

tests: check -F and -zZ options

* tests/options-syntax.test: Check error diagnostics of -F and -zZ
options.
Dmitry V. Levin 1 month ago
parent
commit
255aabbe97
1 changed files with 11 additions and 2 deletions
  1. 11
    2
      tests/options-syntax.test

+ 11
- 2
tests/options-syntax.test View File

@@ -50,6 +50,13 @@ check_h '--seccomp-bpf implies -f
50 50
 check_h '--seccomp-bpf is not enabled for processes attached with -p
51 51
 -w must be given with (-c or -C)' --seccomp-bpf -f -p 1 -w
52 52
 
53
+check_h 'option -F is deprecated, please use -f instead
54
+-w must be given with (-c or -C)' -F -w /
55
+check_h 'option -F is deprecated, please use -f instead
56
+-w must be given with (-c or -C)' -FF -w /
57
+check_h 'deprecated option -F ignored
58
+-w must be given with (-c or -C)' -fF -w /
59
+
53 60
 check_e "invalid system call '/getcwd@ohmy'" -e trace=/getcwd@ohmy
54 61
 check_e "invalid -e kvm= argument: 'chdir'" -e kvm=chdir
55 62
 
@@ -107,12 +114,14 @@ if [ "$uid" -ge 0 ]; then
107 114
 		check_e "-$c has no effect with -c
108 115
 $STRACE_EXE: $umsg" -u :nosuchuser: -c -$c true
109 116
 	done
110
-		check_e "-i has no effect with -c
117
+
118
+	check_e "-i has no effect with -c
111 119
 $STRACE_EXE: -r has no effect with -c
112 120
 $STRACE_EXE: -t has no effect with -c
113 121
 $STRACE_EXE: -T has no effect with -c
114 122
 $STRACE_EXE: -y has no effect with -c
115
-$STRACE_EXE: $umsg" -u :nosuchuser: -cirtTy true
123
+$STRACE_EXE: Only the last of -z/-Z options will take effect. See status qualifier for more complex filters.
124
+$STRACE_EXE: $umsg" -u :nosuchuser: -cirtTyzZ true
116 125
 fi
117 126
 
118 127
 args='-p 2147483647'

Loading…
Cancel
Save