lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGS_qxpotikOpURnnx5mVtormgEbkn7xp5Hi5FScnODa5P+_fg@mail.gmail.com>
Date:   Mon, 11 Jul 2022 07:41:53 -0700
From:   Daniel Latypov <dlatypov@...gle.com>
To:     José Expósito <jose.exposito89@...il.com>
Cc:     jikos@...nel.org, benjamin.tissoires@...hat.com, spbnick@...il.com,
        j.witteveen@...il.com, stefanberzl@...il.com,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        kunit-dev@...glegroups.com
Subject: Re: [PATCH 1/7] HID: uclogic: KUnit best practices and naming conventions

On Sun, Jul 10, 2022 at 10:51 AM José Expósito
<jose.exposito89@...il.com> wrote:
>
> The KUnit documentation [1] suggests allowing build tests as a module.
>
> In addition, it is recommended [2] to use snake case names for
> kunit_suite and test cases.

Test parameters don't fall under "test cases", though I see how that
can be construed as such.
I don't think anyone has stated any preference to standardize the naming there.

We currently have parameterized tests using spaces and punctuation, e.g.
ok 7 - binfmt_elf
    # Subtest: ext4_inode_test
    1..1
        # Subtest: inode_test_xtimestamp_decoding
        ok 1 - 1901-12-13 Lower bound of 32bit < 0 timestamp, no extra bits
        ok 2 - 1969-12-31 Upper bound of 32bit < 0 timestamp, no extra bits
...
    ok 1 - mctp_test_fragment
        # Subtest: mctp_test_rx_input
        ok 1 - {1,a,8,0}
        ok 2 - {1,a,9,0}
        ok 3 - {2,a,8,0}

So I think the old names were more conventional.

>
> Change the Kconfig entry from bool to tristate and stick to the naming
> conventions to avoid style issues with future tests.
>
> Link: https://docs.kernel.org/dev-tools/kunit/style.html#test-kconfig-entries  [1]
> Link: https://www.kernel.org/doc/html/latest/dev-tools/kunit/style.html  [2]
> Signed-off-by: José Expósito <jose.exposito89@...il.com>

Everything else (renaming the suite and switching to tristate) sounds
good to me though.

Acked-by: Daniel Latypov <dlatypov@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