Documentation/driver-api/mmc/mmc-test.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

MMC Test Framework

MMC test 설정, bind, debugfs, 시험 0~51, 결과의 전문 번역입니다.

Source pathDocumentation/driver-api/mmc/mmc-test.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

mmc-test.rst:1-299

`mmc_test`는 card 내용을 덮어쓰며 기본 I/O부터 성능, SG, reset, CMD23까지 52개 번호로 검증합니다.

문서 구성
원문 줄내용
1-23개요와 주의
24-58설정과 load
59-90Card bind
91-133Debugfs
134-263시험 0~51
264-290결과
291-299기여와 연락처

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ========================
4 MMC Test Framework
5 ========================
6
7 Overview
8 ========
9
10 The `mmc_test` framework is designed to test the performance and reliability of host controller drivers and all devices handled by the MMC subsystem. This includes not only MMC devices but also SD cards and other devices supported by the subsystem.
11
12 The framework provides a variety of tests to evaluate different aspects of the host controller and device interactions, such as read and write performance, data integrity, and error handling. These tests help ensure that the host controller drivers and devices operate correctly under various conditions.
13
14 The `mmc_test` framework is particularly useful for:
15
16 - Verifying the functionality and performance of MMC and SD host controller drivers.
17 - Ensuring compatibility and reliability of MMC and SD devices.
18 - Identifying and diagnosing issues in the MMC subsystem.
19
20 The results of the tests are logged in the kernel log, providing detailed information about the test outcomes and any encountered issues.
21
22 Note: whatever is on your card will be overwritten by these tests.
23
24 Initialization
25 ==============
26
27 To use the ``mmc_test`` framework, follow these steps:
28
29 1. **Enable the MMC Test Framework**:
30
31 Ensure that the ``CONFIG_MMC_TEST`` kernel configuration option is enabled. This can be done by configuring the kernel:
32
33 .. code-block:: none
34
35 make menuconfig
36
37 Navigate to:
38
39 Device Drivers --->
40 <*> MMC/SD/SDIO card support --->
41 [*] MMC host test driver
42
43 Alternatively, you can enable it directly in the kernel configuration file:
44
45 .. code-block:: none
46
47 echo "CONFIG_MMC_TEST=y" >> .config
48
49 Rebuild and install the kernel if necessary.
50
51 2. **Load the MMC Test Module**:
52
53 If the ``mmc_test`` framework is built as a module, you need to load it using ``modprobe``:
54
55 .. code-block:: none
56
57 modprobe mmc_test
58
59 Binding the MMC Card for Testing
60 ================================
61
62 To enable MMC testing, you need to unbind the MMC card from the ``mmcblk`` driver and bind it to the ``mmc_test`` driver. This allows the ``mmc_test`` framework to take control of the MMC card for testing purposes.
63
64 1. Identify the MMC card:
65
66 .. code-block:: sh
67
68 ls /sys/bus/mmc/devices/
69
70 This will list the MMC devices, such as ``mmc0:0001``.
71
72 2. Unbind the MMC card from the ``mmcblk`` driver:
73
74 .. code-block:: sh
75
76 echo 'mmc0:0001' > /sys/bus/mmc/drivers/mmcblk/unbind
77
78 3. Bind the MMC card to the ``mmc_test`` driver:
79
80 .. code-block:: sh
81
82 echo 'mmc0:0001' > /sys/bus/mmc/drivers/mmc_test/bind
83
84 After binding, you should see a line in the kernel log indicating that the card has been claimed for testing:
85
86 .. code-block:: none
87
88 mmc_test mmc0:0001: Card claimed for testing.
89
90
91 Usage - Debugfs Entries
92 =======================
93
94 Once the ``mmc_test`` framework is enabled, you can interact with the following debugfs entries located in ``/sys/kernel/debug/mmc0/mmc0:0001``:
95
96 1. **test**:
97
98 This file is used to run specific tests. Write the test number to this file to execute a test.
99
100 .. code-block:: sh
101
102 echo <test_number> > /sys/kernel/debug/mmc0/mmc0:0001/test
103
104 The test result is indicated in the kernel log info. You can view the kernel log using the `dmesg` command or by checking the log file in `/var/log/`.
105
106 .. code-block:: sh
107
108 dmesg | grep mmc0
109
110 Example:
111
112 To run test number 4 (Basic read with data verification):
113
114 .. code-block:: sh
115
116 echo 4 > /sys/kernel/debug/mmc0/mmc0:0001/test
117
118 Check the kernel log for the result:
119
120 .. code-block:: sh
121
122 dmesg | grep mmc0
123
124 2. **testlist**:
125
126 This file lists all available tests. You can read this file to see the list of tests and their corresponding numbers.
127
128 .. code-block:: sh
129
130 cat /sys/kernel/debug/mmc0/mmc0:0001/testlist
131
132 The available tests are listed in the table below:
133
134 +------+--------------------------------+---------------------------------------------+
135 | Test | Test Name | Test Description |
136 +======+================================+=============================================+
137 | 0 | Run all tests | Runs all available tests |
138 +------+--------------------------------+---------------------------------------------+
139 | 1 | Basic write | Performs a basic write operation of a |
140 | | | single 512-Byte block to the MMC card |
141 | | | without data verification. |
142 +------+--------------------------------+---------------------------------------------+
143 | 2 | Basic read | Same for read |
144 +------+--------------------------------+---------------------------------------------+
145 | 3 | Basic write | Performs a basic write operation of a |
146 | | (with data verification) | single 512-Byte block to the MMC card |
147 | | | with data verification by reading back |
148 | | | the written data and comparing it. |
149 +------+--------------------------------+---------------------------------------------+
150 | 4 | Basic read | Same for read |
151 | | (with data verification) | |
152 +------+--------------------------------+---------------------------------------------+
153 | 5 | Multi-block write | Performs a multi-block write operation of |
154 | | | 8 blocks (each 512 bytes) to the MMC card. |
155 +------+--------------------------------+---------------------------------------------+
156 | 6 | Multi-block read | Same for read |
157 +------+--------------------------------+---------------------------------------------+
158 | 7 | Power of two block writes | Performs write operations with block sizes |
159 | | | that are powers of two, starting from 1 |
160 | | | byte up to 256 bytes, to the MMC card. |
161 +------+--------------------------------+---------------------------------------------+
162 | 8 | Power of two block reads | Same for read |
163 +------+--------------------------------+---------------------------------------------+
164 | 9 | Weird sized block writes | Performs write operations with varying |
165 | | | block sizes starting from 3 bytes and |
166 | | | increasing by 7 bytes each iteration, up |
167 | | | to 511 bytes, to the MMC card. |
168 +------+--------------------------------+---------------------------------------------+
169 | 10 | Weird sized block reads | same for read |
170 +------+--------------------------------+---------------------------------------------+
171 | 11 | Badly aligned write | Performs write operations with buffers |
172 | | | starting at different alignments (0 to 7 |
173 | | | bytes offset) to test how the MMC card |
174 | | | handles unaligned data transfers. |
175 +------+--------------------------------+---------------------------------------------+
176 | 12 | Badly aligned read | same for read |
177 +------+--------------------------------+---------------------------------------------+
178 | 13 | Badly aligned multi-block write| same for multi-write |
179 +------+--------------------------------+---------------------------------------------+
180 | 14 | Badly aligned multi-block read | same for multi-read |
181 +------+--------------------------------+---------------------------------------------+
182 | 15 | Proper xfer_size at write | intentionally create a broken transfer by |
183 | | (Start failure) | modifying the MMC request in a way that it |
184 | | | will not perform as expected, e.g. use |
185 | | | MMC_WRITE_BLOCK for a multi-block transfer |
186 +------+--------------------------------+---------------------------------------------+
187 | 16 | Proper xfer_size at read | same for read |
188 | | (Start failure) | |
189 +------+--------------------------------+---------------------------------------------+
190 | 17 | Proper xfer_size at write | same for 2 blocks |
191 | | (Midway failure) | |
192 +------+--------------------------------+---------------------------------------------+
193 | 18 | Proper xfer_size at read | same for read |
194 | | (Midway failure) | |
195 +------+--------------------------------+---------------------------------------------+
196 | 19 | Highmem write | use a high memory page |
197 +------+--------------------------------+---------------------------------------------+
198 | 20 | Highmem read | same for read |
199 +------+--------------------------------+---------------------------------------------+
200 | 21 | Multi-block highmem write | same for multi-write |
201 +------+--------------------------------+---------------------------------------------+
202 | 22 | Multi-block highmem read | same for mult-read |
203 +------+--------------------------------+---------------------------------------------+
204 | 23 | Best-case read performance | Performs 512K sequential read (non sg) |
205 +------+--------------------------------+---------------------------------------------+
206 | 24 | Best-case write performance | same for write |
207 +------+--------------------------------+---------------------------------------------+
208 | 25 | Best-case read performance | Same using sg |
209 | | (Into scattered pages) | |
210 +------+--------------------------------+---------------------------------------------+
211 | 26 | Best-case write performance | same for write |
212 | | (From scattered pages) | |
213 +------+--------------------------------+---------------------------------------------+
214 | 27 | Single read performance | By transfer size |
215 +------+--------------------------------+---------------------------------------------+
216 | 28 | Single write performance | By transfer size |
217 +------+--------------------------------+---------------------------------------------+
218 | 29 | Single trim performance | By transfer size |
219 +------+--------------------------------+---------------------------------------------+
220 | 30 | Consecutive read performance | By transfer size |
221 +------+--------------------------------+---------------------------------------------+
222 | 31 | Consecutive write performance | By transfer size |
223 +------+--------------------------------+---------------------------------------------+
224 | 32 | Consecutive trim performance | By transfer size |
225 +------+--------------------------------+---------------------------------------------+
226 | 33 | Random read performance | By transfer size |
227 +------+--------------------------------+---------------------------------------------+
228 | 34 | Random write performance | By transfer size |
229 +------+--------------------------------+---------------------------------------------+
230 | 35 | Large sequential read | Into scattered pages |
231 +------+--------------------------------+---------------------------------------------+
232 | 36 | Large sequential write | From scattered pages |
233 +------+--------------------------------+---------------------------------------------+
234 | 37 | Write performance | With blocking req 4k to 4MB |
235 +------+--------------------------------+---------------------------------------------+
236 | 38 | Write performance | With non-blocking req 4k to 4MB |
237 +------+--------------------------------+---------------------------------------------+
238 | 39 | Read performance | With blocking req 4k to 4MB |
239 +------+--------------------------------+---------------------------------------------+
240 | 40 | Read performance | With non-blocking req 4k to 4MB |
241 +------+--------------------------------+---------------------------------------------+
242 | 41 | Write performance | Blocking req 1 to 512 sg elems |
243 +------+--------------------------------+---------------------------------------------+
244 | 42 | Write performance | Non-blocking req 1 to 512 sg elems |
245 +------+--------------------------------+---------------------------------------------+
246 | 43 | Read performance | Blocking req 1 to 512 sg elems |
247 +------+--------------------------------+---------------------------------------------+
248 | 44 | Read performance | Non-blocking req 1 to 512 sg elems |
249 +------+--------------------------------+---------------------------------------------+
250 | 45 | Reset test | |
251 +------+--------------------------------+---------------------------------------------+
252 | 46 | Commands during read | No Set Block Count (CMD23) |
253 +------+--------------------------------+---------------------------------------------+
254 | 47 | Commands during write | No Set Block Count (CMD23) |
255 +------+--------------------------------+---------------------------------------------+
256 | 48 | Commands during read | Use Set Block Count (CMD23) |
257 +------+--------------------------------+---------------------------------------------+
258 | 49 | Commands during write | Use Set Block Count (CMD23) |
259 +------+--------------------------------+---------------------------------------------+
260 | 50 | Commands during non-blocking | Read - use Set Block Count (CMD23) |
261 +------+--------------------------------+---------------------------------------------+
262 | 51 | Commands during non-blocking | Write - use Set Block Count (CMD23) |
263 +------+--------------------------------+---------------------------------------------+
264
265 Test Results
266 ============
267
268 The results of the tests are logged in the kernel log. Each test logs the start, end, and result of the test. The possible results are:
269
270 - **OK**: The test completed successfully.
271 - **FAILED**: The test failed.
272 - **UNSUPPORTED (by host)**: The test is unsupported by the host.
273 - **UNSUPPORTED (by card)**: The test is unsupported by the card.
274 - **ERROR**: An error occurred during the test.
275
276 Example Kernel Log Output
277 =========================
278
279 When running a test, you will see log entries similar to the following in the kernel log:
280
281 .. code-block:: none
282
283 [ 1234.567890] mmc0: Starting tests of card mmc0:0001...
284 [ 1234.567891] mmc0: Test case 4. Basic read (with data verification)...
285 [ 1234.567892] mmc0: Result: OK
286 [ 1234.567893] mmc0: Tests completed.
287
288 In this example, test case 4 (Basic read with data verification) was executed, and the result was OK.
289
290
291 Contributing
292 ============
293
294 Contributions to the `mmc_test` framework are welcome. Please follow the standard Linux kernel contribution guidelines and submit patches to the appropriate maintainers.
295
296 Contact
297 =======
298
299 For more information or to report issues, please contact the MMC subsystem maintainers.
300

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

`mmc_test` 개요와 주의 사항

1-23

`GPL-2.0` 문서의 `mmc_test` framework는 MMC subsystem이 처리하는 MMC, SD 및 기타 장치와 host controller driver의 성능과 신뢰성을 시험합니다.

Read/write 성능, data integrity, error handling 등 host controller와 device 상호작용의 여러 측면을 평가해 다양한 조건에서 정상 동작하는지 확인합니다.

주요 용도는 MMC/SD host driver 기능과 성능 검증, 장치 호환성과 신뢰성 확인, MMC subsystem 문제 식별과 진단입니다. 결과와 오류는 kernel log에 기록됩니다.

주의: 이 시험은 card에 있던 모든 내용을 덮어씁니다.

`mmc_test` 검증 범위
범위목적
Host controller기능과 성능
MMC/SD device호환성과 신뢰성
I/O pathRead/write, integrity, error handling
Card data시험 중 덮어쓰기

.. SPDX-License-Identifier: GPL-2.0

========================
MMC Test Framework
========================

Overview
========

The `mmc_test` framework is designed to test the performance and reliability of host controller drivers and all devices handled by the MMC subsystem. This includes not only MMC devices but also SD cards and other devices supported by the subsystem.

The framework provides a variety of tests to evaluate different aspects of the host controller and device interactions, such as read and write performance, data integrity, and error handling. These tests help ensure that the host controller drivers and devices operate correctly under various conditions.

The `mmc_test` framework is particularly useful for:

- Verifying the functionality and performance of MMC and SD host controller drivers.
- Ensuring compatibility and reliability of MMC and SD devices.
- Identifying and diagnosing issues in the MMC subsystem.

The results of the tests are logged in the kernel log, providing detailed information about the test outcomes and any encountered issues.

Note: whatever is on your card will be overwritten by these tests.

Kernel 설정과 module load

24-58

`mmc_test`를 사용하려면 `CONFIG_MMC_TEST` kernel option을 enable합니다. `make menuconfig`에서 Device Drivers, MMC/SD/SDIO card support, MMC host test driver 경로를 선택할 수 있습니다.

또는 `.config`에 `CONFIG_MMC_TEST=y`를 추가한 뒤 필요하면 kernel을 rebuild하고 install합니다.

Framework를 module로 빌드했다면 `modprobe mmc_test`로 load합니다.

MMC test 초기화
`CONFIG_MMC_TEST=y`Kernel rebuild/install
Module build`modprobe mmc_test`

Kernel 설정을 활성화하고 built-in 또는 module 형태로 준비합니다.

Initialization
==============

To use the ``mmc_test`` framework, follow these steps:

1. **Enable the MMC Test Framework**:

   Ensure that the ``CONFIG_MMC_TEST`` kernel configuration option is enabled. This can be done by configuring the kernel:

   .. code-block:: none

      make menuconfig

   Navigate to:

   Device Drivers  --->
     <*> MMC/SD/SDIO card support  --->
       [*]   MMC host test driver

   Alternatively, you can enable it directly in the kernel configuration file:

   .. code-block:: none

      echo "CONFIG_MMC_TEST=y" >> .config

   Rebuild and install the kernel if necessary.

2. **Load the MMC Test Module**:

   If the ``mmc_test`` framework is built as a module, you need to load it using ``modprobe``:

   .. code-block:: none

      modprobe mmc_test

시험할 card bind

59-90

시험하려는 card를 `mmcblk` driver에서 unbind하고 `mmc_test` driver에 bind해야 framework가 card 제어권을 얻습니다.

`/sys/bus/mmc/devices/`에서 `mmc0:0001` 같은 장치 ID를 찾습니다. 해당 ID를 `mmcblk/unbind`에 쓴 뒤 `mmc_test/bind`에 씁니다.

성공하면 kernel log에 `Card claimed for testing.` 메시지가 나타납니다.

Card driver 전환
`ls /sys/bus/mmc/devices/``mmc0:0001` 확인
`mmcblk/unbind``mmc_test/bind`
Kernel logCard claimed for testing

장치 ID를 식별한 뒤 block driver에서 test driver로 옮깁니다.

Binding the MMC Card for Testing
================================

To enable MMC testing, you need to unbind the MMC card from the ``mmcblk`` driver and bind it to the ``mmc_test`` driver. This allows the ``mmc_test`` framework to take control of the MMC card for testing purposes.

1. Identify the MMC card:

   .. code-block:: sh

      ls /sys/bus/mmc/devices/

   This will list the MMC devices, such as ``mmc0:0001``.

2. Unbind the MMC card from the ``mmcblk`` driver:

   .. code-block:: sh

      echo 'mmc0:0001' > /sys/bus/mmc/drivers/mmcblk/unbind

3. Bind the MMC card to the ``mmc_test`` driver:

   .. code-block:: sh

      echo 'mmc0:0001' > /sys/bus/mmc/drivers/mmc_test/bind

After binding, you should see a line in the kernel log indicating that the card has been claimed for testing:

.. code-block:: none

   mmc_test mmc0:0001: Card claimed for testing.

Debugfs `test`와 `testlist`

91-133

Framework가 enable되면 `/sys/kernel/debug/mmc0/mmc0:0001` 아래의 debugfs entry를 사용합니다.

`test` 파일에 test number를 쓰면 해당 시험을 실행합니다. 결과는 kernel log에 기록되며 `dmesg | grep mmc0`로 확인할 수 있습니다. 예를 들어 번호 4는 data verification을 포함한 basic read입니다.

`testlist` 파일은 실행 가능한 모든 시험의 번호와 이름을 보여줍니다.

Debugfs entry
Entry동작
`test`Test number를 써서 실행
`testlist`지원 test 목록 읽기
`dmesg | grep mmc0`결과 확인

Usage - Debugfs Entries
=======================

Once the ``mmc_test`` framework is enabled, you can interact with the following debugfs entries located in ``/sys/kernel/debug/mmc0/mmc0:0001``:

1. **test**:

   This file is used to run specific tests. Write the test number to this file to execute a test.

   .. code-block:: sh

      echo <test_number> > /sys/kernel/debug/mmc0/mmc0:0001/test

   The test result is indicated in the kernel log info. You can view the kernel log using the `dmesg` command or by checking the log file in `/var/log/`.

   .. code-block:: sh

      dmesg | grep mmc0

   Example:

   To run test number 4 (Basic read with data verification):

   .. code-block:: sh

      echo 4 > /sys/kernel/debug/mmc0/mmc0:0001/test

   Check the kernel log for the result:

   .. code-block:: sh

      dmesg | grep mmc0

2. **testlist**:

   This file lists all available tests. You can read this file to see the list of tests and their corresponding numbers.

   .. code-block:: sh

      cat /sys/kernel/debug/mmc0/mmc0:0001/testlist

   The available tests are listed in the table below:

시험 번호 0부터 51

