WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / 00basic / snapshot.tc
blob13b4dabcf46e154eba1b3f77ba9acc23c84bbe6f
1 #!/bin/sh
2 # description: Snapshot and tracing setting
3 # requires: snapshot
4 # flags: instance
6 echo "Set tracing off"
7 echo 0 > tracing_on
9 echo "Allocate and take a snapshot"
10 echo 1 > snapshot
12 # Since trace buffer is empty, snapshot is also empty, but allocated
13 grep -q "Snapshot is allocated" snapshot
15 echo "Ensure keep tracing off"
16 test `cat tracing_on` -eq 0
18 echo "Set tracing on"
19 echo 1 > tracing_on
21 echo "Take a snapshot again"
22 echo 1 > snapshot
24 echo "Ensure keep tracing on"
25 test `cat tracing_on` -eq 1
27 exit 0