#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: ftrace - function profiling [ ! -f function_profile_enabled ] && exit_unsupported : "Enable function profile" echo 1 > function_profile_enabled : "Profile must be updated" cp trace_stat/function0 $TMPDIR/ ( echo "forked"; sleep 1 ) : "diff returns 0 if there is no difference" ! diff trace_stat/function0 $TMPDIR/function0 echo 0 > function_profile_enabled : "Profile must NOT be updated" cp trace_stat/function0 $TMPDIR/ ( echo "forked"; sleep 1 ) : "diff returns 0 if there is no difference" diff trace_stat/function0 $TMPDIR/function0