public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] kunit: Add dynamically-extending log
@ 2023-08-09 15:54 Richard Fitzgerald
  2023-08-09 15:54 ` [PATCH v3 1/7] kunit: Replace fixed-size log with dynamically-extending buffer Richard Fitzgerald
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Richard Fitzgerald @ 2023-08-09 15:54 UTC (permalink / raw)
  To: brendan.higgins, davidgow, rmoar
  Cc: linux-kselftest, kunit-dev, linux-kernel, patches,
	Richard Fitzgerald

Replace the original fixed-size log buffer with a dynamically-
extending log.

Patch 1 provides the basic implementation. The following patches
add test cases, support for logging long strings, and an optimization
to the string formatting that is now more thoroughly testable.

Changes since v2:
- Fixed uninitialized string bug in get_concatenated_log().
- Moved get_concatenated_log() into first patch so that
  kunit_log_newline_test() dumps the entire log on error.
- Moved kunit_log_frag_sized_line_test() to the correct point in
  the chain, after the change that it depends on. Also log another
  line after the long line to test that the log extends correctly.
- Added kunit_log_init_frag_test() to test kunit_init_log_frag()
  instead of testing it as part of every other test.

Richard Fitzgerald (7):
  kunit: Replace fixed-size log with dynamically-extending buffer
  kunit: kunit-test: Add test cases for extending log buffer
  kunit: Handle logging of lines longer than the fragment buffer size
  kunit: kunit-test: Test logging a line that exactly fills a fragment
  kunit: kunit-test: Add test cases for logging very long lines
  kunit: kunit-test: Add test of logging only a newline
  kunit: Don't waste first attempt to format string in
    kunit_log_append()

 include/kunit/test.h   |  25 ++-
 lib/kunit/debugfs.c    |  65 ++++++--
 lib/kunit/kunit-test.c | 339 ++++++++++++++++++++++++++++++++++++++++-
 lib/kunit/test.c       | 127 ++++++++++++---
 4 files changed, 507 insertions(+), 49 deletions(-)

-- 
2.30.2

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2023-08-11  8:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 15:54 [PATCH v3 0/7] kunit: Add dynamically-extending log Richard Fitzgerald
2023-08-09 15:54 ` [PATCH v3 1/7] kunit: Replace fixed-size log with dynamically-extending buffer Richard Fitzgerald
2023-08-09 21:10   ` Rae Moar
2023-08-10 14:00     ` Richard Fitzgerald
2023-08-09 15:54 ` [PATCH v3 2/7] kunit: kunit-test: Add test cases for extending log buffer Richard Fitzgerald
2023-08-09 21:10   ` Rae Moar
2023-08-10 14:18     ` Richard Fitzgerald
2023-08-09 15:54 ` [PATCH v3 3/7] kunit: Handle logging of lines longer than the fragment buffer size Richard Fitzgerald
2023-08-10 14:38   ` David Gow
2023-08-10 15:09     ` Richard Fitzgerald
2023-08-11  8:27       ` David Gow
2023-08-10 22:41     ` Rae Moar
2023-08-09 15:54 ` [PATCH v3 4/7] kunit: kunit-test: Test logging a line that exactly fills a fragment Richard Fitzgerald
2023-08-09 21:22   ` Rae Moar
2023-08-10 14:24     ` Richard Fitzgerald
2023-08-09 15:54 ` [PATCH v3 5/7] kunit: kunit-test: Add test cases for logging very long lines Richard Fitzgerald
2023-08-10 22:58   ` Rae Moar
2023-08-09 15:54 ` [PATCH v3 6/7] kunit: kunit-test: Add test of logging only a newline Richard Fitzgerald
2023-08-10 23:02   ` Rae Moar
2023-08-09 15:54 ` [PATCH v3 7/7] kunit: Don't waste first attempt to format string in kunit_log_append() Richard Fitzgerald
2023-08-10 23:53   ` Rae Moar
2023-08-11  8:27   ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox