[LTP] [PATCH v2 12/31] testcases: sysfs: Add sys_ata01

Petr Vorel pvorel@suse.cz
Thu Aug 20 17:57:57 CEST 2026


Hi Cyril,

> A test for /sys/class/ata_device/*/* files.

Lol, on one of my system I don't have /sys/class/ata_device/,
but I have /sys/class/scsi_device/ directory. I suppose SCSI is still used but
obsolete right? Or would it be worth to test it as well?
...
> +++ b/testcases/kernel/sysfs/class/ata_device/sys_ata01.c
> @@ -0,0 +1,96 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2026 Cyril Hrubis <chrubis@suse.cz>
> + */
> +
> +/*\
> + * Sanity checks for the ATA device attributes exported under
> + * /sys/class/ata_device/<dev>/.
> + *
> + * For every ATA device the test verifies that:
> + *
> + * - class is one of the known libata device classes (ata, atapi, pmp, semb,
> + *   unknown)
> + * - dma_mode, pio_mode and xfer_mode, when non-empty, start with the "XFER_"

Please, before merge change to:
- * - dma_mode, pio_mode and xfer_mode, when non-empty, start with the "XFER_"
+ * - dma_mode, pio_mode and xfer_mode, when non-empty, start with the ``XFER_``

otherwise sphinx complains:
_static/tests.rst:45958: ERROR: Unknown target name: "xfer". [docutils]

Otherwise LGTM, nice test, great patchset.

Only to this particular patch:

Reviewed-by: Petr Vorel <pvorel@suse.cz>

I try to have look on the whole patchset tomorrow.

Kind regards,
Petr


More information about the ltp mailing list