134-263

Test 0은 전체 시험을 실행합니다. 1부터 51은 기본 I/O, 정렬, highmem, 성능, blocking/non-blocking, scatter-gather, reset, CMD23 command 동작을 개별 검증합니다.

`mmc_test` 시험 목록
번호시험설명
0Run all tests사용 가능한 모든 시험 실행
1Basic write검증 없이 512-byte block 하나 쓰기
2Basic read기본 read
3Basic write with verification512-byte block을 쓰고 다시 읽어 비교
4Basic read with verification검증을 포함한 기본 read
5Multi-block write512-byte block 8개 쓰기
6Multi-block readMulti-block read
7Power-of-two block writes1~256 byte의 2의 거듭제곱 크기 write
8Power-of-two block reads같은 크기의 read
9Weird-sized block writes3 byte부터 7 byte씩 늘려 511 byte까지 write
10Weird-sized block reads같은 크기의 read
11Badly aligned write0~7 byte offset buffer write
12Badly aligned read같은 alignment의 read
13Badly aligned multi-block writeUnaligned multi-write
14Badly aligned multi-block readUnaligned multi-read
15Proper xfer_size write start failureMulti-block에 `MMC_WRITE_BLOCK` 등을 써 의도적으로 잘못된 transfer 생성
16Proper xfer_size read start failureRead의 start failure
17Proper xfer_size write midway failure2-block write의 중간 failure
18Proper xfer_size read midway failureRead의 중간 failure
19Highmem writeHigh memory page 사용
20Highmem readHigh memory page read
21Multi-block highmem writeHighmem multi-write
22Multi-block highmem readHighmem multi-read
23Best-case read performanceNon-SG 512 KiB sequential read
24Best-case write performanceNon-SG sequential write
25Best-case read into scattered pagesSG를 사용한 read
26Best-case write from scattered pagesSG를 사용한 write
27Single read performanceTransfer size별 single read
28Single write performanceTransfer size별 single write
29Single trim performanceTransfer size별 single trim
30Consecutive read performanceTransfer size별 연속 read
31Consecutive write performanceTransfer size별 연속 write
32Consecutive trim performanceTransfer size별 연속 trim
33Random read performanceTransfer size별 random read
34Random write performanceTransfer size별 random write
35Large sequential readScattered page로 대용량 sequential read
36Large sequential writeScattered page에서 대용량 sequential write
37Blocking write performance4 KiB~4 MiB blocking request
38Non-blocking write performance4 KiB~4 MiB non-blocking request
39Blocking read performance4 KiB~4 MiB blocking request
40Non-blocking read performance4 KiB~4 MiB non-blocking request
41Blocking SG write1~512 SG element
42Non-blocking SG write1~512 SG element
43Blocking SG read1~512 SG element
44Non-blocking SG read1~512 SG element
45Reset testCard reset 검증
46Commands during readCMD23 없이 read
47Commands during writeCMD23 없이 write
48Commands during readCMD23을 사용한 read
49Commands during writeCMD23을 사용한 write
50Commands during non-blocking readCMD23을 사용한 non-blocking read
51Commands during non-blocking writeCMD23을 사용한 non-blocking write

