tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc

Source file repositories/reference/linux-study-clean/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
Extension
.tc
Size
1263 bytes
Lines
73
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: tools
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

if (event[i] == $5) {
		    break;
		}
	    }
	    if (i == cnt) {
		event[cnt++] = $5;
		if (cnt > 2) {
		    exit;
		}
	    }
	}
	END {
	    printf "%d", cnt;
	}'
}

echo 'sched:*' > set_event

yield

count=`check_unique`
if [ $count -lt 3 ]; then
    fail "at least fork, exec and exit events should be recorded"
fi

do_reset

echo 1 > events/sched/enable

yield

count=`check_unique`
if [ $count -lt 3 ]; then
    fail "at least fork, exec and exit events should be recorded"
fi

do_reset

echo 0 > events/sched/enable

yield

count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -ne 0 ]; then
    fail "any of scheduler events should not be recorded"
fi

exit 0

Annotation

Implementation Notes