1#! /bin/sh 2 3########################################################################### 4## ## 5## Copyright (c) 2015, Red Hat Inc. ## 6## ## 7## This program is free software: you can redistribute it and/or modify ## 8## it under the terms of the GNU General Public License as published by ## 9## the Free Software Foundation, either version 3 of the License, or ## 10## (at your option) any later version. ## 11## ## 12## This program is distributed in the hope that it will be useful, ## 13## but WITHOUT ANY WARRANTY; without even the implied warranty of ## 14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## 15## GNU General Public License for more details. ## 16## ## 17## You should have received a copy of the GNU General Public License ## 18## along with this program. If not, see <http://www.gnu.org/licenses/>. ## 19## ## 20## Author: Li Wang <liwang@redhat.com> ## 21## ## 22########################################################################### 23## ## 24## Summary: check signal:signal_generate gives 2 more fields: grp res ## 25## ## 26## This testcase is writing for signal events change: ## 27## 6c303d3 tracing: let trace_signal_generate() report more info...## 28## 163566f tracing: send_sigqueue() needs trace_signal_generate() ## 29## ## 30########################################################################### 31 32export TCID="ftrace_regression02" 33export TST_TOTAL=1 34 35. ftrace_lib.sh 36 37ftrace_signal_test() 38{ 39 # Set envent 40 echo 'signal:signal_generate' > $TRACING_PATH/set_event 41 echo 1 > $TRACING_PATH/tracing_on 42 echo > $TRACING_PATH/trace 43 44 # just to generate trace 45 for i in $(seq 100); do 46 ls -l /proc > /dev/null 2>&1 47 done 48 49 grep -q 'grp=[0-9] res=[0-9]' $TRACING_PATH/trace 50 if [ $? -eq 0 ]; then 51 tst_resm TPASS "finished running the test." 52 else 53 tst_resm TFAIL "running the test failed, please check log message." 54 fi 55} 56 57tst_kvercmp 3 2 0 58if [ $? -eq 0 ]; then 59 tst_brkm TCONF "The test should be run in kernels >= 3.2.0 Skip the test..." 60fi 61 62ftrace_signal_test 63 64tst_exit 65