aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/00basic
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-08-03 17:55:12 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-08-03 17:55:12 +0800
commitc5f5aeef9b55b362ad5a0e04e4b41cd63b208842 (patch)
tree0ee2bb561e879db0a990d998359f6516dff3393b /tools/testing/selftests/ftrace/test.d/00basic
parentcrypto: rmd320 - use swap macro in rmd320_transform (diff)
parentcrypto/arm64: aes-ce-gcm - add missing kernel_neon_begin/end pair (diff)
downloadlinux-dev-c5f5aeef9b55b362ad5a0e04e4b41cd63b208842.tar.xz
linux-dev-c5f5aeef9b55b362ad5a0e04e4b41cd63b208842.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merge mainline to pick up c7513c2a2714 ("crypto/arm64: aes-ce-gcm - add missing kernel_neon_begin/end pair").
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/00basic')
-rw-r--r--tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc b/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc
new file mode 100644
index 000000000000..3b1f45e13a2e
--- /dev/null
+++ b/tools/testing/selftests/ftrace/test.d/00basic/snapshot.tc
@@ -0,0 +1,28 @@
+#!/bin/sh
+# description: Snapshot and tracing setting
+# flags: instance
+
+[ ! -f snapshot ] && exit_unsupported
+
+echo "Set tracing off"
+echo 0 > tracing_on
+
+echo "Allocate and take a snapshot"
+echo 1 > snapshot
+
+# Since trace buffer is empty, snapshot is also empty, but allocated
+grep -q "Snapshot is allocated" snapshot
+
+echo "Ensure keep tracing off"
+test `cat tracing_on` -eq 0
+
+echo "Set tracing on"
+echo 1 > tracing_on
+
+echo "Take a snapshot again"
+echo 1 > snapshot
+
+echo "Ensure keep tracing on"
+test `cat tracing_on` -eq 1
+
+exit 0