mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: linux1394-devel@lists.sourceforge.net
Cc: sreekuttan2156239@gmail.com, mistermidi@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/13] firewire: core: add KUnit tests for config ROM parser and generator
Date: Thu, 3 Sep 2026 09:01:26 +0900	[thread overview]
Message-ID: <20260903000126.GC2393579@sakamocchi.jp> (raw)
In-Reply-To: <20260901134534.2386577-1-o-takashi@sakamocchi.jp>

Hi,

On Tue, Sep 01, 2026 at 10:45:21PM +0900, Takashi Sakamoto wrote:
> Hi,
> 
> (Resent because the previous email was sent to the wrong address...)
> 
> This series adds KUnit tests for the configuration ROM parser and
> generator in the core function.
> 
> The parser tests cover existing device quirks and malformed configuration
> ROMs, including out-of-bounds directory/leaf entries.
> 
> The generator tests cover AV/C and IIDC devices layouts, combinations of
> units, and invalid or oversized extension data.
> 
> The tests are intended to document existing behavior and provide regression
> coverage for the parser and generator.
> 
> The test execution samples:
> 
> ```
> $ python3 tools/testing/kunit/kunit.py run \
>   --kunitconfig=drivers/firewire/ \
>   'firewire-config-rom-*'
> [22:12:56] Configuring KUnit Kernel ...
> [22:12:56] Building KUnit Kernel ...
> Populating config with:
> $ make ARCH=um O=.kunit olddefconfig
> Building with:
> $ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=16
> [22:12:59] Starting KUnit Kernel (1/1)...
> [22:12:59] ============================================================
> Running tests with:
> $ .kunit/linux 'kunit.filter_glob=firewire-config-rom-*' kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
> [22:12:59] ======== firewire-config-rom-generator (4 subtests) ========
> [22:12:59] ================ test_config_rom_generator  ================
> [22:12:59] [PASSED] bare
> [22:12:59] [PASSED] with_avc_unit
> [22:12:59] [PASSED] with_iidc_unit
> [22:12:59] [PASSED] with_avc_and_iidc_unit
> [22:12:59] ============ [PASSED] test_config_rom_generator ============
> [22:12:59] [PASSED] add_descriptor_with_invalid_length
> [22:12:59] [PASSED] add_descriptor_with_invalid_data
> [22:12:59] [PASSED] add_descriptor_beyond_upper_limit
> [22:12:59] ========== [PASSED] firewire-config-rom-generator ==========
> [22:12:59] ========= firewire-config-rom-parser (2 subtests) ==========
> [22:12:59] ============= test_parser_with_regular_cases  ==============
> [22:12:59] [PASSED] detect_irm_is_1394_1995_only_quirk
> [22:12:59] [PASSED] detect_irm_ignores_bus_manager_quirk
> [22:12:59] [PASSED] detect_ack_packet_with_invalid_pending_code_quirk
> [22:12:59] [PASSED] detect_unstable_at_s400_quirk
> [22:12:59] ========= [PASSED] test_parser_with_regular_cases ==========
> [22:12:59] [PASSED] test_parser_with_overflowed_case
> [22:12:59] =========== [PASSED] firewire-config-rom-parser ============
> [22:12:59] ============================================================
> [22:12:59] Testing complete. Ran 12 tests: passed: 12
> [22:12:59] Elapsed time: 2.743s total, 0.001s configuring, 2.625s building, 0.085s running
> ```
> 
> Regards
> 
> 
> Takashi Sakamoto (13):
>   firewire: core: add KUnit test skeleton for config ROM parser and
>     generator
>   firewire: core: add test to detect irm-is-1394-1995-only quirk in
>     config ROM parser
>   firewire: core: add test to detect irm-ignores-bus-manager quirk in
>     config ROM parser
>   firewire: core: add test to detect
>     ack-packet-with-invalid-pending-code quirk in config ROM parser
>   firewire: core: add test to detect unstable-at-s400 quirk in config
>     ROM parser
>   firewire: core: add test to avoid excessive configuration ROM length
>   firewire: core: add test for root directory generation in config ROM
>     generator
>   firewire: core: add test to generate with AV/C unit in config ROM
>     generator
>   firewire: core: add test to generate with IIDC unit in config ROM
>     generator
>   firewire: core: add test to generate with both AV/C and IIDC units in
>     config ROM generator
>   firewire: core: add test for invalid length in config ROM generator
>   firewire: core: add invalid block test for config ROM generator
>   firewire: core: add test for beyond-boundary case in config ROM
>     generator
> 
>  drivers/firewire/.kunitconfig                |   1 +
>  drivers/firewire/Kconfig                     |  16 +
>  drivers/firewire/config-rom-generator-test.c | 407 +++++++++++++++++++
>  drivers/firewire/config-rom-parser-test.c    | 355 ++++++++++++++++
>  drivers/firewire/core-card.c                 |   4 +
>  drivers/firewire/core-device.c               |   4 +
>  drivers/firewire/core-transaction.c          |   4 +
>  7 files changed, 791 insertions(+)
>  create mode 100644 drivers/firewire/config-rom-generator-test.c
>  create mode 100644 drivers/firewire/config-rom-parser-test.c

Applied to for-next branch.


Regards

Takashi Sakamoto

      parent reply	other threads:[~2026-09-03  0:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 13:45 Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 01/13] firewire: core: add KUnit test skeleton " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 02/13] firewire: core: add test to detect irm-is-1394-1995-only quirk in config ROM parser Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 03/13] firewire: core: add test to detect irm-ignores-bus-manager " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 04/13] firewire: core: add test to detect ack-packet-with-invalid-pending-code " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 05/13] firewire: core: add test to detect unstable-at-s400 " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 06/13] firewire: core: add test to avoid excessive configuration ROM length Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 07/13] firewire: core: add test for root directory generation in config ROM generator Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 08/13] firewire: core: add test to generate with AV/C unit " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 09/13] firewire: core: add test to generate with IIDC " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 10/13] firewire: core: add test to generate with both AV/C and IIDC units " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 11/13] firewire: core: add test for invalid length " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 12/13] firewire: core: add invalid block test for " Takashi Sakamoto
2026-09-01 13:45 ` [PATCH 13/13] firewire: core: add test for beyond-boundary case in " Takashi Sakamoto
2026-09-03  0:01 ` Takashi Sakamoto [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260903000126.GC2393579@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=mistermidi@gmail.com \
    --cc=sreekuttan2156239@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®