1#! /bin/sh 2# 3# Copyright (c) International Business Machines Corp., 2001 4# Author: Nageswara R Sastry <nasastry@in.ibm.com> 5# 6# This program is free software; you can redistribute it and#or modify 7# it under the terms of the GNU General Public License as published by 8# the Free Software Foundation; either version 2 of the License, or 9# (at your option) any later version. 10# 11# This program is distributed in the hope that it will be useful, but 12# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 13# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14# for more details. 15# 16# You should have received a copy of the GNU General Public License 17# along with this program; if not, write to the Free Software Foundation, 18# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19# 20 21export TCID="Power_Management_exclusive05" 22export TST_TOTAL=2 23 24. test.sh 25. pm_include.sh 26 27# Checking test environment 28check_arch 29 30max_sched_mc=2 31max_sched_smt=2 32 33tst_require_cmds python3 34 35hyper_threaded=$(is_hyper_threaded) 36multi_socket=$(is_multi_socket) 37multi_core=$(is_multi_core) 38if [ $multi_socket -ne 0 -o $multi_core -ne 0 -o \ 39 $hyper_threaded -ne 0 ]; then 40 tst_brkm TCONF "System is not a multi socket & multi core" \ 41 "& hyper-threaded" 42fi 43 44# Verify ILB runs in same package as workload. 45RC=0 46for sched_mc in `seq 1 $max_sched_mc`; do 47 if [ $sched_mc -eq 2 ]; then 48 work_load="kernbench" 49 else 50 work_load="ebizzy" 51 fi 52 53 pm_ilb_test.py -c $sched_mc -w $work_load 54 if [ $? -eq 0 ]; then 55 echo "Test PASS: ILB & workload in same package for" \ 56 "sched_mc=$sched_mc" 57 else 58 RC=1 59 echo "Test FAIL: ILB & workload did not run in same package" \ 60 "for sched_mc=$sched_mc. Ensure CONFIG_NO_HZ is set" 61 fi 62done 63if [ $RC -eq 0 ]; then 64 tst_resm TPASS "ILB & workload test in same package for sched_mc" 65else 66 tst_resm TFAIL "ILB & workload test in same package for sched_mc" 67fi 68 69RC=0 70for sched_mc in `seq 1 $max_sched_mc`; do 71 if [ $sched_mc -eq 2 ]; then 72 work_load="kernbench" 73 else 74 work_load="ebizzy" 75 fi 76 for sched_smt in `seq 1 $max_sched_smt`; do 77 pm_ilb_test.py -c $sched_mc -t sched_smt -w $work_load 78 if [ $? -eq 0 ]; then 79 echo "Test PASS: ILB & workload in same package for" \ 80 "sched_mc=$sched_mc & sched_smt=$sched_smt" 81 else 82 RC=1 83 echo "Test FAIL: ILB & workload did not execute in" \ 84 "same package for sched_mc=$sched_mc &" \ 85 "sched_smt=$sched_smt. Ensure CONFIG_NO_HZ is set" 86 fi 87 done 88done 89if [ $RC -eq 0 ]; then 90 tst_resm TPASS "ILB & workload test in same package for" \ 91 "sched_mc & sched_smt" 92else 93 tst_resm TFAIL "ILB & workload test in same package for" \ 94 "sched_mc & sched_smt" 95fi 96 97tst_exit 98