Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp509844rdd; Tue, 9 Jan 2024 10:38:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtwhJ3QOe8y/Z4ryQuEUQ13fWhL8wqt2rqmN0Je82EUB9mrh5Iay8Tm3GyKmZExOnubpLX X-Received: by 2002:a17:906:66d0:b0:a27:879f:6be0 with SMTP id k16-20020a17090666d000b00a27879f6be0mr883620ejp.20.1704825489276; Tue, 09 Jan 2024 10:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704825489; cv=none; d=google.com; s=arc-20160816; b=UGzmH9M7E42m7xc0/J2cHuw9kiOMmv+VCuNI7gW5fUECJeJI/561j2dLvswdoEjrzY q14bSFqbWD+DorBr9pJBwHsLP3S1e9AWfCtqtAfUO1ZA9H1mdv/9JTyE16JFojQRbU0K wk8YChtsR5exFkcWzXl6p1U+tyDJsPXmBncSTyKiKqULOCVHNsLpP7rSMN6DVkhgAoUk Oqjbm2HcE/8V0QBIvMqehkjhU6Y9QBb1a31bitiWUAh/dPk2ZEcW/D1HEkdpXi5t3sPV NUB5qP4QSJ+pv2oL/rOXsO5SVF/w7ZI9ARAPyEtIOQ271VVqsGYN0g3YM44QV7f1Ea8+ NqQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:from:content-language:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=2oH/VZxvoetgMc/k3MiG/99MRCCtdXG/aQKWFR0vvjY=; fh=zbIbAMIe6ftxPykUmEiJkMGMQo2MUii5gPatcrX1htA=; b=cCKwamxLqz1+2mhoBn65pv43JKdP/JdrSmF5EkZPXUCcZ7j6g7dJzl6o1VHLGXn1R1 i0SfLAQlk6nMlHRnjogX1O6D764wbGj33Gg26hZd8wMKtfNcofwnnWYh8CIaqvUMEf6l 6VgD9eDfSZBBtYEBpsQYJ7nFj6oDV7yLM5h6axrB+6x+BXApsHzJ6Q015NkzGBk27UWD NBLSpwqyho99VO0u0KYUhhsZtf9KtrByi4tJUmbI/D1Qc0T8KEJuVYU0g5cLE5piZbUK yetb3On9NlsJCXilny6snzYa/j0apatxVcdNp9b3WlWx3bGpTLjS8QFF18Cr+wurFleF vZng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UA+ctkli; spf=pass (google.com: domain of linux-kernel+bounces-21266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z10-20020a170906240a00b00a26f5fc8bf5si963782eja.689.2024.01.09.10.38.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 10:38:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=UA+ctkli; spf=pass (google.com: domain of linux-kernel+bounces-21266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AAB091F2671A for ; Tue, 9 Jan 2024 18:38:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C761E3C68E; Tue, 9 Jan 2024 18:37:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UA+ctkli" Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (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 045053C468 for ; Tue, 9 Jan 2024 18:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-io1-f46.google.com with SMTP id ca18e2360f4ac-7bb5be6742fso39031039f.1 for ; Tue, 09 Jan 2024 10:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1704825457; x=1705430257; darn=vger.kernel.org; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=2oH/VZxvoetgMc/k3MiG/99MRCCtdXG/aQKWFR0vvjY=; b=UA+ctkliR3pRnqXiwSF0bpeSKwS70NJKp5oZKTGZLXv5V0GSO84c9lM/dDDXAPczpF GyNY8DE3DCnW5JoTpv/V2qrRWXjz0nJ+IjWVvqSROFqaYvvNLYhzu+UrAHSCt7ifN/Kx ptXbcof6TkYBGP8mvOCOHR+iQzTaxxwo0oPtI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704825457; x=1705430257; h=cc:to:subject:from:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2oH/VZxvoetgMc/k3MiG/99MRCCtdXG/aQKWFR0vvjY=; b=PaqToLduFpeLpQPYKh+hxfb1Y7vIMyt3Nuqc1IncXhdwcGMbgvXT2xaaw//jYGNttw ApHlm1ydV55dmwoCp7mJTMGKpiwaGoybc4KoPKS8KI2dB9/xRbt3L+PlYLfJ2832up2M qStcIgdgHYNRSAQn6OqocHjeN34ZFTfJ+WOCiXJEbuipYyKNOB+PVvePTII4QMn6WwOj ek0UM80gOsh035HLFxWYzlytpRB+KmJC3+2UJjYZfosf9AE1v2OiwzLCRbQ7mbv75fwS HfRZoNsY82OHDVWg+pPACp/8/FM8tWMfXk27i746P6fGNFhUFr70WKLArZqwx74DeCO9 VhZQ== X-Gm-Message-State: AOJu0Yy8oEr5blX0+WxfAScmhQILL+wuTaG+WZ9Ahy9r2s+8wGe/nrmf vOmC8T8JDzX+Npzirh5s/ImXlq5fAuaJNA== X-Received: by 2002:a6b:c94e:0:b0:7be:edbc:629f with SMTP id z75-20020a6bc94e000000b007beedbc629fmr1100327iof.0.1704825456926; Tue, 09 Jan 2024 10:37:36 -0800 (PST) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id y66-20020a029548000000b0046e139ad407sm798426jah.71.2024.01.09.10.37.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Jan 2024 10:37:36 -0800 (PST) Content-Type: multipart/mixed; boundary="------------iq8LG0chExFtyjSpGrBvnQOH" Message-ID: Date: Tue, 9 Jan 2024 11:37:35 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Shuah Khan Subject: [GIT PULL] KUnit next update for Linux 6.8-rc1 To: Linus Torvalds Cc: Shuah Khan , shuah , David Gow , Brendan Higgins , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------iq8LG0chExFtyjSpGrBvnQOH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Linus, Please pull the following KUnit next update for Linux 6.8-rc1. This KUnit update for Linux 6.8-rc1 consists of: - a new feature that adds APIs for managing devices introducing a set of helper functions which allow devices (internally a struct kunit_device) to be created and managed by KUnit. These devices will be automatically unregistered on test exit. These helpers can either use a user-provided struct device_driver, or have one automatically created and managed by KUnit. In both cases, the device lives on a new kunit_bus. - changes to switch drm/tests to use kunit devices - several fixes and enhancements to attribute feature - changes to reorganize deferred action function introducing KUNIT_DEFINE_ACTION_WRAPPER - new feature adds ability to run tests after boot using debugfs - fixes and enhancements to string-stream-test: - parse ERR_PTR in string_stream_destroy() - unchecked dereference in bug fix in debugfs_print_results() - handling errors from alloc_string_stream() - NULL-dereference bug fix in kunit_init_suite() diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit ceb6a6f023fd3e8b07761ed900352ef574010bcb: Linux 6.7-rc6 (2023-12-17 15:19:28 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.8-rc1 for you to fetch changes up to 539e582a375dedee95a4fa9ca3f37cdb25c441ec: kunit: Fix some comments which were mistakenly kerneldoc (2024-01-03 09:10:37 -0700) ---------------------------------------------------------------- linux_kselftest-kunit-6.8-rc1 This KUnit update for Linux 6.8-rc1 consists of: - a new feature that adds APIs for managing devices introducing a set of helper functions which allow devices (internally a struct kunit_device) to be created and managed by KUnit. These devices will be automatically unregistered on test exit. These helpers can either use a user-provided struct device_driver, or have one automatically created and managed by KUnit. In both cases, the device lives on a new kunit_bus. - changes to switch drm/tests to use kunit devices - several fixes and enhancements to attribute feature - changes to reorganize deferred action function introducing KUNIT_DEFINE_ACTION_WRAPPER - new feature adds ability to run tests after boot using debugfs - fixes and enhancements to string-stream-test: - parse ERR_PTR in string_stream_destroy() - unchecked dereference in bug fix in debugfs_print_results() - handling errors from alloc_string_stream() - NULL-dereference bug fix in kunit_init_suite() ---------------------------------------------------------------- David Gow (4): kunit: Add a macro to wrap a deferred action function drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER() drm/vc4: tests: Use KUNIT_DEFINE_ACTION_WRAPPER kunit: Fix some comments which were mistakenly kerneldoc Maxime Ripard (1): drm/tests: Switch to kunit devices Michal Wajdeczko (2): kunit: Add example for using test->priv kunit: Reset test->priv after each param iteration Rae Moar (8): kunit: tool: fix parsing of test attributes kunit: tool: add test for parsing attributes kunit: move KUNIT_TABLE out of INIT_DATA kunit: add KUNIT_INIT_TABLE to init linker section kunit: add example suite to test init suites kunit: add is_init test attribute kunit: add ability to run tests after boot using debugfs Documentation: Add debugfs docs with run after boot Richard Fitzgerald (8): kunit: string-stream-test: Avoid cast warning when testing gfp_t flags kunit: string-stream: Allow ERR_PTR to be passed to string_stream_destroy() kunit: debugfs: Fix unchecked dereference in debugfs_print_results() kunit: debugfs: Handle errors from alloc_string_stream() kunit: Fix NULL-dereference in kunit_init_suite() if suite->log is NULL kunit: Allow passing function pointer to kunit_activate_static_stub() kunit: Add example of kunit_activate_static_stub() with pointer-to-function kunit: Protect string comparisons against NULL davidgow@google.com (4): kunit: Add APIs for managing devices fortify: test: Use kunit_device overflow: Replace fake root_device with kunit_device ASoC: topology: Replace fake root_device with kunit_device in tests Documentation/dev-tools/kunit/api/resource.rst | 9 + Documentation/dev-tools/kunit/run_manual.rst | 51 +++++- Documentation/dev-tools/kunit/running_tips.rst | 7 + Documentation/dev-tools/kunit/usage.rst | 60 ++++++- drivers/gpu/drm/tests/drm_kunit_helpers.c | 78 +-------- drivers/gpu/drm/vc4/tests/vc4_mock.c | 9 +- include/asm-generic/vmlinux.lds.h | 11 +- include/kunit/device.h | 80 +++++++++ include/kunit/resource.h | 21 +++ include/kunit/static_stub.h | 2 +- include/kunit/test.h | 33 ++-- include/linux/module.h | 2 + kernel/module/main.c | 3 + lib/fortify_kunit.c | 5 +- lib/kunit/Makefile | 3 +- lib/kunit/attributes.c | 60 +++++++ lib/kunit/debugfs.c | 102 +++++++++++- lib/kunit/device-impl.h | 17 ++ lib/kunit/device.c | 181 +++++++++++++++++++++ lib/kunit/executor.c | 68 +++++++- lib/kunit/kunit-example-test.c | 87 ++++++++++ lib/kunit/kunit-test.c | 139 +++++++++++++++- lib/kunit/string-stream-test.c | 2 +- lib/kunit/string-stream.c | 2 +- lib/kunit/test.c | 48 +++++- lib/overflow_kunit.c | 5 +- sound/soc/soc-topology-test.c | 10 +- tools/testing/kunit/kunit_parser.py | 4 +- tools/testing/kunit/kunit_tool_test.py | 16 ++ .../kunit/test_data/test_parse_attributes.log | 9 + 30 files changed, 978 insertions(+), 146 deletions(-) create mode 100644 include/kunit/device.h create mode 100644 lib/kunit/device-impl.h create mode 100644 lib/kunit/device.c create mode 100644 tools/testing/kunit/test_data/test_parse_attributes.log ---------------------------------------------------------------- --------------iq8LG0chExFtyjSpGrBvnQOH Content-Type: text/x-patch; charset=UTF-8; name="linux_kselftest-kunit-6.8-rc1.diff" Content-Disposition: attachment; filename="linux_kselftest-kunit-6.8-rc1.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2LXRvb2xzL2t1bml0L2FwaS9yZXNvdXJj ZS5yc3QgYi9Eb2N1bWVudGF0aW9uL2Rldi10b29scy9rdW5pdC9hcGkvcmVzb3VyY2UucnN0 CmluZGV4IDBhOTRmODMxMjU5ZS4uZWM2MDAyYTZiMGRiIDEwMDY0NAotLS0gYS9Eb2N1bWVu dGF0aW9uL2Rldi10b29scy9rdW5pdC9hcGkvcmVzb3VyY2UucnN0CisrKyBiL0RvY3VtZW50 YXRpb24vZGV2LXRvb2xzL2t1bml0L2FwaS9yZXNvdXJjZS5yc3QKQEAgLTExLDMgKzExLDEy IEBAIHN0YXRlIG9uIGEgcGVyLXRlc3QgYmFzaXMsIHJlZ2lzdGVyIGN1c3RvbSBjbGVhbnVw IGFjdGlvbnMsIGFuZCBtb3JlLgogCiAuLiBrZXJuZWwtZG9jOjogaW5jbHV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