Re: [PATCH] lib: use of kunit in test_parman.c

From
David Gow <hidden>
Date
2021-07-28 01:37:54
Also in
linux-kselftest, lkml
Reply to
José Aquiles Guedes de Rezende, 2021-07-27
On Wed, Jul 28, 2021 at 7:04 AM José Aquiles Guedes de Rezende
[off-list ref] wrote:
Convert the parman test module to use the KUnit test framework.
This makes thetest clearer by leveraging KUnit's assertion macros
and test case definitions,as well as helps standardize on a testing framework.

Co-developed-by: Matheus Henrique de Souza Silva <redacted>
Signed-off-by: Matheus Henrique de Souza Silva <redacted>
Signed-off-by: José Aquiles Guedes de Rezende <redacted>
---
Thanks for porting this! A few more notes from the KUnit side.
 lib/test_parman.c | 145 +++++++++++++++++++---------------------------
 1 file changed, 60 insertions(+), 85 deletions(-)
This seems to be missing changes to lib/Kconfig.debug: you'll want to
modify the TEST_PARMAN config item to
- depend on KUNIT
- only appear if !KUNIT_ALL_TESTS
- default KUNIT_ALL_TESTS

It might also be nice to:
- select PARMAN (it's otherwise extremely unlikely a config will
actually pick up the test)
- maybe rename TEST_PARMAN to PARMAN_KUNIT_TEST (this is optional,
since this is a port of an existing test, but does make it clearer, so
it really depends on what existing usage looks like)
quoted hunk ↗ jump to hunk
diff --git a/lib/test_parman.c b/lib/test_parman.c
index 35e32243693c..bd5010f0a412 100644
--- a/lib/test_parman.c
+++ b/lib/test_parman.c
The rest of this looks okay to me, but you should check out Daniel's
comments in his email, too.

Cheers,
-- David
Thread (4 messages) 4 messages, 4 authors, last reply 2021-07-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help