Message ID | 20230725212522.1622716-1-rmoar@google.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp34392vqo; Tue, 25 Jul 2023 15:03:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnyRLTh7lJSOdyfIG/hwzxYrM5Y4VbPKlk1sCqNbJ4CNP+2+bzkuO0S6eZRl9X2rI9kHWh X-Received: by 2002:a17:902:ea06:b0:1b8:9552:ca with SMTP id s6-20020a170902ea0600b001b8955200camr412863plg.45.1690322629640; Tue, 25 Jul 2023 15:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690322629; cv=none; d=google.com; s=arc-20160816; b=rBeLSXTb9XgpmNYtb3O6LY9iwp3yeNnH8FZ0YIgAzecAcuWFYiOQ4Bd4LVuojtbDiB GomELn/5xjjsX1rRkxCWNGRVnNl6JJmMpDFhAHLcsx5uHTct5Y8rJkuaZWLPuSFoOrhh /3Ey8H1cLQE62kJHTpSnD7ByB/+e843hG+jC/rFuJrm1OxMa0aKImGKyp2jNs5pEilIh +GTKgJ1ycrOgZ9FFfMS+plhKA4N7gEFwhhsKhGhNXJFOlTVa7+P5iElXkAhNbCbTe2lZ DYgEdGLJOwmOurxrF+X3DoFCN0i+PF5hv1OF4esgbqtPlr1uExRqmxyhfhIg5BBukaYs TJ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=1BncUN+zxsP5jL5qBPBFJiIzgW7UOfc4w8KYyzj3ScI=; fh=eSOGplXNKm0TQlVMiAPjma3ZxjxuDQ0l9LD5ETEQPUY=; b=EGntZMNKjTd1IbWVLXvc/JQjJwTbnSr9MhpOEIrURxqjZ1ZSiZY/z8omYoclnUcCJj FNpM0f5nm6e9m2xqfUf9AJ9e78kZzNbgE12ND2dsfTt1Tj0HEIagOIDmEGuhNWKnvWZ2 Zy+GzTSejk8ls4Z7MexT6+jSifqhR9zm9cauQ8d1uLVL+hqF7HqxWpJznMfhJG61itHx brDsDPWAnp+P1SjU/eAKSD1r+MhlvTs1iML9QjAMIo2i1AjGm9FsXmqF+XL086uWWRj4 Sm7EoNiMolbBjF3wYf+G3PHp0hPINSVanIMJKMFIwT/Zjtesuwm502hb3s//7O1Bqpc8 TrPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=QnwBoAOn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b001b9e21bc14dsi12597659plh.652.2023.07.25.15.03.22; Tue, 25 Jul 2023 15:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=QnwBoAOn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230403AbjGYVZe (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Tue, 25 Jul 2023 17:25:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjGYVZa (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 17:25:30 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109E51FD2 for <linux-kernel@vger.kernel.org>; Tue, 25 Jul 2023 14:25:29 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-583fe0f84a5so28041747b3.3 for <linux-kernel@vger.kernel.org>; Tue, 25 Jul 2023 14:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690320328; x=1690925128; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=1BncUN+zxsP5jL5qBPBFJiIzgW7UOfc4w8KYyzj3ScI=; b=QnwBoAOnhYZ7R8UVvGHqcCPy1vPb+326cnbSsoW+eyzwAp1kyyFf2dWTCh301GsO0y eg+XQAfZkVmwh7hK6uLYgDQXtcr3qALDorbc86Num/iM/d2mLNdAQVjatQQu27QuonEO cHfDnO2FbYZUE5OwnTdjqTEsLvU1hpYSn1HdstuDvGnRToxW3zkg28CYdnVeus/tCktl 6nobV9L7yp7kfcq6xUDOq+zY4y3mD6u+KNDo+fKe0d41z7vbUppES+YSVmdNl+z8A5a2 Nkek+41sNJ6KZZPX43KtYO55nZvg0qAiKUVJ8VP2v2eIVQPJR8pKlMOclG5wqFGBdItB kpnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690320328; x=1690925128; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1BncUN+zxsP5jL5qBPBFJiIzgW7UOfc4w8KYyzj3ScI=; b=a1inEF7iW/J+a+gbGBlm0M62am5S1KSkQvyDJXI/9FhAb4UXkQ2BX3CQxNzA/pvsJU 18uTGr7rMIko6yCEto/61Lf9aGwCalGHbvb4b52y2hvNR5UhEnHepXeRBxsZ7Ux7Y8PG AcK2xbfWaTb9zDahqTy72rnXXuS+cYDRS/LMxNKKlqX8Qa7RG1OOhIUX6aerLkl1pjed yAVbYNqhAHuUM+YDc2L+hVaofLHOoXnRHpGY1WT+7rENLjrowXSSi7t5W3O7ibZA4/6f 8u6g3W0R0f93nHUmtzX7lbn79LAljlgWfREp06xJRz8frnUWenGGhtvL9nPQhgAqfbAB xz1Q== X-Gm-Message-State: ABy/qLZectAdnpep1OlGV6g7E72bpb0BKoNDOvawOhIHAJfUlGEXprMm +OXGwdYtCURyoXv8hQPRikwW+431XQ== X-Received: from rmoar-specialist.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:45d3]) (user=rmoar job=sendgmr) by 2002:a81:b71d:0:b0:579:e379:d5ab with SMTP id v29-20020a81b71d000000b00579e379d5abmr3453ywh.6.1690320328318; Tue, 25 Jul 2023 14:25:28 -0700 (PDT) Date: Tue, 25 Jul 2023 21:25:11 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230725212522.1622716-1-rmoar@google.com> Subject: [PATCH v3 0/9] kunit: Add test attributes API From: Rae Moar <rmoar@google.com> To: shuah@kernel.org, davidgow@google.com, dlatypov@google.com, brendan.higgins@linux.dev Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, keescook@chromium.org, linux-hardening@vger.kernel.org, jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org, Rae Moar <rmoar@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772431741379199609 X-GMAIL-MSGID: 1772431741379199609 |
Series |
kunit: Add test attributes API
|
|
Message
Rae Moar
July 25, 2023, 9:25 p.m. UTC
Hello everyone, This patch series adds a test attributes framework to KUnit. There has been interest in filtering out "slow" KUnit tests. Most notably, a new config, CONFIG_MEMCPY_SLOW_KUNIT_TEST, has been added to exclude a particularly slow memcpy test (https://lore.kernel.org/all/20230118200653.give.574-kees@kernel.org/). This attributes framework can be used to save and access test associated data, including whether a test is slow. These attributes are reportable (via KTAP and command line output) and are also filterable. This framework is designed to allow for the addition of other attributes in the future. These attributes could include whether the test can be run concurrently, test file path, etc. To try out the framework I suggest running: "./tools/testing/kunit/kunit.py run --filter speed!=slow" This patch series was originally sent out as an RFC. Here is a link to the RFC v2: https://lore.kernel.org/all/20230707210947.1208717-1-rmoar@google.com/ Thanks! Rae Rae Moar (9): kunit: Add test attributes API structure kunit: Add speed attribute kunit: Add module attribute kunit: Add ability to filter attributes kunit: tool: Add command line interface to filter and report attributes kunit: memcpy: Mark tests as slow using test attributes kunit: time: Mark test as slow using test attributes kunit: add tests for filtering attributes kunit: Add documentation of KUnit test attributes Documentation/dev-tools/kunit/run_wrapper.rst | 12 + .../dev-tools/kunit/running_tips.rst | 166 +++++++ include/kunit/attributes.h | 50 +++ include/kunit/test.h | 70 ++- kernel/time/time_test.c | 2 +- lib/Kconfig.debug | 3 + lib/kunit/Makefile | 3 +- lib/kunit/attributes.c | 418 ++++++++++++++++++ lib/kunit/executor.c | 114 ++++- lib/kunit/executor_test.c | 128 +++++- lib/kunit/kunit-example-test.c | 9 + lib/kunit/test.c | 27 +- lib/memcpy_kunit.c | 8 +- tools/testing/kunit/kunit.py | 70 ++- tools/testing/kunit/kunit_kernel.py | 8 +- tools/testing/kunit/kunit_parser.py | 11 +- tools/testing/kunit/kunit_tool_test.py | 39 +- 17 files changed, 1062 insertions(+), 76 deletions(-) create mode 100644 include/kunit/attributes.h create mode 100644 lib/kunit/attributes.c base-commit: 64bd4641310c41a1ecf07c13c67bc0ed61045dfd
Comments
On 25/07/23 18:25, 'Rae Moar' via KUnit Development wrote: > Hello everyone, > > This patch series adds a test attributes framework to KUnit. > > There has been interest in filtering out "slow" KUnit tests. Most notably, > a new config, CONFIG_MEMCPY_SLOW_KUNIT_TEST, has been added to exclude a > particularly slow memcpy test > (https://lore.kernel.org/all/20230118200653.give.574-kees@kernel.org/). > > This attributes framework can be used to save and access test associated > data, including whether a test is slow. These attributes are reportable > (via KTAP and command line output) and are also filterable. > > This framework is designed to allow for the addition of other attributes in > the future. These attributes could include whether the test can be run > concurrently, test file path, etc. > > To try out the framework I suggest running: > "./tools/testing/kunit/kunit.py run --filter speed!=slow" > > This patch series was originally sent out as an RFC. Here is a link to the > RFC v2: > https://lore.kernel.org/all/20230707210947.1208717-1-rmoar@google.com/ > > Thanks! > Rae > Great addition to the KUnit framework! On all the patch set Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Best Regards, ~Arthur Grillo > Rae Moar (9): > kunit: Add test attributes API structure > kunit: Add speed attribute > kunit: Add module attribute > kunit: Add ability to filter attributes > kunit: tool: Add command line interface to filter and report > attributes > kunit: memcpy: Mark tests as slow using test attributes > kunit: time: Mark test as slow using test attributes > kunit: add tests for filtering attributes > kunit: Add documentation of KUnit test attributes > > Documentation/dev-tools/kunit/run_wrapper.rst | 12 + > .../dev-tools/kunit/running_tips.rst | 166 +++++++ > include/kunit/attributes.h | 50 +++ > include/kunit/test.h | 70 ++- > kernel/time/time_test.c | 2 +- > lib/Kconfig.debug | 3 + > lib/kunit/Makefile | 3 +- > lib/kunit/attributes.c | 418 ++++++++++++++++++ > lib/kunit/executor.c | 114 ++++- > lib/kunit/executor_test.c | 128 +++++- > lib/kunit/kunit-example-test.c | 9 + > lib/kunit/test.c | 27 +- > lib/memcpy_kunit.c | 8 +- > tools/testing/kunit/kunit.py | 70 ++- > tools/testing/kunit/kunit_kernel.py | 8 +- > tools/testing/kunit/kunit_parser.py | 11 +- > tools/testing/kunit/kunit_tool_test.py | 39 +- > 17 files changed, 1062 insertions(+), 76 deletions(-) > create mode 100644 include/kunit/attributes.h > create mode 100644 lib/kunit/attributes.c > > > base-commit: 64bd4641310c41a1ecf07c13c67bc0ed61045dfd
On 25/07/23 18:25, 'Rae Moar' via KUnit Development wrote: > Hello everyone, > > This patch series adds a test attributes framework to KUnit. > > There has been interest in filtering out "slow" KUnit tests. Most notably, > a new config, CONFIG_MEMCPY_SLOW_KUNIT_TEST, has been added to exclude a > particularly slow memcpy test > (https://lore.kernel.org/all/20230118200653.give.574-kees@kernel.org/). > > This attributes framework can be used to save and access test associated > data, including whether a test is slow. These attributes are reportable > (via KTAP and command line output) and are also filterable. > > This framework is designed to allow for the addition of other attributes in > the future. These attributes could include whether the test can be run > concurrently, test file path, etc. > > To try out the framework I suggest running: > "./tools/testing/kunit/kunit.py run --filter speed!=slow" > > This patch series was originally sent out as an RFC. Here is a link to the > RFC v2: > https://lore.kernel.org/all/20230707210947.1208717-1-rmoar@google.com/ > > Thanks! > Rae > Great addition to the KUnit framework! On all the patch set Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net> Best Regards, ~Arthur Grillo > Rae Moar (9): > kunit: Add test attributes API structure > kunit: Add speed attribute > kunit: Add module attribute > kunit: Add ability to filter attributes > kunit: tool: Add command line interface to filter and report > attributes > kunit: memcpy: Mark tests as slow using test attributes > kunit: time: Mark test as slow using test attributes > kunit: add tests for filtering attributes > kunit: Add documentation of KUnit test attributes > > Documentation/dev-tools/kunit/run_wrapper.rst | 12 + > .../dev-tools/kunit/running_tips.rst | 166 +++++++ > include/kunit/attributes.h | 50 +++ > include/kunit/test.h | 70 ++- > kernel/time/time_test.c | 2 +- > lib/Kconfig.debug | 3 + > lib/kunit/Makefile | 3 +- > lib/kunit/attributes.c | 418 ++++++++++++++++++ > lib/kunit/executor.c | 114 ++++- > lib/kunit/executor_test.c | 128 +++++- > lib/kunit/kunit-example-test.c | 9 + > lib/kunit/test.c | 27 +- > lib/memcpy_kunit.c | 8 +- > tools/testing/kunit/kunit.py | 70 ++- > tools/testing/kunit/kunit_kernel.py | 8 +- > tools/testing/kunit/kunit_parser.py | 11 +- > tools/testing/kunit/kunit_tool_test.py | 39 +- > 17 files changed, 1062 insertions(+), 76 deletions(-) > create mode 100644 include/kunit/attributes.h > create mode 100644 lib/kunit/attributes.c > > > base-commit: 64bd4641310c41a1ecf07c13c67bc0ed61045dfd
On Tue, Jul 25, 2023 at 09:25:11PM +0000, Rae Moar wrote: > Hello everyone, > > This patch series adds a test attributes framework to KUnit. > With this series in linux-next, almost 50% of my boot tests crash, and many others show warnings tracebacks. Example crash from x86_64 boot attempt attached. Guenter --- [ 6.165419] ok 6 lib_sort [ 6.166044] KTAP version 1 [ 6.166139] # Subtest: kunit_executor_test [ 6.166247] # module: kunit [ 6.166261] 1..8 [ 6.168252] ok 1 parse_filter_test [ 6.169579] BUG: unable to handle page fault for address: ffffd757e80004c8 [ 6.169872] #PF: supervisor read access in kernel mode [ 6.169990] #PF: error_code(0x0000) - not-present page [ 6.170142] PGD ffd4067 P4D ffd4067 PUD 0 [ 6.170346] Oops: 0000 [#1] PREEMPT SMP PTI [ 6.170521] CPU: 0 PID: 182 Comm: kunit_try_catch Tainted: G N 6.5.0-rc3-next-20230728 #1 [ 6.170735] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 [ 6.171024] RIP: 0010:kfree+0x61/0x140 [ 6.171313] Code: 80 48 01 e8 0f 82 ec 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 29 bf aa 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 07 bf aa 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b3 00 00 00 66 90 48 8b 07 f6 [ 6.171715] RSP: 0000:ffffb48f80267dc8 EFLAGS: 00000286 [ 6.171847] RAX: ffffd757e80004c0 RBX: ffffa34583aef5d0 RCX: 0000000000000000 [ 6.171998] RDX: 00005cba00000000 RSI: ffffffff95cb1ad5 RDI: ffffb48f80013cd0 [ 6.172146] RBP: ffffb48f80013cd0 R08: 0000000000000001 R09: 0000000000000001 [ 6.172293] R10: 0000000000000001 R11: 0000000000000001 R12: ffffb48f80267e74 [ 6.172445] R13: 0000000000000000 R14: ffffa34583bf4000 R15: 0000000000000002 [ 6.172620] FS: 0000000000000000(0000) GS:ffffa3458f800000(0000) knlGS:0000000000000000 [ 6.172793] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6.172917] CR2: ffffd757e80004c8 CR3: 0000000009048000 CR4: 00000000007506f0 [ 6.173089] PKRU: 55555554 [ 6.173177] Call Trace: [ 6.173313] <TASK> [ 6.173494] ? __die+0x1f/0x70 [ 6.173600] ? page_fault_oops+0x14a/0x460 [ 6.173693] ? search_exception_tables+0x37/0x50 [ 6.173793] ? fixup_exception+0x21/0x310 [ 6.173887] ? exc_page_fault+0xee/0x1c0 [ 6.173977] ? asm_exc_page_fault+0x26/0x30 [ 6.174076] ? kunit_filter_suites+0x3a5/0x460 [ 6.174192] ? kfree+0x61/0x140 [ 6.174271] ? kfree+0x106/0x140 [ 6.174353] kunit_filter_suites+0x3a5/0x460 [ 6.174473] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 6.174604] filter_suites_test+0xea/0x2c0 [ 6.174702] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 6.174828] kunit_generic_run_threadfn_adapter+0x15/0x20 [ 6.174941] kthread+0xef/0x120 [ 6.175012] ? __pfx_kthread+0x10/0x10 [ 6.175098] ret_from_fork+0x2f/0x50 [ 6.175177] ? __pfx_kthread+0x10/0x10 [ 6.175260] ret_from_fork_asm+0x1b/0x30 [ 6.175387] </TASK> [ 6.175466] Modules linked in: [ 6.175640] CR2: ffffd757e80004c8 [ 6.175887] ---[ end trace 0000000000000000 ]--- [ 6.176029] RIP: 0010:kfree+0x61/0x140 [ 6.176119] Code: 80 48 01 e8 0f 82 ec 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 29 bf aa 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 07 bf aa 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b3 00 00 00 66 90 48 8b 07 f6 [ 6.176478] RSP: 0000:ffffb48f80267dc8 EFLAGS: 00000286 [ 6.176589] RAX: ffffd757e80004c0 RBX: ffffa34583aef5d0 RCX: 0000000000000000 [ 6.176729] RDX: 00005cba00000000 RSI: ffffffff95cb1ad5 RDI: ffffb48f80013cd0 [ 6.176869] RBP: ffffb48f80013cd0 R08: 0000000000000001 R09: 0000000000000001 [ 6.177008] R10: 0000000000000001 R11: 0000000000000001 R12: ffffb48f80267e74 [ 6.177150] R13: 0000000000000000 R14: ffffa34583bf4000 R15: 0000000000000002 [ 6.177290] FS: 0000000000000000(0000) GS:ffffa3458f800000(0000) knlGS:0000000000000000 [ 6.177448] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6.177564] CR2: ffffd757e80004c8 CR3: 0000000009048000 CR4: 00000000007506f0 [ 6.177704] PKRU: 55555554 [ 6.177807] note: kunit_try_catch[182] exited with irqs disabled
On Fri, 28 Jul 2023 at 18:38, Guenter Roeck <linux@roeck-us.net> wrote: > > On Tue, Jul 25, 2023 at 09:25:11PM +0000, Rae Moar wrote: > > Hello everyone, > > > > This patch series adds a test attributes framework to KUnit. > > > > With this series in linux-next, almost 50% of my boot tests crash, > and many others show warnings tracebacks. > > Example crash from x86_64 boot attempt attached. > > Guenter > > --- Hmm... It's not reproducing here (even with KASAN), which is strange. Does the patch here help? https://lore.kernel.org/linux-kselftest/20230729010003.4058582-1-ruanjinjie@huawei.com/ -- David > [ 6.165419] ok 6 lib_sort > [ 6.166044] KTAP version 1 > [ 6.166139] # Subtest: kunit_executor_test > [ 6.166247] # module: kunit > [ 6.166261] 1..8 > [ 6.168252] ok 1 parse_filter_test > [ 6.169579] BUG: unable to handle page fault for address: ffffd757e80004c8 > [ 6.169872] #PF: supervisor read access in kernel mode > [ 6.169990] #PF: error_code(0x0000) - not-present page > [ 6.170142] PGD ffd4067 P4D ffd4067 PUD 0 > [ 6.170346] Oops: 0000 [#1] PREEMPT SMP PTI > [ 6.170521] CPU: 0 PID: 182 Comm: kunit_try_catch Tainted: G N 6.5.0-rc3-next-20230728 #1 > [ 6.170735] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 > [ 6.171024] RIP: 0010:kfree+0x61/0x140 > [ 6.171313] Code: 80 48 01 e8 0f 82 ec 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 29 bf aa 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 07 bf aa 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b3 00 00 00 66 90 48 8b 07 f6 > [ 6.171715] RSP: 0000:ffffb48f80267dc8 EFLAGS: 00000286 > [ 6.171847] RAX: ffffd757e80004c0 RBX: ffffa34583aef5d0 RCX: 0000000000000000 > [ 6.171998] RDX: 00005cba00000000 RSI: ffffffff95cb1ad5 RDI: ffffb48f80013cd0 > [ 6.172146] RBP: ffffb48f80013cd0 R08: 0000000000000001 R09: 0000000000000001 > [ 6.172293] R10: 0000000000000001 R11: 0000000000000001 R12: ffffb48f80267e74 > [ 6.172445] R13: 0000000000000000 R14: ffffa34583bf4000 R15: 0000000000000002 > [ 6.172620] FS: 0000000000000000(0000) GS:ffffa3458f800000(0000) knlGS:0000000000000000 > [ 6.172793] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 6.172917] CR2: ffffd757e80004c8 CR3: 0000000009048000 CR4: 00000000007506f0 > [ 6.173089] PKRU: 55555554 > [ 6.173177] Call Trace: > [ 6.173313] <TASK> > [ 6.173494] ? __die+0x1f/0x70 > [ 6.173600] ? page_fault_oops+0x14a/0x460 > [ 6.173693] ? search_exception_tables+0x37/0x50 > [ 6.173793] ? fixup_exception+0x21/0x310 > [ 6.173887] ? exc_page_fault+0xee/0x1c0 > [ 6.173977] ? asm_exc_page_fault+0x26/0x30 > [ 6.174076] ? kunit_filter_suites+0x3a5/0x460 > [ 6.174192] ? kfree+0x61/0x140 > [ 6.174271] ? kfree+0x106/0x140 > [ 6.174353] kunit_filter_suites+0x3a5/0x460 > [ 6.174473] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 > [ 6.174604] filter_suites_test+0xea/0x2c0 > [ 6.174702] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 > [ 6.174828] kunit_generic_run_threadfn_adapter+0x15/0x20 > [ 6.174941] kthread+0xef/0x120 > [ 6.175012] ? __pfx_kthread+0x10/0x10 > [ 6.175098] ret_from_fork+0x2f/0x50 > [ 6.175177] ? __pfx_kthread+0x10/0x10 > [ 6.175260] ret_from_fork_asm+0x1b/0x30 > [ 6.175387] </TASK> > [ 6.175466] Modules linked in: > [ 6.175640] CR2: ffffd757e80004c8 > [ 6.175887] ---[ end trace 0000000000000000 ]--- > [ 6.176029] RIP: 0010:kfree+0x61/0x140 > [ 6.176119] Code: 80 48 01 e8 0f 82 ec 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 29 bf aa 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 07 bf aa 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b3 00 00 00 66 90 48 8b 07 f6 > [ 6.176478] RSP: 0000:ffffb48f80267dc8 EFLAGS: 00000286 > [ 6.176589] RAX: ffffd757e80004c0 RBX: ffffa34583aef5d0 RCX: 0000000000000000 > [ 6.176729] RDX: 00005cba00000000 RSI: ffffffff95cb1ad5 RDI: ffffb48f80013cd0 > [ 6.176869] RBP: ffffb48f80013cd0 R08: 0000000000000001 R09: 0000000000000001 > [ 6.177008] R10: 0000000000000001 R11: 0000000000000001 R12: ffffb48f80267e74 > [ 6.177150] R13: 0000000000000000 R14: ffffa34583bf4000 R15: 0000000000000002 > [ 6.177290] FS: 0000000000000000(0000) GS:ffffa3458f800000(0000) knlGS:0000000000000000 > [ 6.177448] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 6.177564] CR2: ffffd757e80004c8 CR3: 0000000009048000 CR4: 00000000007506f0 > [ 6.177704] PKRU: 55555554 > [ 6.177807] note: kunit_try_catch[182] exited with irqs disabled > > -- > You received this message because you are subscribed to the Google Groups "KUnit Development" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/59dc28b1-298c-4e7b-b35f-0b94071f4cb5%40roeck-us.net.
On 7/29/23 00:53, David Gow wrote: > On Fri, 28 Jul 2023 at 18:38, Guenter Roeck <linux@roeck-us.net> wrote: >> >> On Tue, Jul 25, 2023 at 09:25:11PM +0000, Rae Moar wrote: >>> Hello everyone, >>> >>> This patch series adds a test attributes framework to KUnit. >>> >> >> With this series in linux-next, almost 50% of my boot tests crash, >> and many others show warnings tracebacks. >> >> Example crash from x86_64 boot attempt attached. >> >> Guenter >> >> --- > > Hmm... It's not reproducing here (even with KASAN), which is strange. > > Does the patch here help? > https://lore.kernel.org/linux-kselftest/20230729010003.4058582-1-ruanjinjie@huawei.com/ > Yes, it does. Guenter