]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftest/cgroup: Fix test_cpuset_prs.sh problems reported by test robot
authorWaiman Long <longman@redhat.com>
Mon, 17 Jun 2024 14:39:42 +0000 (10:39 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 19 Jun 2024 17:37:37 +0000 (07:37 -1000)
commit43ee40145380ba8854c731180b125e24b34fc006
tree06ef6c9898415b3750fb476320e14ec26d9af35c
parentccac8e8de99cbcf5e7f53251ebce917bf7bcc29c
selftest/cgroup: Fix test_cpuset_prs.sh problems reported by test robot

The test robot reported two different problems when running the
test_cpuset_prs.sh test.

 # ./test_cpuset_prs.sh: line 106: echo: write error: Input/output error
 #  :
 # Effective cpus changed to 0-1,4-7 after test 4!

The write error is caused by writing to /dev/console. It looks like
some systems may not have /dev/console configured or in a writeable
state. Fix this by checking the existence of /dev/console before
attempting to write it.

After the completion of each test run, the script will check if the
cpuset state is reset back to the original state. That usually takes a
while to happen. The test script inserts some artificial delay to make
sure that the reset has completed. The current setting is about 80ms.
That may not be enough in some cases especially if the test system is
slow. Double it to 160ms to minimize the chance of this type of failure.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202406141712.dbbaa8fd-oliver.sang@intel.com
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_cpuset_prs.sh