runpwtests_exclusive04.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. export TCID="Power_Management_exclusive04"
  21. export TST_TOTAL=2
  22. . test.sh
  23. . pm_include.sh
  24. # Checking test environment
  25. check_kervel_arch
  26. tst_require_cmds python3
  27. hyper_threaded=$(is_hyper_threaded)
  28. multi_socket=$(is_multi_socket)
  29. if [ $hyper_threaded -ne 0 -o $multi_socket -ne 0 ]; then
  30. tst_brkm TCONF "System is not a multi socket & hyper-threaded"
  31. fi
  32. # Verify threads consolidation stops when sched_smt is
  33. # disabled in HT systems.
  34. # Vary only sched_smt from 1 to 0 when workload is running
  35. # and ensure that tasks do not consolidate to single core
  36. # when sched_smt is set to 0.
  37. if pm_cpu_consolidation.py -v -t 1; then
  38. tst_resm TPASS "CPU consolidation test by varying sched_smt from 1 to 0"
  39. else
  40. tst_resm TFAIL "CPU consolidation test by varying sched_smt from 1 to 0"
  41. fi
  42. # Vary only sched_smt from 2 to 0 when workload is running
  43. # and ensure that tasks do not consolidate to single core
  44. # when sched_smt is set to 0.
  45. if pm_cpu_consolidation.py -v -t 2; then
  46. tst_resm TPASS "CPU consolidation test by varying sched_smt from 2 to 0"
  47. else
  48. tst_resm TFAIL "CPU consolidation test by varying sched_smt from 2 to 0"
  49. fi
  50. tst_exit