xref: /linux/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_synth.tc (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: Generic dynamic event - add/remove synthetic events
4# requires: dynamic_events "s:[synthetic/]":README
5
6echo 0 > events/enable
7echo > dynamic_events
8
9echo "s:latency1 u64 lat; pid_t pid;" >> dynamic_events
10echo "s:latency2 u64 lat; pid_t pid;" >> dynamic_events
11
12grep -q latency1 dynamic_events
13grep -q latency2 dynamic_events
14test -d events/synthetic/latency1
15test -d events/synthetic/latency2
16
17echo "-:synthetic/latency2" >> dynamic_events
18
19grep -q latency1 dynamic_events
20! grep -q latency2 dynamic_events
21
22echo > dynamic_events
23
24clear_trace
25