From patchwork Mon Nov 27 23:34:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 170502 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3545792vqx; Mon, 27 Nov 2023 15:36:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1WQhtf/raBpF5nym2L5TisaNLllKjQfyWllFZIlKUFjGwOFzNEywk+OgQT6IWKmeNRncX X-Received: by 2002:a05:6a00:1387:b0:6cb:68d7:b1bc with SMTP id t7-20020a056a00138700b006cb68d7b1bcmr12944924pfg.30.1701128192801; Mon, 27 Nov 2023 15:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701128192; cv=none; d=google.com; s=arc-20160816; b=IYzye3+Aj+9fyMA8jnPJubgAez8A6rsDDjDbJhryGsh5uBeIMCVg7M1yW5r1o7lDas 40kyS1OMhaCDIr0Rt13cz9V0a0JQnNodLajaCj4mHwNB+nlzcbH/qVCjavk3UwWPdPBv K52J1cZYwoJqInrpmDvo+dlWP/YwO+cHuZgNuAw7TpSLNG0uMgh9y5lFt8EIQb04aR2x bh+ar+SET0Hr1e0ST1MFzezddAlgYe1XAZ9WDuzRsJELaJvsUQtiksRTFRJbo3BlZiII /YlmWqUNpu5gkqxlLTDPjcyRBeNFQqLYbOwXyeB3idKYJsUGq3iQFjhMKUY/uB41WEg2 ZWvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JelCNqhnae88dpLwjQ+fS1oCzzwZp2xfTsFgRDleGrw=; fh=PT/fWAWUJUNvRr+2iNVO8+Jh8Gwj1ty5Hf/jdhUuinE=; b=Oi3/EdHHbruIoCPpKiwLF2UdJDR3lSwDdQzGQgNCA0gPRPM84eD2hkXj0BatzhMk1V NtqrjwbcR0XL99g+vkIWDhzT3QL68yNInGeiW65Yzb3IhWqu2AYEy5pbDv+N0fkatkM2 LKh/mnQc0KR3yDIC5j54rdQpyAMVPZT59XhamoGjs0uzHgV/+uC8aRrWP9sVwZ9dep/H hQfpbsgC7A6cnGoQt7kKLBpkNb1GHOv0Q+IQUkoxy8HjZVA4ZibQMuJaa7m3ZUTlFBnm 4D0+eVBvgw5yZyTzSjNaYy8H5nPA7ZIykn8W9gyXmR7jevmV0x36TO80mNh9NvFAoWUa KSUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=n2p++2b+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d11-20020a631d4b000000b005bdbf2ac2d2si10421150pgm.85.2023.11.27.15.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:36:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=n2p++2b+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6DB34805A586; Mon, 27 Nov 2023 15:36:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233644AbjK0XgO (ORCPT + 99 others); Mon, 27 Nov 2023 18:36:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233697AbjK0XgH (ORCPT ); Mon, 27 Nov 2023 18:36:07 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9C5B1B8; Mon, 27 Nov 2023 15:36:12 -0800 (PST) Received: from notapiano.myfiosgateway.com (cola.collaboradmins.com [195.201.22.229]) (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 madras.collabora.co.uk (Postfix) with ESMTPSA id A4CA56607286; Mon, 27 Nov 2023 23:36:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701128171; bh=uszfqMsRyEw54/XQFNZxt8fdYO5WUerKHy+2zOlCCgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n2p++2b+KtXB0WF15oFP3ygUdj8gd69ZgSggXl1cbnsTZZJyY6igjbC+Ujwfr53i7 Ufo1jzKmoinwhvsbOPGLkW+3gdhiWSwnfxKh6A/EzNpBYlbfjzNk7B348gYRhbyPz8 gW7mGRlLrwsaGjdRILs/m+Y36uEqUNhNGUb7ZgrRUUxt0taN5xIRc53f+jUCZeBliL LjXy9S4OxsR3OZ4SxMO/PNEOi5ughBjb+wWAdIcsnse5WajqbWSBO7+edpq1LmgYzl BjxK5scWjK+CZMgFrRsZ4+ATPWMLZccNBkwoDTqZktQSQUwHHAfLeO0VRM5RIzMwOr ZohhinjpSkCAg== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Shuah Khan , Greg Kroah-Hartman , Bjorn Helgaas Cc: Saravana Kannan , Rob Herring , kernelci@lists.linux.dev, David Gow , Guenter Roeck , linux-kselftest@vger.kernel.org, linux-usb@vger.kernel.org, kernel@collabora.com, Dan Carpenter , Tim Bird , linux-pci@vger.kernel.org, Doug Anderson , devicetree@vger.kernel.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 1/2] kselftest: Add test to verify probe of devices from discoverable busses Date: Mon, 27 Nov 2023 18:34:06 -0500 Message-ID: <20231127233558.868365-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231127233558.868365-1-nfraprado@collabora.com> References: <20231127233558.868365-1-nfraprado@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 15:36:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783762195957439520 X-GMAIL-MSGID: 1783762195957439520 Add a new test to verify that a list of expected devices on a given platform have been successfully probed by a driver. Add a new test to verify that all expected devices from discoverable busses (ie USB, PCI) have been successfully instantiated and probed by a driver. The per-platform list of expected devices is selected from the ones under the boards/ directory based on compatible. Signed-off-by: NĂ­colas F. R. A. Prado --- (no changes since v1) tools/testing/selftests/Makefile | 1 + tools/testing/selftests/devices/.gitignore | 1 + tools/testing/selftests/devices/Makefile | 8 + .../devices/test_discoverable_devices.sh | 160 ++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 tools/testing/selftests/devices/.gitignore create mode 100644 tools/testing/selftests/devices/Makefile create mode 100755 tools/testing/selftests/devices/test_discoverable_devices.sh diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 3b2061d1c1a5..7f5088006c3c 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -13,6 +13,7 @@ TARGETS += core TARGETS += cpufreq TARGETS += cpu-hotplug TARGETS += damon +TARGETS += devices TARGETS += dmabuf-heaps TARGETS += drivers/dma-buf TARGETS += drivers/s390x/uvdevice diff --git a/tools/testing/selftests/devices/.gitignore b/tools/testing/selftests/devices/.gitignore new file mode 100644 index 000000000000..e3c5c04d1b19 --- /dev/null +++ b/tools/testing/selftests/devices/.gitignore @@ -0,0 +1 @@ +ktap_helpers.sh diff --git a/tools/testing/selftests/devices/Makefile b/tools/testing/selftests/devices/Makefile new file mode 100644 index 000000000000..ff2fdc8fc5e2 --- /dev/null +++ b/tools/testing/selftests/devices/Makefile @@ -0,0 +1,8 @@ +TEST_PROGS := test_discoverable_devices.sh +TEST_GEN_FILES := ktap_helpers.sh +TEST_FILES := boards + +include ../lib.mk + +$(OUTPUT)/ktap_helpers.sh: + cp ../dt/ktap_helpers.sh $@ diff --git a/tools/testing/selftests/devices/test_discoverable_devices.sh b/tools/testing/selftests/devices/test_discoverable_devices.sh new file mode 100755 index 000000000000..82bad5ba7081 --- /dev/null +++ b/tools/testing/selftests/devices/test_discoverable_devices.sh @@ -0,0 +1,160 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2023 Collabora Ltd +# +# This script tests for presence and driver binding of devices from discoverable +# busses (ie USB, PCI). +# +# The per-platform list of devices to be tested is stored inside the boards/ +# directory and chosen based on compatible. Each line of the file follows the +# following format: +# +# usb|pci test_name number_of_matches field=value [ field=value ... ] +# +# The available match fields vary by bus. The field-value match pairs for a +# device can be retrieved from the device's modalias attribute in sysfs. +# + +DIR="$(dirname $(readlink -f "$0"))" + +source "${DIR}"/ktap_helpers.sh + +KSFT_FAIL=1 +KSFT_SKIP=4 + +retval=0 + +match() +{ + FILE="$1" + ID="$2" + + [ ! -f "$FILE" ] && return 1 + [ "$ID" = "" ] && return 0 + grep -q "$ID" "$FILE" || return 1 + return 0 +} + +usb() +{ + name="$1" + count="$2" + shift 2 + + for arg in $@; do + [[ "$arg" =~ ^v= ]] && v="${arg#v=}" + [[ "$arg" =~ ^p= ]] && p="${arg#p=}" + [[ "$arg" =~ ^d= ]] && d="${arg#d=}" + [[ "$arg" =~ ^dc= ]] && dc="${arg#dc=}" + [[ "$arg" =~ ^dsc= ]] && dsc="${arg#dsc=}" + [[ "$arg" =~ ^dp= ]] && dp="${arg#dp=}" + [[ "$arg" =~ ^ic= ]] && ic="${arg#ic=}" + [[ "$arg" =~ ^isc= ]] && isc="${arg#isc=}" + [[ "$arg" =~ ^ip= ]] && ip="${arg#ip=}" + [[ "$arg" =~ ^in= ]] && in="${arg#in=}" + done + + cur_count=0 + + for dev in $(find /sys/bus/usb/devices -maxdepth 1); do + match "$dev"/idVendor "$v" || continue + match "$dev"/idProduct "$p" || continue + match "$dev"/bcdDevice "$d" || continue + match "$dev"/bDeviceClass "$dc" || continue + match "$dev"/bDeviceSubClass "$dsc" || continue + match "$dev"/bDeviceProtocol "$dp" || continue + + # Matched device. Now search through interfaces + for intf in $(find "$dev"/ -maxdepth 1 -type d); do + match "$intf"/bInterfaceClass "$ic" || continue + match "$intf"/bInterfaceSubClass "$isc" || continue + match "$intf"/bInterfaceProtocol "$ip" || continue + match "$intf"/bInterfaceNumber "$in" || continue + + # Matched interface. Add to count if it was probed by driver. + [ -d "$intf"/driver ] && cur_count=$((cur_count+1)) + done + done + + if [ "$cur_count" -eq "$count" ]; then + ktap_test_pass usb."$name" + else + ktap_test_fail usb."$name" + retval="$KSFT_FAIL" + fi +} + +pci() +{ + name="$1" + count="$2" + shift 2 + + for arg in $@; do + [[ "$arg" =~ ^v= ]] && v="${arg#v=}" + [[ "$arg" =~ ^d= ]] && d="${arg#d=}" + [[ "$arg" =~ ^sv= ]] && sv="${arg#sv=}" + [[ "$arg" =~ ^sd= ]] && sd="${arg#sd=}" + [[ "$arg" =~ ^bc= ]] && bc="${arg#bc=}" + [[ "$arg" =~ ^sc= ]] && sc="${arg#sc=}" + [[ "$arg" =~ ^i= ]] && i="${arg#i=}" + done + + cur_count=0 + + for dev in $(find /sys/bus/pci/devices -maxdepth 1); do + match "$dev"/vendor "$v" || continue + match "$dev"/device "$d" || continue + match "$dev"/subsystem_vendor "$sv" || continue + match "$dev"/subsystem_device "$sd" || continue + + [ -z "$bc" ] && bc='..' + [ -z "$sc" ] && sc='..' + [ -z "$i" ] && i='..' + match "$dev/"class "$bc$sc$i" || continue + + # Matched device. Add to count if it was probed by driver. + [ -d "$dev"/driver ] && cur_count=$((cur_count+1)) + done + + if [ "$cur_count" -eq "$count" ]; then + ktap_test_pass pci."$name" + else + ktap_test_fail pci."$name" + retval="$KSFT_FAIL" + fi +} + +ktap_print_header + +plat_compatible=/proc/device-tree/compatible + +if [ ! -f "$plat_compatible" ]; then + ktap_skip_all "No board compatible available" + exit "$KSFT_SKIP" +fi + +compatibles=$(tr '\000' '\n' < "$plat_compatible") + +for compatible in $compatibles; do + if [ -f boards/"$compatible" ]; then + board_file=boards/"$compatible" + break + fi +done + +if [ -z "$board_file" ]; then + ktap_skip_all "No matching board file found" + exit "$KSFT_SKIP" +fi + +echo "# Using board file: " "$board_file" + +num_tests=$(grep -E "^(usb|pci)" "$board_file" | wc -l) +ktap_set_plan "$num_tests" + +source "$board_file" + +ktap_print_totals +exit "${retval}" From patchwork Mon Nov 27 23:34:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 170501 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3545767vqx; Mon, 27 Nov 2023 15:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEs8kTVlvrLWogUBVv+hWvrCh43ax5nwq9fOQhgH4maunx5uXq9q/SJbRwp580VTKK1TzgJ X-Received: by 2002:a17:903:246:b0:1c5:d063:b70e with SMTP id j6-20020a170903024600b001c5d063b70emr12339703plh.53.1701128190349; Mon, 27 Nov 2023 15:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701128190; cv=none; d=google.com; s=arc-20160816; b=tluE+kqd/3Sd4suyg35/X0Z3urO3bSW9o0EoSpmrQWtkkIbG8Z3DuOD/i+e0NJtz9p jMK6Sj8O+99k+IkTuIK7JIYP1GASuXcyQCmRW5Bc4bZP+cOfk0Ifoi8DnHXZyEIphQcI s7HCpleqSr+UvOXJf6d/sh2Ap/Tl9BVLNqSNiebwSP4L7+JavAwe/+GxOcLMoqgMCt8n qz92Ffmy0oJRDenAtElNab23H5x3eY6mBDDUhtgM1eNN0uXCEcUbHtb7VXhiRnxO+HX3 dFnApaNZFIQ2beSyLW4EIaba1rNXswUvkw/IEMrmj8UHdpDgaKjXPdzsVpNpT/kZqy+a 9V6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IrZtezRGR3XjfMrpun6vcoC/2KOJMlrVtZG9YXbrx1k=; fh=PT/fWAWUJUNvRr+2iNVO8+Jh8Gwj1ty5Hf/jdhUuinE=; b=eLePirjKg4MrsobCDkVstLtsslPoxjGnBHlO6pqjaZmD1D5g8MibOVpVPhKjIqd0Ld L57XkuejeoJ5Fsk4gkrR9B7ydGqbC2Sh1rFYnSldeRxlbe9I567xincLSVgFDM9DmsOk xy7zWU4pOBJgn25qCo+5FahuZ0hA5yI7JoXTRLKW9sVxE6C6dZaz4h0n/nUZUshl9H2k 1VX4G5j0UlxC4n1X2EkdQfnHfcJmBl3cVEIlJKLyg3MqX5IDmECub2wX7xrF/L0yiqk2 76tiXLu+rf2VsuuzZbAUrQyDBRVvsR0hYMbQ+Lm3l69KsSfFBdasAf2lbk91/qQri0SK BAnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ix3kpH7j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id 6-20020a170902ee4600b001b86ddfd49bsi10201851plo.6.2023.11.27.15.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 15:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ix3kpH7j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id E9E5981904E8; Mon, 27 Nov 2023 15:36:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233747AbjK0XgQ (ORCPT + 99 others); Mon, 27 Nov 2023 18:36:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233755AbjK0XgM (ORCPT ); Mon, 27 Nov 2023 18:36:12 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C2AD64; Mon, 27 Nov 2023 15:36:17 -0800 (PST) Received: from notapiano.myfiosgateway.com (cola.collaboradmins.com [195.201.22.229]) (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 madras.collabora.co.uk (Postfix) with ESMTPSA id 2B1A766022D1; Mon, 27 Nov 2023 23:36:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701128175; bh=xYJ3In0iFK7Rcw0FOkP/TEyWe5yZLvjkyvqOPva+JBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ix3kpH7jTiBVkuKQ1dmDso9tRjXE28w//G9DdXw/6B7Uw2wTROqGkt2dX89n3o4W7 yCLpsBmIkqRNenY4BP4WqGT48QWEj9a2aV4ARC8o83Oi8QGCfiafcYg0QYcLMgHpXy 09Pb4beislAGqv4qWguMm1UYEBGWZgosZcJdJDPFlqCmMyjKabWgpVHuCEn9oCYq0b atwJYBeuVlkbAn16I+k5ogfZmftDZeWvu859AAmytcalrcCGLJzlRXQdo3S0Uj/e/G 8JuujBR67bpOg1x/zDxGKW+GrSnXePPvdGHIbM/d9cPtbg56t9ftdnqDX/cl9/QzgO mVT1qIS06Squg== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Shuah Khan , Greg Kroah-Hartman , Bjorn Helgaas Cc: Saravana Kannan , Rob Herring , kernelci@lists.linux.dev, David Gow , Guenter Roeck , linux-kselftest@vger.kernel.org, linux-usb@vger.kernel.org, kernel@collabora.com, Dan Carpenter , Tim Bird , linux-pci@vger.kernel.org, Doug Anderson , devicetree@vger.kernel.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 2/2] kselftest: devices: Add sample board file for google,spherion Date: Mon, 27 Nov 2023 18:34:07 -0500 Message-ID: <20231127233558.868365-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231127233558.868365-1-nfraprado@collabora.com> References: <20231127233558.868365-1-nfraprado@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 15:36:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783762192907955950 X-GMAIL-MSGID: 1783762192907955950 Add a sample board file describing the file's format and with the list of devices expected to be probed on the google,spherion machine as an example. Signed-off-by: NĂ­colas F. R. A. Prado --- (no changes since v1) .../testing/selftests/devices/boards/google,spherion | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tools/testing/selftests/devices/boards/google,spherion diff --git a/tools/testing/selftests/devices/boards/google,spherion b/tools/testing/selftests/devices/boards/google,spherion new file mode 100644 index 000000000000..db9a17cccd03 --- /dev/null +++ b/tools/testing/selftests/devices/boards/google,spherion @@ -0,0 +1,12 @@ +# Example test definition for Google Spherion Chromebook +# +# Format: +# usb|pci test_name number_of_matches field=value [ field=value ... ] +# +# The available match fields vary by bus. The field-value match pairs for a +# device can be retrieved from the device's modalias attribute in sysfs. A +# subset of the fields may be used to make the match more generic so it can work +# with the different hardware variants of a device on the machine. +usb camera 1 ic=0e isc=01 ip=00 +usb bluetooth 1 ic=e0 isc=01 ip=01 in=00 +pci wifi 1 v=14c3 d=7961