From nobody Fri Dec 19 21:46:58 2025 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C66C61F2C3D for ; Tue, 21 Jan 2025 13:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737464513; cv=none; b=oV5ktj8bJtiaviTc61sUUNQOzGu8hWAIjtPCePig7hqO+tjNrOR/5/R9Hf1rc3A1E4YW5vd2vanFpFak8QV2kaadPbZxWCzEHAtxAGIm9h2D62nyOWKiC4ahd0qd3T1G3vxQnSyGpU4WMkgK9m74jk2My+YOzIi6kh7FxY2e+o4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737464513; c=relaxed/simple; bh=DiF/6MRNSqtu/NMaiM5rJ3sJyriG7fXeMACCzfM0I1U=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=XuIoIewF/G+5RTywFg1GkwB8VSArkFpF17/hNNTbxvtVGc019GDyUFj2EsvOZf1B5ZKIWEB9emjuQbRfHCxW+yZr2zGy1FMI6hv6p2MR4WmR+Kfc+EioXwkxShwE8NafdeAZckTsREtULChxe6UTuumZvzHQRo3KjnjJ/+hpVkU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aZcSJcd4; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aZcSJcd4" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-43625ceae52so30392855e9.0 for ; Tue, 21 Jan 2025 05:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1737464510; x=1738069310; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=fm5t1lI2UPBaFBWtilwaxYV7ic27Oc43GlyrqP2MvXU=; b=aZcSJcd4r+PWq2oVekHTB49DaFSpXSOHQfJ9xWMEuvnyYwdpvuFSXM08ragmMKWbRZ tIBbqxGwrFww6iGU3Sh0vPTjaPk0CY5SPT5rjxXc+bg8FwT0LAf1yBqFjE6XHwainJUr 1dzRarLttJYDWUVhEJT9ePt8BBJ+XOFoFNlPJN/hT0+589ISF9HlaszBRsRqrXk8KYQ0 b2esllQ/7p7bxWuxRfwsAqA6o+/XnqdEfjBCZSqGoN7CevbLI2AYLgpoIqifaZkR9/eU XNPIAvkq4Lb0Y2MFYYD4VV6XIAjCSfCR06bmIA4ai5sdLQKVvJxWSkRrZ0u/D946tFWJ ucdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737464510; x=1738069310; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fm5t1lI2UPBaFBWtilwaxYV7ic27Oc43GlyrqP2MvXU=; b=RMCFMgXHsKWpzt39v6nnukHLnznd21QS/B5hrLfzBiqn9lLn+tbhmHfpdZZSKv4UDW YSbjdvdnCWMIJJOjXCmAMz8Nigk1DrC3SpzEdZTSGCIt9nUkBMC8SzfVlYsjkM9sDa9k D3ZiFS2PDOUmUkbVotLj5h0e6b0SXJa/pQYfeXo07accDSWgvBlhE9kADfDhiJGysn9h 6EVNj89wkiLi+DCAQqtazO4NBAF1qETnp7muH0aSS8iFfPQNlM46XxrNurBQX0HvrQqO m3gwHGXwFH7AUPRxIQiXROZ+HPNGW9Dm6cr5UB3i7a944uC0Z9zafivabYcnsqg6fKDN HwxQ== X-Forwarded-Encrypted: i=1; AJvYcCXPTz57GlIELCao/IWHXZ/MO8wHTcXcANIZ5quCM+/rZSR5Ss4CN8/27U4NaaGiPLdvNXUH9OiWJO3Kq9k=@vger.kernel.org X-Gm-Message-State: AOJu0YyMzFsQY/OdjQaTLlRoQa7PRd6VQvBgCNkVi5DeCIWDKgnEH15T xf5YGUVWyeULYdjLZcxWaQYvRrmLyPJ8AQmNnRABn5aeWxDaJe/MmBjjzSWzXtOxqy3FjqagcsM EmCfGqvlmCQ== X-Google-Smtp-Source: AGHT+IG+o36jM2cEd9lJJrOOUCpMYXZ/H+DXCi68zo+x1kyJD7yEg611HI6y0O6EjB8qfL0PLdUYeAUSjeOGzw== X-Received: from wmjk17.prod.google.com ([2002:a7b:c311:0:b0:434:f018:dd30]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4e06:b0:434:e8cf:6390 with SMTP id 5b1f17b1804b1-438913c6856mr155230785e9.6.1737464510170; Tue, 21 Jan 2025 05:01:50 -0800 (PST) Date: Tue, 21 Jan 2025 13:01:40 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIALOaj2cC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDQyND3ezSvMwS3fSUJN0kI3NjQ9MkkzSjFAsloPqCotS0zAqwWdGxtbU AeAaso1sAAAA= X-Change-Id: 20250121-kunit-gdb-b27315b4f2d8 X-Mailer: b4 0.15-dev Message-ID: <20250121-kunit-gdb-v1-1-faedfd0653ef@google.com> Subject: [PATCH] kunit: tool: Build GDB scripts From: Brendan Jackman To: Brendan Higgins , David Gow , Rae Moar Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, Brendan Jackman Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Reviewed-by: David Gow --- 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/kuni= t_kernel.py index e76d7894b6c5195ece49f0d8c7ac35130df428a9..33b5f7351cbb5d0be240cb52db2= bc1fa94aeb75e 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()) =20 def make(self, jobs: int, build_dir: str, make_options: Optional[List[str= ]]) -> None: - command =3D ['make', 'all', 'compile_commands.json', 'ARCH=3D' + self._l= inux_arch, - 'O=3D' + build_dir, '--jobs=3D' + str(jobs)] + command =3D ['make', 'all', 'compile_commands.json', 'scripts_gdb', + 'ARCH=3D' + self._linux_arch, 'O=3D' + build_dir, '--jobs=3D' + str(= jobs)] if make_options: command.extend(make_options) if self._cross_compile: --- base-commit: 521d60e196ecb215f425e04e9ab33e02beaffbe3 change-id: 20250121-kunit-gdb-b27315b4f2d8 Best regards, --=20 Brendan Jackman