]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
selftests/powerpc: Do not fail with reschedule
authorBreno Leitao <leitao@debian.org>
Wed, 12 Sep 2018 20:31:05 +0000 (17:31 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:17:04 +0000 (13:17 +0100)
commitf7055161a0261bd5f526e1994145ff9e97db3581
tree3555e41190e25b5b2a8d965dbd289c576ae36cf1
parentc1cc43f356667dfcfff6188a7f1da93978f11e9a
selftests/powerpc: Do not fail with reschedule

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 44d947eff19d64384efc06069509db7a0a1103b0 ]

There are cases where the test is not expecting to have the transaction
aborted, but, the test process might have been rescheduled, either in the
OS level or by KVM (if it is running on a KVM guest machine). The process
reschedule will cause a treclaim/recheckpoint which will cause the
transaction to doom, aborting the transaction as soon as the process is
rescheduled back to the CPU. This might cause the test to fail, but this is
not a failure in essence.

If that is the case, TEXASR[FC] is indicated with either
TM_CAUSE_RESCHEDULE or TM_CAUSE_KVM_RESCHEDULE for KVM interruptions.

In this scenario, ignore these two failures and avoid the whole test to
return failure.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Gustavo Romero <gromero@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
tools/testing/selftests/powerpc/tm/tm-unavailable.c
tools/testing/selftests/powerpc/tm/tm.h