Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2965837lqt; Tue, 23 Apr 2024 07:04:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpBJ9h0mQWQKHJ9AW/lmP+HWhndsU8rTe6miNmhNn8nUOBZ4FzdpyuOtP5LsDj2GayQ43lj53B7zRgLp/gMReY22/V+mg6NBVkRIh9MQ== X-Google-Smtp-Source: AGHT+IFnoHLIyRhGobf5Y+5kbhB4u1HpErjfaAcLjpzJEJBpBS3y+mz4zjzV71z/+2ywlCbC+CVe X-Received: by 2002:a05:6402:26cc:b0:56b:f2d8:1552 with SMTP id x12-20020a05640226cc00b0056bf2d81552mr3576246edd.13.1713881071557; Tue, 23 Apr 2024 07:04:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713881071; cv=pass; d=google.com; s=arc-20160816; b=EJU1xonE1oZHqzgiXcFgAuH1k4mZdxrJMvQr4WprT4E2S6dC1yZp+kjIgJd+5BdT8g 3h1KkP84IFf4sSAxZqyIw49RlxR4RlcpIvPYkRs7EPi6Yb1TuACVTBoKlKuz0aUSQKel QQTg27uin+PzS0rBGD7BeHBBXUAsxy2UJRkKTEmVHtu/me2vJhNBnqdq/IKmj/e3Alhm ZNnElrGxT9MoUUxJTA2QytgYjPalfm0lh/xmSalvdMF5+AV7IKE5RmOrgxiC0CYiXjey Xqyit3WUPfAv9I57em93ApH/fqvHOI7c54BDqgsRCT1vXXr4ZONoqkWpl4Uk7N8QR2jp MIAA== 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=Jmfh8g+5VQpvB4dgyT0QxbbxhQ++utKC6rm59dFqCNA=; fh=PzEo1TAbqGU++Rl2jk3C4jWei8O9/KMr68P7lC5V4B0=; b=gN/6KAfoBQGjsFBUshI0Hn2Y8QZ4Hquwsfoi7sV+fXrT02tZPlhbE/xUg7jZKz67xN s9ENHK/u1cJIQhWODbjiWE0Vcyjg8RuIAY4RcrAJKgAYrFwM/AVC2u9y0x/5V01ZCx82 kIhCQzJkEdwhRFYFptv4Z5jqzhJTZ10qbdQDN8HruaZW7aTQ5pTmo/5AARYf43B7wNJJ axghGtYXKW2rrOnHrQe8LKuKWHpdizULMki7Q1GxhwKdonzHx0w5hJp+swp/Ma0j4CQ8 4cNWmPriw1KWfCZjX9PWGZuY2nP9ep4T6PHNy8I9AEI1ir8OQIW1J857VnCiyZ+pL6P0 qL3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=qpT3A78d; 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-155334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155334-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c18-20020a50f612000000b0056beaae3d0dsi7154700edn.547.2024.04.23.07.04.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=qpT3A78d; 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-155334-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155334-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 499D31F21723 for ; Tue, 23 Apr 2024 14:04:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92102137C5C; Tue, 23 Apr 2024 14:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="qpT3A78d" 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 7E0F8137900; Tue, 23 Apr 2024 14:04:13 +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=1713881059; cv=none; b=V/l1E5GNNi6Fli8UTkTmNYco23vCNGHi/MvVh80IcNiKeHlX35w4iwVM/pYBIhnYKBPal04z7avBpClQJh429UJ+VlUXjMEzSmZ8wD50R9umoNMW8dWyYVLfQUn2C5oIBV9AS04UCKkXK5z5xE7H6zKNcxr1E0DOiwCq3a3ec8A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713881059; c=relaxed/simple; bh=neo6VBlrt3qDMQ41DWfk27jOXU9k4IUrHGw5mjmSN2I=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=QnZg/+iKdIU5jBKc29SkkoyjqhuF4xCPSXEsqL518JR/ML0N01+RgZngKVEEpi17/Gqld5UMlID1shv49f0BZY1kTnBywhvzg0+pu/cvE6QoAK90kZTe6H00TminBDdsPHPZQ7QrmOze1fnY37uCauXF0C7/yfjTlvdDFq4fLcg= 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=qpT3A78d; 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=1713881051; bh=neo6VBlrt3qDMQ41DWfk27jOXU9k4IUrHGw5mjmSN2I=; h=From:Subject:Date:To:Cc:From; b=qpT3A78dofnqODQw2poC2hDIcGFP3T7ESuNcdikFHEdSGafE9QYN2hth0gc56/wrT Ghpv2hSSn4fyCAiLIwJ6bbTK4lzQSq/hsa7aaRNnjCW3y6A2TD+QEksq9Yp2X8mudb QBojiq+BjOVTfsPExYtD3jycZr0uiAfbZFNW3yG0xRqPxCLTPkYMLk5ytz1YOFKeN1 z9CO/EBQFYtRj8K+puzwEkjRUhSrbnCi/nJnlJpcahuHll4lJLCET0nhQlEb11/8HB N6nM5+CxR/lxd2cHIKNhme2wRhMHnNDHxPWYrsX2R8jRtGe+lwEX82DRlIFprGVAlw B0VHZ7JchKZPA== Received: from [192.168.1.205] (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 0E86737820F9; Tue, 23 Apr 2024 14:04:09 +0000 (UTC) From: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado?= Subject: [PATCH 0/3] kselftest: Add test to report device log errors Date: Tue, 23 Apr 2024 10:03:39 -0400 Message-Id: <20240423-dev-err-log-selftest-v1-0-690c1741d68b@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=H4sIALu/J2YC/x3MQQqEMAxG4atI1gZqUUa8irhw2r9OQFQSEaF49 ykuv8V7mQwqMBqqTIpLTPatoKkrCr95W8ASi8k737rWNxxxMVR53Rc2rOmEnez71H37FD4hOir poUhyv9txep4/oPpJVmYAAAA= To: Shuah Khan , Greg Kroah-Hartman Cc: kernel@collabora.com, linux-kselftest@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.13.0 Log errors are the most widely used mechanism for reporting issues in the kernel. When an error is logged using the device helpers, eg dev_err(), it gets metadata attached that identifies the subsystem and device where the message is coming from. This series makes use of that metadata in a new test to report which devices logged errors. The first two patches move a test and a helper script to keep things organized before this new test is added in the third patch. It is expected that there might be many false-positive error messages throughout the drivers code which will be reported by this test. By having this test in the first place and working through the results we can address those occurrences by adjusting the loglevel of the messages that turn out to not be real errors that require the user's attention. It will also motivate additional error messages to be introduced in the code to detect real errors where they turn out to be missing, since it will be possible to detect said issues automatically. As an example, below you can see the test result for mt8192-asurada-spherion. The single standing issue has been investigated and will be addressed in an EC firmware update [1]: TAP version 13 1..1 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `model_name' property: -6 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `energy_full_design' property: -6 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 power_supply sbs-8-000b: driver failed to report `time_to_empty_now' property: -5 not ok 1 +power_supply:sbs-8-000b Totals: pass:0 fail:1 xfail:0 xpass:0 skip:0 error:0 [1] https://lore.kernel.org/all/cf4d8131-4b63-4c7a-9f27-5a0847c656c4@notapiano Signed-off-by: Nícolas F. R. A. Prado --- Nícolas F. R. A. Prado (3): kselftest: devices: Move discoverable devices test to subdirectory kselftest: Move ksft helper module to common directory kselftest: devices: Add test to detect device error logs tools/testing/selftests/Makefile | 4 +- tools/testing/selftests/devices/Makefile | 4 - .../testing/selftests/devices/error_logs/Makefile | 3 + .../devices/error_logs/test_device_error_logs.py | 85 ++++++++++++++++++++++ tools/testing/selftests/devices/probe/Makefile | 4 + .../{ => probe}/boards/Dell Inc.,XPS 13 9300.yaml | 0 .../{ => probe}/boards/google,spherion.yaml | 0 .../{ => probe}/test_discoverable_devices.py | 7 +- .../selftests/{devices => kselftest}/ksft.py | 0 9 files changed, 101 insertions(+), 6 deletions(-) --- base-commit: 7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d change-id: 20240421-dev-err-log-selftest-28f5b8fc7cd0 Best regards, -- Nícolas F. R. A. Prado