From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (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 0B2A91D0F7F for ; Wed, 2 Oct 2024 18:00:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727892015; cv=none; b=eTt2OfCZF2BM7PtQ+TQlz5hAcBFQUUw9gMUVhtGYCZJqAiE4NgvtyuMbyqJXy/gRkxMwdC9aGslfp3p95K/ur+aOMxIFdXnpAmzy/J6/pweiHVvmzU3ln63SsaB3rhvnuYK3jjHNSZN6CCzLBT/nOmFFKW3EfvFFYi60F8AmTlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727892015; c=relaxed/simple; bh=VXOOUNdnAEhPqciXyVZksZiXTp0bQQtRDANzdI1gkBA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SyTzyjt8jU9l91tN84/1VLkdQcrEjPy8Z0dWU+YK0BwHTWLfa9r3tQ/vADTim0srP1QkIdcbPYcmWqcF7X3chycjOM4DGmn0NHrvAqTC41MX/qfv2HBrmCkkDoqY2JsllBPPwA2hsxvdgmiqblgRat6u/FCB/lBKExRpd4+kYkY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=epDG35Aj; arc=none smtp.client-ip=209.85.166.176 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="epDG35Aj" Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3a1f1ef7550so294535ab.1 for ; Wed, 02 Oct 2024 11:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1727892013; x=1728496813; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=h2ii6GPB8LbcDkdZtu/vEyeCXjQrhQgW3fBbVs7hZZg=; b=epDG35AjWOTR3ZFt2UlUdU+I4KpFz+LfzyeqB6CdD/KXyxZ3f9DWXq33XR9yDNsN3D 4BsYR7Lvr9rL+DKqEK10qyqPk4rCJQ3uz60fZ+B/jtwWgwFFivuyiTQdyb0V/DakKww/ jGmgy0oroINrUs29ocEuxqfAYlFTjSxoH84nc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727892013; x=1728496813; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=h2ii6GPB8LbcDkdZtu/vEyeCXjQrhQgW3fBbVs7hZZg=; b=kAiGFT4h3DwU5pKilP/1QR03Mt+5qBTTo2/U9YIXo3K6raA9JdegBlKvoDDB5qyRRz 8p11qCAlccQr2iQ6QV9vCDsToJ0qNJrCnduQyzCNWO68eXHAKGdr4uC7YwmZGKtF5FHi 80gTbhxMNW0rYfls8cAkNeUQYncfJyTj5nAkxSaJGchTJPs0avYIWFTS5+fWMSMwjQD5 K6Cuu1h3utHytPyEjNHVrNxtSnAsdtF4XtbHqQJHaSWydgDLkGGOvjHh0776226IsTNg loV8GxSgojSA62TgAoJAekK0DDzfN+UAMtFPX9CNcDs/0EO6TAkhh+ktbd4JOvhBK32h 6BIA== X-Forwarded-Encrypted: i=1; AJvYcCXNex8cwGyJXOt6eEz4xlnO6CFvTi89bFokhq/wsV3OrjphLrqhuUpQWYNrZbIpvE6vbagzx7OWlmw=@vger.kernel.org X-Gm-Message-State: AOJu0YzlmtopysjL6+4J3Nhh/Wb6TS+h/pqC72hi7hroBvD6K19ELZmO 7KN9B0UaE8iPh3ZQMP0EqAstuefLdz4xKX7L96PIC54gXWZExoiO1jVv1Jp+atU= X-Google-Smtp-Source: AGHT+IFZG+oK4eRQhMYCZ+1EA/WngOtJ5AXbNw+nKvg+PAQy26l2faeXkJTKlKwWhIU/wZbdksh8gQ== X-Received: by 2002:a05:6e02:1a6c:b0:3a0:9026:3b65 with SMTP id e9e14a558f8ab-3a365954e63mr38914205ab.25.1727892012800; Wed, 02 Oct 2024 11:00:12 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d888835090sm3187850173.15.2024.10.02.11.00.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Oct 2024 11:00:11 -0700 (PDT) Message-ID: <0040a842-de9c-4f9c-9d61-c1bfbd010470@linuxfoundation.org> Date: Wed, 2 Oct 2024 12:00:10 -0600 Precedence: bulk X-Mailing-List: workflows@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] docs: dev-tools: Add documentation for the device focused kselftests To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Shuah Khan , Jonathan Corbet Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kernelci@lists.linux.dev, Shuah Khan References: <20241001-kselftest-device-docs-v1-1-be28b70dd855@collabora.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20241001-kselftest-device-docs-v1-1-be28b70dd855@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/1/24 09:43, NĂ­colas F. R. A. Prado wrote: > Add documentation for the kselftests focused on testing devices and > point to it from the kselftest documentation. There are multiple tests > in this category so the aim of this page is to make it clear when to run > each test. > > Signed-off-by: NĂ­colas F. R. A. Prado > --- > This patch depends on patch "kselftest: devices: Add test to detect > missing devices" [1], since this patch documents that test. > > [1] https://lore.kernel.org/all/20240928-kselftest-dev-exist-v2-1-fab07de6b80b@collabora.com > --- > Documentation/dev-tools/kselftest.rst | 9 ++++++ > Documentation/dev-tools/testing-devices.rst | 47 +++++++++++++++++++++++++++++ The new file needs to be added to Documentation/dev-tools/index.rst Docs make should have warned about this? > 2 files changed, 56 insertions(+) > > diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst > index f3766e326d1e..fdb1df86783a 100644 > --- a/Documentation/dev-tools/kselftest.rst > +++ b/Documentation/dev-tools/kselftest.rst > @@ -31,6 +31,15 @@ kselftest runs as a userspace process. Tests that can be written/run in > userspace may wish to use the `Test Harness`_. Tests that need to be > run in kernel space may wish to use a `Test Module`_. > > +Documentation on the tests > +========================== > + > +For documentation on the kselftests themselves, see: > + > +.. toctree:: > + > + testing-devices > + > Running the selftests (hotplug tests are run in limited mode) > ============================================================= > > diff --git a/Documentation/dev-tools/testing-devices.rst b/Documentation/dev-tools/testing-devices.rst > new file mode 100644 > index 000000000000..ab26adb99051 > --- /dev/null > +++ b/Documentation/dev-tools/testing-devices.rst > @@ -0,0 +1,47 @@ > +.. SPDX-License-Identifier: GPL-2.0 > +.. Copyright (c) 2024 Collabora Ltd > + > +============================= > +Device testing with kselftest > +============================= > + Get rid of the extra blank line. > + > +There are a few different kselftests available for testing devices generically, > +with some overlap in coverage and different requirements. This document aims to > +give an overview of each one. > + > +Note: Paths in this document are relative to the kselftest folder > +(``tools/testing/selftests``). > + > +Device oriented kselftests: > + > +* Devicetree (``dt``) > + > + * **Coverage**: Probe status for devices described in Devicetree > + * **Requirements**: None > + > +* Error logs (``devices/error_logs``) > + > + * **Coverage**: Error (or more critical) log messages presence coming from any > + device > + * **Requirements**: None > + > +* Discoverable bus (``devices/probe``) > + > + * **Coverage**: Presence and probe status of USB or PCI devices that have been > + described in the reference file > + * **Requirements**: Manually describe the devices that should be tested in a > + YAML reference file (see ``devices/probe/boards/google,spherion.yaml`` for > + an example) > + > +* Exist (``devices/exist``) > + > + * **Coverage**: Presence of all devices > + * **Requirements**: Generate the reference (see ``devices/exist/README.rst`` > + for details) on a known-good kernel > + > +Therefore, the suggestion is to enable the error log and devicetree tests on all > +(DT-based) platforms, since they don't have any requirements. Then to greatly > +improve coverage, generate the reference for each platform and enable the exist > +test. The discoverable bus test can be used to verify the probe status of > +specific USB or PCI devices, but is probably not worth it for most cases. > > --- > base-commit: cea5425829f77e476b03702426f6b3701299b925 > change-id: 20241001-kselftest-device-docs-6c8a411109b5 > > Best regards, thanks, -- Shuah