* [PATCH] papr_vpd.c: calling devfd before get_system_loc_code
@ 2024-01-22 11:45 R Nageswara Sastry
0 siblings, 0 replies; 3+ messages in thread
From: R Nageswara Sastry @ 2024-01-22 11:45 UTC (permalink / raw)
To: linux-kselftest, shuah, skhan; +Cc: rnsastry
Calling get_system_loc_code before checking devfd and errno - fails the test
when the device is not available, expected a SKIP.
Change the order of 'SKIP_IF_MSG' correctly SKIP when the /dev/papr-vpd device
is not available.
with out patch: Test FAILED on line 271
with patch: [SKIP] Test skipped on line 266: /dev/papr-vpd not present
Signed-off-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
---
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c | 4 ++--
1 file 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);
--
2.37.1 (Apple Git-137.1)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] papr_vpd.c: calling devfd before get_system_loc_code
2024-01-31 13:08 R Nageswara Sastry
@ 2024-02-15 12:57 ` Michael Ellerman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2024-02-15 12:57 UTC (permalink / raw)
To: linux-kselftest, shuah, skhan, npiggin, christophe.leroy,
nathanl, linuxppc-dev, linux-kernel, R Nageswara Sastry
On Wed, 31 Jan 2024 18:38:59 +0530, R Nageswara Sastry wrote:
> Calling get_system_loc_code before checking devfd and errno - fails the test
> when the device is not available, expected a SKIP.
> Change the order of 'SKIP_IF_MSG' correctly SKIP when the /dev/papr-vpd device
> is not available.
>
> with out patch: Test FAILED on line 271
> with patch: [SKIP] Test skipped on line 266: /dev/papr-vpd not present
>
> [...]
Applied to powerpc/fixes.
[1/1] papr_vpd.c: calling devfd before get_system_loc_code
https://git.kernel.org/powerpc/c/f09696279b5dd1770a3de2e062f1c5d1449213ff
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] papr_vpd.c: calling devfd before get_system_loc_code
@ 2024-01-31 13:08 R Nageswara Sastry
2024-02-15 12:57 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: R Nageswara Sastry @ 2024-01-31 13:08 UTC (permalink / raw)
To: linux-kselftest, shuah, skhan, mpe, npiggin, christophe.leroy,
nathanl, linuxppc-dev, linux-kernel
Cc: rnsastry
Calling get_system_loc_code before checking devfd and errno - fails the test
when the device is not available, expected a SKIP.
Change the order of 'SKIP_IF_MSG' correctly SKIP when the /dev/papr-vpd device
is not available.
with out patch: Test FAILED on line 271
with patch: [SKIP] Test skipped on line 266: /dev/papr-vpd not present
Signed-off-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
---
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c | 4 ++--
1 file 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);
--
2.37.1 (Apple Git-137.1)
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-15 12:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22 11:45 [PATCH] papr_vpd.c: calling devfd before get_system_loc_code R Nageswara Sastry
2024-01-31 13:08 R Nageswara Sastry
2024-02-15 12:57 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.