Files
sbrunner-atx 618bdd56bf scripts: add full-drive test helper for macOS
f3-drive-test-macos.sh drives a complete erase / f3write / f3read cycle
on macOS with diskutil, adding what ad-hoc use of the tools tends to
get wrong:

- refuses to run on internal disks or partition slices, and asks for
  explicit confirmation naming the drive label before erasing
- records the USB location ID and device serial number next to a
  user-chosen drive label, so logs stay attached to the physical drive
  even though macOS reassigns diskN numbers by connection order
- unmounts and remounts between write and read so f3read measures the
  drive instead of the page cache
- optional cooldown (--cooldown SEC, or --replug for a physical
  unplug) between write and read, and repeated read passes (--reads N),
  for diagnosing drives that drop off the bus under sustained I/O,
  e.g. from overheating: compare failure time across back-to-back
  passes
- per-drive timestamped logs and a summary table of all read passes

Only needs f3write/f3read (PATH or ../build), so it works on macOS with
the stock tools, independent of the extra-tools port in #283.

This grew out of diagnosing a batch of refurbished 128 GB drives where
one unit passed a full 114 GB write but could not sustain more than
about 90 seconds of reading before disconnecting - a failure mode that
a single write/read pass with default settings does not isolate.
2026-08-19 03:10:40 -05:00
..