1#!/bin/sh 2# description: Snapshot and tracing setting 3# requires: snapshot 4# flags: instance 5 6echo "Set tracing off" 7echo 0 > tracing_on 8 9echo "Allocate and take a snapshot" 10echo 1 > snapshot 11 12# Since trace buffer is empty, snapshot is also empty, but allocated 13grep -q "Snapshot is allocated" snapshot 14 15echo "Ensure keep tracing off" 16test `cat tracing_on` -eq 0 17 18echo "Set tracing on" 19echo 1 > tracing_on 20 21echo "Take a snapshot again" 22echo 1 > snapshot 23 24echo "Ensure keep tracing on" 25test `cat tracing_on` -eq 1 26 27exit 0 28