X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Fsystem-tests%2Frun-kprobe-fuzzing.py;h=3c7c7668741efb73dfe96f433202debc75b37957;hb=056f7519e4772cdd4636d386a5252d9e23866729;hp=aed583e08a1a52bd7c2617c10d8f93ccd18e765c;hpb=c5b4a21230d5a2332577e2e3257e08c655ba84d1;p=lttng-ci.git diff --git a/scripts/system-tests/run-kprobe-fuzzing.py b/scripts/system-tests/run-kprobe-fuzzing.py index aed583e..3c7c766 100644 --- a/scripts/system-tests/run-kprobe-fuzzing.py +++ b/scripts/system-tests/run-kprobe-fuzzing.py @@ -55,16 +55,18 @@ def set_kprobe_tracing_state(state): if state not in (0 ,1): raise ValueError - if state == 0: - # Clear the content of the trace. - open('/sys/kernel/debug/tracing/trace', 'w').close() - try: with open('/sys/kernel/debug/tracing/events/kprobes/enable', 'w') as enable_kprobe_file: enable_kprobe_file.write('{}\n'.format(state)) except IOError: print('kprobes/enable file does not exist') + if state == 0: + # Clear the content of the trace. + open('/sys/kernel/debug/tracing/trace', 'w').close() + # Clear all the events. + open('/sys/kernel/debug/tracing/kprobe_events', 'w').close() + def run_workload(): print('Running workload...', end='') sys.stdout.flush()