hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc
....@@ -1,38 +1,19 @@
11 #!/bin/sh
22 # SPDX-License-Identifier: GPL-2.0
33 # description: event trigger - test synthetic_events syntax parser errors
4
-# requires: synthetic_events error_log "char name[]' >> synthetic_events":README
4
+# requires: synthetic_events error_log
55
66 check_error() { # command-with-error-pos-by-^
77 ftrace_errlog_check 'synthetic_events' "$1" 'synthetic_events'
88 }
99
10
-check_dyn_error() { # command-with-error-pos-by-^
11
- ftrace_errlog_check 'synthetic_events' "$1" 'dynamic_events'
12
-}
13
-
1410 check_error 'myevent ^chr arg' # INVALID_TYPE
15
-check_error 'myevent ^unsigned arg' # INCOMPLETE_TYPE
16
-
17
-check_error 'myevent char ^str]; int v' # BAD_NAME
18
-check_error '^mye-vent char str[]' # BAD_NAME
19
-check_error 'myevent char ^st-r[]' # BAD_NAME
20
-
21
-check_error 'myevent char str;^[]' # INVALID_FIELD
22
-check_error 'myevent char str; ^int' # INVALID_FIELD
23
-
24
-check_error 'myevent char ^str[; int v' # INVALID_ARRAY_SPEC
25
-check_error 'myevent char ^str[kdjdk]' # INVALID_ARRAY_SPEC
26
-check_error 'myevent char ^str[257]' # INVALID_ARRAY_SPEC
27
-
28
-check_error '^mye;vent char str[]' # INVALID_CMD
29
-check_error '^myevent ; char str[]' # INVALID_CMD
30
-check_error '^myevent; char str[]' # INVALID_CMD
31
-check_error '^myevent ;char str[]' # INVALID_CMD
32
-check_error '^; char str[]' # INVALID_CMD
33
-check_error '^;myevent char str[]' # INVALID_CMD
34
-check_error '^myevent' # INVALID_CMD
35
-
36
-check_dyn_error '^s:junk/myevent char str[' # INVALID_DYN_CMD
11
+check_error 'myevent ^char str[];; int v' # INVALID_TYPE
12
+check_error 'myevent char ^str]; int v' # INVALID_NAME
13
+check_error 'myevent char ^str;[]' # INVALID_NAME
14
+check_error 'myevent ^char str[; int v' # INVALID_TYPE
15
+check_error '^mye;vent char str[]' # BAD_NAME
16
+check_error 'myevent char str[]; ^int' # INVALID_FIELD
17
+check_error '^myevent' # INCOMPLETE_CMD
3718
3819 exit 0