On Wed, Feb 19, 2025 at 3:41 PM Rasmus Villemoes
wrote:
>
> On Fri, 14 Feb 2025 at 22:53, Tamir Duberstein wrote:
> >
> > This improves the failure output by pointing to the failing line at the
> > top level of the test, e.g.:
> > # test_number: EXPECTATION FA
ce '
# test_number: EXPECTATION FAILED at lib/printf_kunit.c:142
lib/printf_kunit.c:167: kvasprintf(..., "%#-12x", ...) returned '0x1234abcd
', expected '0x1234abce '
Signed-off-by: Tamir Duberstein
---
lib/tests/printf_kunit.c | 60 +++
Move all tests into `printf_test_cases`. This gives us nicer output in
the event of a failure.
Combine `plain_format` and `plain_hash` into `hash_pointer` since
they're testing the same scenario.
Signed-off-by: Tamir Duberstein
---
lib/tests/printf_kunit.c
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Signed-off-by: Tamir Duberstein
---
Documentation/core-api/printk-formats.r
[0].
Link:
https://lore.kernel.org/all/20250204-scanf-kunit-convert-v3-0-386d7c3ee...@gmail.com/T/#u
[0]
Signed-off-by: Tamir Duberstein
---
Changes in v4:
- Add patch "implicate test line in failure messages".
- Rebase on linux-next, move scanf_kunit.c into lib/tests/.
- Link to v3:
https
On Fri, Feb 14, 2025 at 4:47 PM Rasmus Villemoes
wrote:
>
> On Fri, 14 Feb 2025 at 17:53, Tamir Duberstein wrote:
> >
> > On Fri, Feb 14, 2025 at 11:02 AM Andy Shevchenko
> > wrote:
> > >
> > > On Fri, Feb 14, 2025 at 04:35:12PM +0100, Petr Mladek w
On Fri, Feb 14, 2025 at 11:02 AM Andy Shevchenko
wrote:
>
> On Fri, Feb 14, 2025 at 04:35:12PM +0100, Petr Mladek wrote:
> > On Mon 2025-02-10 13:23:21, Tamir Duberstein wrote:
> > > This is one of just 3 remaining "Test Module" kselftests (the others
> >
Move all tests into `printf_test_cases`. This gives us nicer output in
the event of a failure.
Combine `plain_format` and `plain_hash` into `hash_pointer` since
they're testing the same scenario.
Signed-off-by: Tamir Duberstein
---
lib/printf_kunit.c
Convert the printf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Signed-off-by: Tamir Duberstein
---
Documentation/core-api/printk-formats
[0].
Link:
https://lore.kernel.org/all/20250204-scanf-kunit-convert-v3-0-386d7c3ee...@gmail.com/T/#u
[0]
Signed-off-by: Tamir Duberstein
---
Changes in v3:
- Remove extraneous trailing newlines from failure messages.
- Replace `pr_warn` with `kunit_warn`.
- Drop arch changes.
- Remove KUnit boiler
10 matches
Mail list logo