+------+--------------------------------+---------------------------------------------+
| Test | Test Name                      | Test Description                            |
+======+================================+=============================================+
| 0    | Run all tests                  | Runs all available tests                    |
+------+--------------------------------+---------------------------------------------+
| 1    | Basic write                    | Performs a basic write operation of a       |
|      |                                | single 512-Byte block to the MMC card       |
|      |                                | without data verification.                  |
+------+--------------------------------+---------------------------------------------+
| 2    | Basic read                     | Same for read                               |
+------+--------------------------------+---------------------------------------------+
| 3    | Basic write                    | Performs a basic write operation of a       |
|      | (with data verification)       | single 512-Byte block to the MMC card       |
|      |                                | with data verification by reading back      |
|      |                                | the written data and comparing it.          |
+------+--------------------------------+---------------------------------------------+
| 4    | Basic read                     | Same for read                               |
|      | (with data verification)       |                                             |
+------+--------------------------------+---------------------------------------------+
| 5    | Multi-block write              | Performs a multi-block write operation of   |
|      |                                | 8 blocks (each 512 bytes) to the MMC card.  |
+------+--------------------------------+---------------------------------------------+
| 6    | Multi-block read               | Same for read                               |
+------+--------------------------------+---------------------------------------------+
| 7    | Power of two block writes      | Performs write operations with block sizes  |
|      |                                | that are powers of two, starting from 1     |
|      |                                | byte up to 256 bytes, to the MMC card.      |
+------+--------------------------------+---------------------------------------------+
| 8    | Power of two block reads       | Same for read                               |
+------+--------------------------------+---------------------------------------------+
| 9    | Weird sized block writes       | Performs write operations with varying      |
|      |                                | block sizes starting from 3 bytes and       |
|      |                                | increasing by 7 bytes each iteration, up    |
|      |                                | to 511 bytes, to the MMC card.              |
+------+--------------------------------+---------------------------------------------+
| 10   | Weird sized block reads        | same for read                               |
+------+--------------------------------+---------------------------------------------+
| 11   | Badly aligned write            | Performs write operations with buffers      |
|      |                                | starting at different alignments (0 to 7    |
|      |                                | bytes offset) to test how the MMC card      |
|      |                                | handles unaligned data transfers.           |
+------+--------------------------------+---------------------------------------------+
| 12   | Badly aligned read             | same for read                               |
+------+--------------------------------+---------------------------------------------+
| 13   | Badly aligned multi-block write| same for multi-write                        |
+------+--------------------------------+---------------------------------------------+
| 14   | Badly aligned multi-block read | same for multi-read                         |
+------+--------------------------------+---------------------------------------------+
| 15   | Proper xfer_size at write      | intentionally create a broken transfer by   |
|      | (Start failure)                   | modifying the MMC request in a way that it  |
|      |                                | will not perform as expected, e.g. use      |
|      |                                | MMC_WRITE_BLOCK  for a multi-block transfer |
+------+--------------------------------+---------------------------------------------+
| 16   | Proper xfer_size at read       | same for read                               |
|      | (Start failure)                |                                              |
+------+--------------------------------+---------------------------------------------+
| 17   | Proper xfer_size at write        | same for 2 blocks                              |
|      | (Midway failure)               |                                              |
+------+--------------------------------+---------------------------------------------+
| 18   | Proper xfer_size at read       | same for read                                      |
|      | (Midway failure)                |                                              |
+------+--------------------------------+---------------------------------------------+
| 19   | Highmem write                  | use a high memory page                      |
+------+--------------------------------+---------------------------------------------+
| 20   | Highmem read                   | same for read                               |
+------+--------------------------------+---------------------------------------------+
| 21   | Multi-block highmem write      | same for multi-write                        |
+------+--------------------------------+---------------------------------------------+
| 22   | Multi-block highmem read       | same for mult-read                          |
+------+--------------------------------+---------------------------------------------+
| 23   | Best-case read performance     | Performs 512K sequential read (non sg)      |
+------+--------------------------------+---------------------------------------------+
| 24   | Best-case write performance    | same for write                              |
+------+--------------------------------+---------------------------------------------+
| 25   | Best-case read performance     | Same using sg                                      |
|      | (Into scattered pages)         |                                              |
+------+--------------------------------+---------------------------------------------+
| 26   | Best-case write performance    | same for write                              |
|      | (From scattered pages)         |                                              |
+------+--------------------------------+---------------------------------------------+
| 27   | Single read performance        | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 28   | Single write performance       | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 29   | Single trim performance        | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 30   | Consecutive read performance   | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 31   | Consecutive write performance  | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 32   | Consecutive trim performance   | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 33   | Random read performance        | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 34   | Random write performance       | By transfer size                            |
+------+--------------------------------+---------------------------------------------+
| 35   | Large sequential read          | Into scattered pages                        |
+------+--------------------------------+---------------------------------------------+
| 36   | Large sequential write         | From scattered pages                        |
+------+--------------------------------+---------------------------------------------+
| 37   | Write performance              | With blocking req 4k to 4MB                 |
+------+--------------------------------+---------------------------------------------+
| 38   | Write performance              | With non-blocking req 4k to 4MB             |
+------+--------------------------------+---------------------------------------------+
| 39   | Read performance               | With blocking req 4k to 4MB                 |
+------+--------------------------------+---------------------------------------------+
| 40   | Read performance               | With non-blocking req 4k to 4MB             |
+------+--------------------------------+---------------------------------------------+
| 41   | Write performance              | Blocking req 1 to 512 sg elems              |
+------+--------------------------------+---------------------------------------------+
| 42   | Write performance              | Non-blocking req 1 to 512 sg elems          |
+------+--------------------------------+---------------------------------------------+
| 43   | Read performance               | Blocking req 1 to 512 sg elems              |
+------+--------------------------------+---------------------------------------------+
| 44   | Read performance               | Non-blocking req 1 to 512 sg elems          |
+------+--------------------------------+---------------------------------------------+
| 45   | Reset test                     |                                             |
+------+--------------------------------+---------------------------------------------+
| 46   | Commands during read           | No Set Block Count (CMD23)                  |
+------+--------------------------------+---------------------------------------------+
| 47   | Commands during write          | No Set Block Count (CMD23)                  |
+------+--------------------------------+---------------------------------------------+
| 48   | Commands during read           | Use Set Block Count (CMD23)                 |
+------+--------------------------------+---------------------------------------------+
| 49   | Commands during write          | Use Set Block Count (CMD23)                 |
+------+--------------------------------+---------------------------------------------+
| 50   | Commands during non-blocking   | Read - use Set Block Count (CMD23)          |
+------+--------------------------------+---------------------------------------------+
| 51   | Commands during non-blocking   | Write - use Set Block Count (CMD23)         |
+------+--------------------------------+---------------------------------------------+

