35 lines · plain
1#!/bin/sh2# SPDX-License-Identifier: GPL-2.03# description: event trigger - test synthetic event create remove4# requires: set_event synthetic_events5 6fail() { #msg7 echo $18 exit_fail9}10 11echo "Test create synthetic event"12 13echo 'wakeup_latency u64 lat pid_t pid char comm[16]' > synthetic_events14if [ ! -d events/synthetic/wakeup_latency ]; then15 fail "Failed to create wakeup_latency synthetic event"16fi17 18reset_trigger19 20echo "Test remove synthetic event"21echo '!wakeup_latency u64 lat pid_t pid char comm[16]' >> synthetic_events22if [ -d events/synthetic/wakeup_latency ]; then23 fail "Failed to delete wakeup_latency synthetic event"24fi25 26reset_trigger27 28echo "Test create synthetic event with an error"29echo 'wakeup_latency u64 lat pid_t pid char' > synthetic_events > /dev/null30if [ -d events/synthetic/wakeup_latency ]; then31 fail "Created wakeup_latency synthetic event with an invalid format"32fi33 34exit 035