Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp46555rdb; Mon, 22 Jan 2024 11:24:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFF/ggIJKSDslVb7mT05XM2xP5AUQ9Sw0wjFti1FEOak0GftKTYVlhlvBL5vb6lyJ0UM+tH X-Received: by 2002:a17:903:11d1:b0:1d7:2645:147e with SMTP id q17-20020a17090311d100b001d72645147emr5925754plh.39.1705951484250; Mon, 22 Jan 2024 11:24:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705951484; cv=pass; d=google.com; s=arc-20160816; b=lfm15EmbzWq6R0vGvFCA1AHMG9q9CSlAsIZHqoe5hLUjWpZclWdcJ5N76yegv989tb LMLx3APK5R2aeiIDF+rVpkhvzWKcIhqN/zU1gY7FpQoowcgiwZXBZLva2hdkLbFe5bYG jU9h1jgp2nU5S9thMv62sqP0xpfvcv7MENk+m/daGcSWneHAOx3GlQK6qeS3YmCvlH2o bxqTP8/VfLqR5bT6+XNw0J8geWz8gU4jjtH9FBgvzWOgWenwDVkWi1qjOYuDw3wLK6bT oe5z/AnP814gtPfpHxuMMHhWYjbeGpWoWJdm/39HOgcN8QS/Dt35b5teqgbqQelvWPOq HvQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=WVr0sisKDT1Ta+rNOT/mQNmCiP4rTNhUrR7CUBe8ONI=; fh=vMxqFYt9H1xu4f0EsdIpd2OcP8W/DFmylTdyxQ34G68=; b=fB/Y5Rt8sTWbelBDyostE6cUNeXtJxaMVDBqa2P3yXIgYuPcWdwRPCt7/Mbj0FOiD4 Tf5/eXoY5OLZAhm+n372VlO0fSunfpSG4x38ffOS4ZZmny2EvO8gl69F9Xk3f32vOeEZ 6QxiLXd4sDtdyXN/x2hrEi0yk0WpSoLYAYOQ2+O6uKXsyUh0Ljd3VCVuKvTdGYIx5/9y 3mk4TxYI6bE7W7DLOmRCAOp/CGv/LzxnoklVd27md795bYS2S9wlZsj3of8NafgDcJib 9d91rNHtEifW4+DVWqqE1JWmDsyQ2cymzFtW2aVB5LdMmt4y7cUkx64FdnTwIkDT9axM Lz/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I+gkp7Ma; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-34028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id iy7-20020a170903130700b001d722853f35si5928834plb.276.2024.01.22.11.24.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:24:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I+gkp7Ma; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-34028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 646F6287B19 for ; Mon, 22 Jan 2024 19:13:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECAD947A79; Mon, 22 Jan 2024 18:55:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="I+gkp7Ma" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C213DB9E; Mon, 22 Jan 2024 18:55:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705949748; cv=none; b=oGOd/pFhXYlyV5dT3hr65PRCykjfF/V5TbVQZNAxPypV3hyPY+A5QcZX1NiG6c2DaXvB2AoHpf64z6jQRADaPQcnKYzJtkB+1SHh4kZ6MU0sznDiikyv1pYDEiExq6HTOgOKvLDo/7tpJrOQ82wcOwypv7jbVqVBXFWuH83/wxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705949748; c=relaxed/simple; bh=/kA5lAH45fxwuthlEiD+vf1dP3hl/faQzu+RmcAfVWk=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=O6hAzDNVtgSKS4lKD08i/U6NtRZ9rrt3Fryb43/g1RrKwcJfLBbUTlMtLKtvu1362DSRS4+TUbAd0coJrTHaCUciI4KNkhjsYjelgiiv6BBG1nHwSdxA2As+hr6n82C4QenHCeWnYu2FpNAhZOHBitXeRg0NSNR8lA4jE0mGRZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=I+gkp7Ma; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705949744; bh=/kA5lAH45fxwuthlEiD+vf1dP3hl/faQzu+RmcAfVWk=; h=From:Subject:Date:To:Cc:From; b=I+gkp7Maenr8HD2rs1ztDVK8yjY1aBUnqvwba+v3rVePuOkXCCBgKr5ceZXzGSIGQ VK78iwfUdmmmq5iFf5RSWRnrnb1V5oXq64ULDpkQemCpUOp0VSRZz8/wpkzPPD6NWm Cg2MUDnoUYiMFaW2TH7LOtKD7n2sLoLgCx2EoePyDVRbx1XfPQvUB8JQvuMGWtJI20 6fBWYyartg3yYfTVEUT7285afqBuR1W3qQmgv2dszcYy9Ezrea84XuUYOm14AEDpTa 8fC6TACh4Ay7GCw6E33GOUpwDohjykx98xMP2Kp6mmgbVecFttbjiez63T+aEjcuCU tNey8ii0DneSA== Received: from [192.168.0.47] (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C4E5B37820A4; Mon, 22 Jan 2024 18:55:38 +0000 (UTC) From: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Subject: [PATCH v4 0/3] Add test to verify probe of devices from discoverable buses Date: Mon, 22 Jan 2024 15:53:20 -0300 Message-Id: <20240122-discoverable-devs-ksft-v4-0-d602e1df4aa2@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAKC5rmUC/zXMQQrCMBCF4auUWRtJJomkrnTlIcRF2kyaYG0lU 4pQeneD4PKD9/4NmEomhnOzQaE1c56nCnNooE9+GkjkUA0o0UiFKELmfl6p+G4kEWhl8eS4iDZ YqUgrPDkH9fwuFPPnF74/qmOZX2JJhfw/V7foUFtt3PF2Vda2xtlLl2gcvGfY9y/OXpdbnAAAA A== To: Shuah Khan , Greg Kroah-Hartman , Bjorn Helgaas Cc: kernelci@lists.linux.dev, kernel@collabora.com, Tim Bird , linux-pci@vger.kernel.org, David Gow , linux-kselftest@vger.kernel.org, Rob Herring , Doug Anderson , linux-usb@vger.kernel.org, Saravana Kannan , Dan Carpenter , Guenter Roeck , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= X-Mailer: b4 0.12.4 This is part of an effort to improve detection of regressions impacting device probe on all platforms. The recently merged DT kselftest [3] detects probe issues for all devices described statically in the DT. That leaves out devices discovered at run-time from discoverable buses. This is where this test comes in. All of the devices that are connected through discoverable buses (ie USB and PCI), and which are internal and therefore always present, can be described based on their position in the system topology in a per-platform YAML file so they can be checked for. The test will check that the device has been instantiated and bound to a driver. Patch 1 introduces the test. Patch 2 and 3 add the device definitions for the google,spherion machine (Acer Chromebook 514) and XPS 13 as examples. This is the output from the test running on Spherion: TAP version 13 Using board file: boards/google,spherion.yaml 1..8 ok 1 /usb2-controller@11200000/1.4.1/camera.device ok 2 /usb2-controller@11200000/1.4.1/camera.0.driver ok 3 /usb2-controller@11200000/1.4.1/camera.1.driver ok 4 /usb2-controller@11200000/1.4.2/bluetooth.device ok 5 /usb2-controller@11200000/1.4.2/bluetooth.0.driver ok 6 /usb2-controller@11200000/1.4.2/bluetooth.1.driver ok 7 /pci-controller@11230000/0.0/0.0/wifi.device ok 8 /pci-controller@11230000/0.0/0.0/wifi.driver Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0 [3] https://lore.kernel.org/all/20230828211424.2964562-1-nfraprado@collabora.com/ Changes in v4: - Dropped RFC tag - Fixed 'busses' misspelling - Link to v3: https://lore.kernel.org/all/20231227123643.52348-1-nfraprado@collabora.com Changes in v3: - Reverted approach of encoding stable device reference in test file from device match fields (from modalias) back to HW topology (from v1) - Changed board file description to YAML - Rewrote test script in python to handle YAML and support x86 platforms - Link to v2: https://lore.kernel.org/all/20231127233558.868365-1-nfraprado@collabora.com Changes in v2: - Changed approach of encoding stable device reference in test file from HW topology to device match fields (the ones from modalias) - Better documented test format - Link to v1: https://lore.kernel.org/all/20231024211818.365844-1-nfraprado@collabora.com --- NĂ­colas F. R. A. Prado (3): kselftest: Add test to verify probe of devices from discoverable buses kselftest: devices: Add sample board file for google,spherion kselftest: devices: Add sample board file for XPS 13 9300 tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/Makefile | 4 + .../devices/boards/Dell Inc.,XPS 13 9300.yaml | 40 +++ .../selftests/devices/boards/google,spherion.yaml | 50 ++++ tools/testing/selftests/devices/ksft.py | 90 ++++++ .../selftests/devices/test_discoverable_devices.py | 318 +++++++++++++++++++++ 6 files changed, 503 insertions(+) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240122-discoverable-devs-ksft-9d501e312688 Best regards, -- NĂ­colas F. R. A. Prado