nvme_get_lo...ce_self_test(2)

πŸ’– nvme_get_log_device_self_test(2) πŸ’–

okay bestie, welcome to the libnvme API manual ✨ this one's literally about ✨ retrieval ✨ of the device self test log, and yes it's as iconic as it sounds πŸŽ€


🌸 NAME 🌸

nvme_get_log_device_self_test β€” grab the device self test log πŸ©ΊπŸ“‹


✨ SYNOPSIS ✨

int nvme_get_log_device_self_test (int fd , struct nvme_self_test_log
*log );

no cap, that's the whole vibe. two args, one int, one struct pointer. periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fd β€” the file descriptor of the nvme device 🫢 like, this is your entry pass to the whole situation.
  • log β€” the userspace address of the log payload πŸ“¬ that's where the goods get delivered.

🌈 DESCRIPTION 🌈

so this log page is doing a LOT of main character work, ok? 😀 it shows you:

  • the status of an in progress self test πŸ‘€ plus the percent complete of that operation β€” so you know exactly how far along it is, not just vibes
  • the results of the previous 20 self-test operations πŸ“š twenty. not nineteen, not twenty-one. the archive is twenty deep, iykyk.

it's giving "receipts for every self test you've ever run" 🧾✨


πŸ”₯ RETURN πŸ”₯

if a response came back, you get the nvme command status (check enum nvme_status_field for the deets πŸ‘‘).

otherwise? it's -1 with errno set. 😭 which is like... not the slay we were hoping for, but at least it tells you what went wrong.

fr fr, always check the return value. -1 is not a personality trait, it's an error 🚩

and that's the whole page, bestie 🫢 go forth and read those self test results like the unix icon you are πŸ’œπŸ¦‹

with love from the libnvme API manual, dated July 2026 β€” catch you in the next manpage, mwah πŸ’‹πŸ’…

πŸ“¦ where this page comes from