32 lines · plain
1#!/bin/sh2# SPDX-License-Identifier: GPL-2.03# description: Snapshot and tracing_cpumask4# requires: trace_marker tracing_cpumask snapshot5# flags: instance6 7# This testcase is constrived to reproduce a problem that the cpu buffers8# become unavailable which is due to 'record_disabled' of array_buffer and9# max_buffer being messed up.10 11# Store origin cpumask12ORIG_CPUMASK=`cat tracing_cpumask`13 14# Stop tracing all cpu15echo 0 > tracing_cpumask16 17# Take a snapshot of the main buffer18echo 1 > snapshot19 20# Restore origin cpumask, note that there should be some cpus being traced21echo ${ORIG_CPUMASK} > tracing_cpumask22 23# Set tracing on24echo 1 > tracing_on25 26# Write a log into buffer27echo "test input 1" > trace_marker28 29# Ensure the log writed so that cpu buffers are still available30grep -q "test input 1" trace31exit 032