요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. Copyright (c) 2024 Collabora Ltd
=============================
Device testing with kselftest
=============================
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.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
kselftest를 이용한 device testing
1-47SPDX 라이선스 식별자: GPL-2.0
Copyright (c) 2024 Collabora Ltd
kselftest를 이용한 device testing
Device를 generic하게 검사하는 kselftest가 여러 개 있으며 coverage가 일부 겹치고 요구 사항은 서로 다릅니다. 이 문서는 각 test의 개요를 제공합니다.
참고: 이 문서의 path는 kselftest folder `tools/testing/selftests`를 기준으로 한 상대 path입니다.
Device-oriented kselftest는 다음과 같습니다.
Devicetree (`dt`): Devicetree에 기술된 device의 probe status를 검사하며 별도 요구 사항이 없습니다.
Error logs (`devices/error_logs`): 임의의 device에서 발생한 error level 또는 그보다 심각한 log message가 존재하는지 검사하며 별도 요구 사항이 없습니다.
Discoverable bus (`devices/probe`): Reference file에 기술된 USB 또는 PCI device의 존재와 probe status를 검사합니다. 검사할 device를 YAML reference file에 수동으로 기술해야 하며 예는 `devices/probe/boards/google,spherion.yaml`입니다.
Exist (`devices/exist`): 모든 device의 존재를 검사합니다. Known-good kernel에서 reference를 생성해야 하며 자세한 방법은 `devices/exist/README.rst`를 참조하십시오.
따라서 별도 요구 사항이 없는 error log test와 Devicetree test는 모든 DT-based platform에서 활성화하는 것이 좋습니다. Coverage를 크게 높이려면 platform마다 reference를 생성해 exist test도 활성화합니다.
Discoverable bus test는 특정 USB 또는 PCI device의 probe status 확인에 사용할 수 있지만 대부분의 경우 투입 비용만큼 유용하지 않을 수 있습니다.
각 test의 coverage와 사전 준비를 한눈에 비교합니다.
요약과 해설
testing-devices.rst:1-47DT-based platform에는 준비가 필요 없는 dt와 error_logs test를 기본 적용하고 known-good reference를 생성해 devices/exist coverage를 추가하는 구성이 권장됩니다.