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] [day] [month] [year] [list]
Message-ID: <CABVgOSmwVL-eX7RFJygP1ys6xa9XnGrfd2N5vB+_kw-FTJpAgQ@mail.gmail.com>
Date: Tue, 18 Feb 2025 15:29:26 +0800
From: David Gow <davidgow@...gle.com>
To: Brendan Jackman <jackmanb@...gle.com>
Cc: Brendan Higgins <brendan.higgins@...ux.dev>, Rae Moar <rmoar@...gle.com>, 
	linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kunit: tool: Build GDB scripts

On Tue, 21 Jan 2025 at 21:01, Brendan Jackman <jackmanb@...gle.com> wrote:
>
> Following a similar rationale as commit e4835f1da425f ("kunit: tool:
> Build compile_commands.json"), make a common developer tool available by
> default for KUnit users.
>
> Compared to compile_commands.json, there is a little more work to be
> done to build the GDB scripts. Is it enough to affect development cycle
> duration? Unscientific evaluation:
>
> rm -rf .kunit; time tools/testing/kunit/kunit.py build --kunitconfig ./lib/kunit/.kunitconfig --jobs 96
>
> Without this patch it took 14.77s, with this patch it took 14.83. So,
> although `make scripts_gdb` is pretty slow, presumably most of that is
> just the overhead of running Kbuild at all, actually building the
> scripts is approximately free.
>
> Note also, to actually get the GDB scripts the user needs to enable
> CONFIG_SCRIPTS_GDB, but building the scripts_gdb target without that is
> still harmless.
>
> Signed-off-by: Brendan Jackman <jackmanb@...gle.com>
> ---

I'm happy with this for now, particularly since we're already doing
this for compile_commands.json, but I also think that this is a
symptom of the KUnit configuration story being insufficient. Not
really a problem for scripts_gdb, for which (as you mention)
CONFIG_SCRIPTS_GDB still needs to be set, but it'd be nice to support
this in a more generic way going forward. (The qemu_config python
scripts come close, but the .kunitconfig files definitely won't.)

Regardless, this is a distinct improvement for now, so:

Reviewed-by: David Gow <davidgow@...gle.com>

Cheers,
-- David

>  tools/testing/kunit/kunit_kernel.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
> index e76d7894b6c5195ece49f0d8c7ac35130df428a9..33b5f7351cbb5d0be240cb52db2bc1fa94aeb75e 100644
> --- a/tools/testing/kunit/kunit_kernel.py
> +++ b/tools/testing/kunit/kunit_kernel.py
> @@ -72,8 +72,8 @@ class LinuxSourceTreeOperations:
>                         raise ConfigError(e.output.decode())
>
>         def make(self, jobs: int, build_dir: str, make_options: Optional[List[str]]) -> None:
> -               command = ['make', 'all', 'compile_commands.json', 'ARCH=' + self._linux_arch,
> -                          'O=' + build_dir, '--jobs=' + str(jobs)]
> +               command = ['make', 'all', 'compile_commands.json', 'scripts_gdb',
> +                          'ARCH=' + self._linux_arch, 'O=' + build_dir, '--jobs=' + str(jobs)]
>                 if make_options:
>                         command.extend(make_options)
>                 if self._cross_compile:
>
> ---
> base-commit: 521d60e196ecb215f425e04e9ab33e02beaffbe3
> change-id: 20250121-kunit-gdb-b27315b4f2d8
>
> Best regards,
> --
> Brendan Jackman <jackmanb@...gle.com>
>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5294 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