selftests/powerpc: Add VF recovery tests
authorOliver O'Halloran <oohall@gmail.com>
Tue, 3 Nov 2020 04:45:03 +0000 (15:45 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 31 Jan 2021 11:35:47 +0000 (22:35 +1100)
commit38132cc0e5a6b22b04fac2e4df25c59435fcd6de
tree637a6993c6711af7462efc03f8558a7740171473
parentd6749ccba7ff86f99b4672e50db871487ba69f19
selftests/powerpc: Add VF recovery tests

The basic EEH test ignores VFs since we the way the eeh_dev_break debugfs
interface works means that if multiple VFs are enabled we may cause errors
on all them them. However, we can work around that by only enabling a
single VF at a time.

This patch adds some infrastructure for finding SR-IOV capable devices and
enabling / disabling VFs so we can exercise the VF specific EEH recovery
paths. Two new tests are added, one for testing EEH aware devices and one
for EEH un-aware VFs.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201103044503.917128-3-oohall@gmail.com
tools/testing/selftests/powerpc/eeh/eeh-functions.sh
tools/testing/selftests/powerpc/eeh/eeh-vf-aware.sh [new file with mode: 0755]
tools/testing/selftests/powerpc/eeh/eeh-vf-unaware.sh [new file with mode: 0755]