+skip $isroot "Root access is needed. Skipping all kernel wildcard tests." $NUM_KERNEL_TESTS ||
+{
+ diag "Test kernel wildcards"
+
+ modprobe lttng-test
+
+ EVENT_NAME="lttng_test_filter_event"
+
+ # non-matching
+ test_event_wildcard kernel 0 'lttng_test_abc*'
+ test_event_wildcard kernel 0 '*abc'
+ test_event_wildcard kernel 0 '*z*'
+ test_event_wildcard kernel 0 '*\**'
+ test_event_wildcard kernel 0 '*\*'
+ test_event_wildcard kernel 0 '\**'
+ test_event_wildcard kernel 0 '*:*eve*n'
+
+ # matching
+ test_event_wildcard kernel 1 'lttng_test_fil*'
+ test_event_wildcard kernel 1 '*'
+ test_event_wildcard kernel 1 'lttng_test_filter_event*'
+ test_event_wildcard kernel 1 '**'
+ test_event_wildcard kernel 1 '***'
+ test_event_wildcard kernel 1 '*filter_event'
+ test_event_wildcard kernel 1 '*ter_ev*'
+ test_event_wildcard kernel 1 '*test*'
+ test_event_wildcard kernel 1 '*test**'
+ test_event_wildcard kernel 1 '*e*'
+ test_event_wildcard kernel 1 '*_*event'
+ test_event_wildcard kernel 1 '*_*filter_*nt'
+ test_event_wildcard kernel 1 '*_**filter_*nt'
+ test_event_wildcard kernel 1 'l*t*t*n*g*_*t*e*s*t*_*f*i*l*t*e*r*_*e*v*e*n*t'
+ test_event_wildcard kernel 1 '*l*t*t*n*g*_*t*e*s*t*_*f*i*l*t*e*r*_*e*v*e*n*t*'
+ test_event_wildcard kernel 1 'lttng*event'
+ test_event_wildcard kernel 1 'lttng*test*filter*event'
+ test_event_wildcard kernel 1 '*lttng*test*filter*event*'
+
+ rmmod lttng-test
+}