From Fedora Project Wiki

Description

This test case ensures that blktrace captures and provides detailed traces for block IO actions.

Setup

  1. Ensure you have a Fedora system.
  2. Install the blktrace package: sudo dnf install blktrace.

How to test

  1. Open a terminal.
  2. Start capturing traces for a specific block device, for example, `/dev/sda`: `sudo blktrace -d /dev/sda -o - | blkparse -i -`.
  3. In a separate terminal or on the system, perform some disk activities like copying files, installing a package, or running a disk benchmarking tool.
  4. After completing the disk activities, stop blktrace by pressing Ctrl+C.
  5. Review the generated trace output to ensure that block IO events are recorded.
  6. Filter specific events, like reads (R) or writes (W), from the trace to check their details: blkparse -i /dev/sda -a R,W.

Expected Results

  1. blktrace should start capturing traces without any errors.
  2. The trace output should record detailed block IO events corresponding to the disk activities performed.
  3. Filters applied through blkparse should accurately narrow down the trace output to specific events.

Optional

For deeper testing:

  1. Examine the output for specific flags like queued (Q), issued (D), completed (C), etc.
  2. Test blktrace on various disk types, including HDDs, SSDs, and NVMe drives.
  3. Check the behavior of blktrace with high IO workloads.
  4. Use tools like btt (part of the blktrace suite) to analyze and generate statistics from the trace data.
  5. Ensure proper functioning with different file systems (ext4, xfs, btrfs, etc.).