* [PATCH] selftests/resctrl: Fix incorrect error return on test complete
@ 2023-04-14 16:43 Reinette Chatre
2023-04-14 17:16 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Reinette Chatre @ 2023-04-14 16:43 UTC (permalink / raw)
To: shuah, skhan
Cc: ilpo.jarvinen, tan.shaopeng, fenghua.yu, linux-kselftest,
linux-kernel
An error snuck in between two recent conflicting changes:
Until recently ->setup() used negative values to indicate
normal test termination. This was changed in
commit fa10366cc6f4 ("selftests/resctrl: Allow ->setup() to return
errors") that transitioned ->setup() to use negative values
to indicate errors and a new END_OF_TESTS to indicate normal
termination.
commit 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100%
allocation on first run in MBM test") continued to use
negative return to indicate normal test termination.
Fix mbm_setup() to use the new END_OF_TESTS to indicate
error-free test termination.
Fixes: 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test")
Reported-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/lkml/bb65cce8-54d7-68c5-ef19-3364ec95392a@linux.intel.com/
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
Hi Shuah,
Apologies, this error snuck in between the two series
merged into kselftest's next this week.
tools/testing/selftests/resctrl/mbm_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c
index 146132fa986d..538d35a6485a 100644
--- a/tools/testing/selftests/resctrl/mbm_test.c
+++ b/tools/testing/selftests/resctrl/mbm_test.c
@@ -98,7 +98,7 @@ static int mbm_setup(int num, ...)
/* Run NUM_OF_RUNS times */
if (p->num_of_runs >= NUM_OF_RUNS)
- return -1;
+ return END_OF_TESTS;
/* Set up shemata with 100% allocation on the first run. */
if (p->num_of_runs == 0)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/resctrl: Fix incorrect error return on test complete
2023-04-14 16:43 [PATCH] selftests/resctrl: Fix incorrect error return on test complete Reinette Chatre
@ 2023-04-14 17:16 ` Shuah Khan
2023-04-14 17:29 ` Reinette Chatre
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2023-04-14 17:16 UTC (permalink / raw)
To: Reinette Chatre, shuah
Cc: ilpo.jarvinen, tan.shaopeng, fenghua.yu, linux-kselftest,
linux-kernel, Shuah Khan
On 4/14/23 10:43, Reinette Chatre wrote:
> An error snuck in between two recent conflicting changes:
> Until recently ->setup() used negative values to indicate
> normal test termination. This was changed in
> commit fa10366cc6f4 ("selftests/resctrl: Allow ->setup() to return
> errors") that transitioned ->setup() to use negative values
> to indicate errors and a new END_OF_TESTS to indicate normal
> termination.
>
> commit 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100%
> allocation on first run in MBM test") continued to use
> negative return to indicate normal test termination.
>
> Fix mbm_setup() to use the new END_OF_TESTS to indicate
> error-free test termination.
>
> Fixes: 42e3b093eb7c ("selftests/resctrl: Fix set up schemata with 100% allocation on first run in MBM test")
> Reported-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> Link: https://lore.kernel.org/lkml/bb65cce8-54d7-68c5-ef19-3364ec95392a@linux.intel.com/
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> ---
> Hi Shuah,
>
> Apologies, this error snuck in between the two series
> merged into kselftest's next this week.
>
No worries. This is now applied on top of others to linux-kselftest
net.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/resctrl: Fix incorrect error return on test complete
2023-04-14 17:16 ` Shuah Khan
@ 2023-04-14 17:29 ` Reinette Chatre
0 siblings, 0 replies; 3+ messages in thread
From: Reinette Chatre @ 2023-04-14 17:29 UTC (permalink / raw)
To: Shuah Khan, shuah
Cc: ilpo.jarvinen, tan.shaopeng, fenghua.yu, linux-kselftest,
linux-kernel
On 4/14/2023 10:16 AM, Shuah Khan wrote:
>
> No worries. This is now applied on top of others to linux-kselftest
> net.
Thank you very much Shuah.
Reinette
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-14 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 16:43 [PATCH] selftests/resctrl: Fix incorrect error return on test complete Reinette Chatre
2023-04-14 17:16 ` Shuah Khan
2023-04-14 17:29 ` Reinette Chatre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox