From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B9D1C54E5D for ; Tue, 19 Mar 2024 10:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=O+0xYLa+mRYKYH4/N/d+suSCNSe8joCW3KlI3lW0eHU=; b=21Y1/1H5/a6Vv5tq5biz8v6PR0 iJahZPA0QCowuDvHuTyCbLssJHJ9+UX/vAdq6rY6PZ5rf6EmNmy46D/pSsC9PM1V/tiodDvFBcbzh qd7Dqri/9ZjvWyfxTLgvW2eOs/RwzPZ6Hso1GqOhceBhjy4hiyUy9NGBrrWg2U6obbHXxpO4z1bQQ TnfnnGCe+kCL4DJ+8Vo4jTtMZbYeu/kot7mMkBWm/1c1x31er9/jTTEVtY6DI8+Ro8lGJnGV0a88o RVnfZB+wxvcuMAVLWdh10trw2UBs9konSytOiDUlQ/vNeElUhTrL6Xt06BA9kbREM/ZLU7VkaJ2Gt Bvaytk3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmX29-0000000CMZ9-0x8W; Tue, 19 Mar 2024 10:49:29 +0000 Received: from smtp-bc0a.mail.infomaniak.ch ([45.157.188.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmX24-0000000CMWR-0abq for linux-um@lists.infradead.org; Tue, 19 Mar 2024 10:49:26 +0000 Received: from smtp-4-0001.mail.infomaniak.ch (unknown [10.7.10.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4TzT4G1GLBzMq3Gc; Tue, 19 Mar 2024 11:49:18 +0100 (CET) Received: from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4TzT4D5thVzvGg; Tue, 19 Mar 2024 11:49:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1710845358; bh=titjicsS13zyLYpwVbjFKzsdWlMZsZ9iAVihS7vtrRU=; h=From:To:Cc:Subject:Date:From; b=Q7tT/TcJvK7xnZ0yNnH8RKseTWW7HMLg8r+H4B7xE+inCtDOxMj/yIS0gmUAS574p d1VT8nzN0WuOf/YgPmyMQPrKaMGUA+ZhjzVHME00J/VthdkIqwsIZEFZc80GJoFmyR cBePVO0WziY1W198OVLF5Mx5uDP8hjU07byNStJ4= From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Brendan Higgins , David Gow , Rae Moar , Shuah Khan Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Alan Maguire , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Ingo Molnar , James Morris , Kees Cook , Luis Chamberlain , "Madhavan T . Venkataraman" , Marco Pagani , Paolo Bonzini , Sean Christopherson , Stephen Boyd , Thara Gopinath , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , Zahra Tarkhani , kvm@vger.kernel.org, linux-hardening@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org Subject: [PATCH v3 0/7] Handle faults in KUnit tests Date: Tue, 19 Mar 2024 11:48:50 +0100 Message-ID: <20240319104857.70783-1-mic@digikod.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240319_034924_951423_675401D2 X-CRM114-Status: UNSURE ( 7.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org Hi, This patch series teaches KUnit to handle kthread faults as errors, and it brings a few related fixes and improvements. Shuah, everything should be OK now, could you please merge this series? All these tests pass (on top of v6.8): ./tools/testing/kunit/kunit.py run --alltests ./tools/testing/kunit/kunit.py run --alltests --arch x86_64 ./tools/testing/kunit/kunit.py run --alltests --arch arm64 \ --cross_compile=aarch64-linux-gnu- I added Reviewed-by, Tested-by and Fixes tags according to previous review. I improved a commit message and added a comment. A new test case check NULL pointer dereference, which wasn't possible before. This is useful to test current kernel self-protection mechanisms or future ones such as Heki: https://github.com/heki-linux Previous version: v2: https://lore.kernel.org/r/20240301194037.532117-1-mic@digikod.net v1: https://lore.kernel.org/r/20240229170409.365386-1-mic@digikod.net Regards, Mickaël Salaün (7): kunit: Handle thread creation error kunit: Fix kthread reference kunit: Fix timeout message kunit: Handle test faults kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests kunit: Print last test location on fault kunit: Add tests for fault include/kunit/test.h | 24 ++++++++++++++++++--- include/kunit/try-catch.h | 3 --- lib/kunit/kunit-test.c | 45 ++++++++++++++++++++++++++++++++++++++- lib/kunit/try-catch.c | 38 ++++++++++++++++++++++----------- lib/kunit_iov_iter.c | 18 ++++++++-------- 5 files changed, 100 insertions(+), 28 deletions(-) base-commit: e8f897f4afef0031fe618a8e94127a0934896aba -- 2.44.0