결과와 kernel log

264-290

각 시험은 시작, 종료, 결과를 kernel log에 기록합니다.

결과는 성공한 `OK`, 실패한 `FAILED`, host가 지원하지 않는 `UNSUPPORTED (by host)`, card가 지원하지 않는 `UNSUPPORTED (by card)`, 실행 오류인 `ERROR` 중 하나입니다.

예시는 test case 4인 data verification basic read를 실행해 `Result: OK`를 받은 뒤 전체 시험이 완료되는 log를 보여줍니다.

시험 결과
결과의미
`OK`성공
`FAILED`실패
`UNSUPPORTED (by host)`Host 미지원
`UNSUPPORTED (by card)`Card 미지원
`ERROR`실행 중 오류


Test Results
============

The results of the tests are logged in the kernel log. Each test logs the start, end, and result of the test. The possible results are:

- **OK**: The test completed successfully.
- **FAILED**: The test failed.
- **UNSUPPORTED (by host)**: The test is unsupported by the host.
- **UNSUPPORTED (by card)**: The test is unsupported by the card.
- **ERROR**: An error occurred during the test.

Example Kernel Log Output
=========================

When running a test, you will see log entries similar to the following in the kernel log:

.. code-block:: none

   [ 1234.567890] mmc0: Starting tests of card mmc0:0001...
   [ 1234.567891] mmc0: Test case 4. Basic read (with data verification)...
   [ 1234.567892] mmc0: Result: OK
   [ 1234.567893] mmc0: Tests completed.

In this example, test case 4 (Basic read with data verification) was executed, and the result was OK.

기여와 연락처

291-299

`mmc_test` framework 기여를 환영합니다. 표준 Linux kernel contribution guideline을 따르고 적절한 maintainer에게 patch를 제출합니다.

추가 정보나 문제 보고는 MMC subsystem maintainer에게 문의합니다.

기여 절차
변경 작성Kernel contribution guidelineMMC maintainer에 patch 제출

Kernel 개발 절차와 MMC maintainer 경로를 따릅니다.

Contributing
============

Contributions to the `mmc_test` framework are welcome. Please follow the standard Linux kernel contribution guidelines and submit patches to the appropriate maintainers.

Contact
=======

For more information or to report issues, please contact the MMC subsystem maintainers.