1 #!/bin/bash 2 3 # SPDX-License-Identifier: GPL-2.0 4 5 # 6 # setup.sh of perf report test 7 # Author: Michael Petlan <mpetlan@redhat.com> 8 # 9 # Description: 10 # 11 # We need some sample data for perf-report testing 12 # 13 # 14 15 # include working environment 16 . ../common/init.sh 17 18 test -d "$HEADER_TAR_DIR" || mkdir -p "$HEADER_TAR_DIR" 19 20 SW_EVENT="cpu-clock" 21 22 $CMD_PERF record -asdg -e $SW_EVENT -o $CURRENT_TEST_DIR/perf.data -- $CMD_LONGER_SLEEP 2> $LOGS_DIR/setup.log 23 PERF_EXIT_CODE=$? 24 25 ../common/check_all_patterns_found.pl "$RE_LINE_RECORD1" "$RE_LINE_RECORD2" < $LOGS_DIR/setup.log 26 CHECK_EXIT_CODE=$? 27 28 print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "prepare the perf.data file" 29 TEST_RESULT=$? 30 31 print_overall_results $TEST_RESULT 32 exit $?
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.