diff options
author | R Nageswara Sastry <rnsastry@linux.ibm.com> | 2024-01-31 14:08:59 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2024-02-05 12:47:31 +0100 |
commit | f09696279b5dd1770a3de2e062f1c5d1449213ff (patch) | |
tree | ff3e8649d23a97e11ada054359c045eb87f08604 /tools | |
parent | powerpc/64: Set task pt_regs->link to the LR value on scv entry (diff) | |
download | linux-f09696279b5dd1770a3de2e062f1c5d1449213ff.tar.xz linux-f09696279b5dd1770a3de2e062f1c5d1449213ff.zip |
selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code()
Calling get_system_loc_code before checking devfd and errno fails the test
when the device is not available, the expected behaviour is a SKIP.
Change the order of 'SKIP_IF_MSG' to correctly SKIP when the /dev/
papr-vpd device is not available.
Test output before:
Test FAILED on line 271
Test output after:
[SKIP] Test skipped on line 266: /dev/papr-vpd not present
Signed-off-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240131130859.14968-1-rnsastry@linux.ibm.com
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c b/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c index 98cbb9109ee6..505294da1b9f 100644 --- a/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c +++ b/tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c @@ -263,10 +263,10 @@ static int papr_vpd_system_loc_code(void) off_t size; int fd; - SKIP_IF_MSG(get_system_loc_code(&lc), - "Cannot determine system location code"); SKIP_IF_MSG(devfd < 0 && errno == ENOENT, DEVPATH " not present"); + SKIP_IF_MSG(get_system_loc_code(&lc), + "Cannot determine system location code"); FAIL_IF(devfd < 0); |