From nobody Fri Dec 19 12:45:21 2025 Received: from mail-wm1-f73.google.com (mail-wm1-f73.google.com [209.85.128.73]) (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 9E0781E834E for ; Sun, 7 Dec 2025 02:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765073854; cv=none; b=NhdBgM2UXbXzgW/Wf0J95kREu5l+On4NwiuYz1uihn3WTUnQ8ovcvtx06OiCN1GzL9LrKw657xObza2949XM2vZlI+DHrX4TWx2nDjugur0cU7Pxh9Qd+vp5FMAyASbdYG1bW2s9v9/+6xi8xwURhjrG0j6V0lZgWyBHqIT0SKI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765073854; c=relaxed/simple; bh=ZeDEoEYw6cZZSaFsBUQAMSYy/zv0dV5vDroxVNh6NkQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=Ber0+iOxhuaedJiUfirQijXgGy5n8PK00V7ptMkOhLg/p0Ir0l8lIqETC79+sAkPcIG7KwvLQE26AABE0ri34LfbUu7dkl/ZrW7sSBOgEY5ws49m0t91us4lvKLsHt0hXspPPk6bbbWcV1kh1yAN2VEGMgTgU5Kj5f456fASrgc= 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=NleFqwVU; arc=none smtp.client-ip=209.85.128.73 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="NleFqwVU" Received: by mail-wm1-f73.google.com with SMTP id 5b1f17b1804b1-4792bd2c290so25176165e9.1 for ; Sat, 06 Dec 2025 18:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765073850; x=1765678650; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ZJGTtC/FtcaHp5tPN0jgECUq27SXr5JeYtrVcu1GDOY=; b=NleFqwVUzjwyd0t5m+ow9HJI5rINHT2hOUHbyJOQ6hmeErp2UaTYl3Cl7PkHyWowys UCm9RA77726lt4j6egHEnAKi9cP32DXAcUQYnr73iE5YS+6io1wF9wp6nJQEB19JrhNq smyn5bX5Qup0/0RRnxj02MtpAUXjcVrWTWmeljU/Ml66m1PD75oM9VfJ+G74t1VpXnMX gE3crutVEWq37SL2kvZAODh+sONHQSjDAaKsz6WouSzU6Kj1S+pSvMR0NG9afMf8jGHP 2NHEFvlpgEm2lTn8H9aEDHFvIt6Y4JTkpj2D7YuFSWvu712c5CJK6u6PTpoQkC8Dna0C lxig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765073850; x=1765678650; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZJGTtC/FtcaHp5tPN0jgECUq27SXr5JeYtrVcu1GDOY=; b=IqeVNa5ZGl4ukAsHBON4KiIbuJRZziL5bAh9YSRyvkLp0gJ+sgeZ2GV5qPRCMu/+RF ys+ay6kcNWM4ASehex+UAsqtRpW6yLh7ujTUoyvMTLU5P4jVd6EOkMbvQWDECOVwNqz6 ZHdk1tRNA2JIQuuJsryXXvxA8+Ocy6xzf5dgYXwhxixHfC5llikBNryy0Jem8fuj4l1L cXE2JFJ6wr8rY6Zs1HnqyxmwExt7Nos2ZJBAO6Aa3KCRbDXsURR+6tNzG06yruYsl06O //kgE5YEFAGA+dpluDFCrTlJ2gpz+A9mx6Fxt97Od5fQdNgvZwZaX788oy3TBLuKIjXI Rhrw== X-Forwarded-Encrypted: i=1; AJvYcCXAJ9D5HPW0mT8gz5I2KT5ldONYoqUmkB4pPtFL9a+j/sT17EpfDnUYpYUAwjEdsFojHcoA791sN9/WwzY=@vger.kernel.org X-Gm-Message-State: AOJu0YwKQnwSNUnUro77rEt8SMb7Ot2e3hN/u+IlWkdS7tGJaESWq/q8 WqB0Bbm10Ops3reFvP/UAh8uiF55wURKdFj04Qyu9z6ctDdjGqf8sHV9/vbFNf4l1oL1kilXYXs 4luaXCSp0EJW18g== X-Google-Smtp-Source: AGHT+IEQBDkYxcCvAzo4pRuQ0DhuSmH7DlNXfnOh7T87C07e/Lx1KAkFTaD82wMjH02A6+Z7KFbC+jadl0cCRw== X-Received: from wmoh18.prod.google.com ([2002:a05:600c:3152:b0:477:5ad9:149a]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:4e09:b0:471:1717:411 with SMTP id 5b1f17b1804b1-47939e378d2mr47889665e9.24.1765073849921; Sat, 06 Dec 2025 18:17:29 -0800 (PST) Date: Sun, 07 Dec 2025 02:17:10 +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=H4sIAKbjNGkC/x3MTQ5AMBBA4avIrE3SFvFzFbGoGkzIkBaRiLtrL L/Few8E8kwBmuQBTxcH3iRCpwm42cpEyEM0GGUKbVSJyyl84GjP9UDZcLfCDqnuB0dVXqlMQ0x 3TyPf/7bt3vcD5lx8CWYAAAA= X-Change-Id: 20251207-kunit-fault-no-panic-e9bdce848031 X-Mailer: b4 0.14.2 Message-ID: <20251207-kunit-fault-no-panic-v1-1-2ac932f26864@google.com> Subject: [PATCH] kunit: make FAULT_TEST default to n when PANIC_ON_OOPS 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 As describe in the help string, the user might want to disable these tests if they don't like to see stacktraces/BUG etc in their kernel log. However, if they enable PANIC_ON_OOPS, these tests also crash the machine, which it's safe to assume _almost_ nobody wants. One might argue that _absolutely_ nobody ever wants their kernel to crash so this should just be a hard dependency instead of a default. However, since this is rather special code that's anyway concerned with deliberately doing "bad" things, the normal rules don't seem to apply, hence prefer flexibility and allow users to set up a crashing Kconfig if they so choose. Signed-off-by: Brendan Jackman Reviewed-by: David Gow --- lib/kunit/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig index 50ecf55d2b9c8a82f2aff7a0b4156bd6179b0a2f..498cc51e493dc9a819e012b8082= fb765f25512b9 100644 --- a/lib/kunit/Kconfig +++ b/lib/kunit/Kconfig @@ -28,7 +28,7 @@ config KUNIT_FAULT_TEST bool "Enable KUnit tests which print BUG stacktraces" depends on KUNIT_TEST depends on !UML - default y + default !PANIC_ON_OOPS help Enables fault handling tests for the KUnit framework. These tests may trigger a kernel BUG(), and the associated stack trace, even when they --- base-commit: 7bc16e72ddb993d706f698c2f6cee694e485f557 change-id: 20251207-kunit-fault-no-panic-e9bdce848031 Best regards, --=20 Brendan Jackman