NVME_MI_ADMIN_GET_LOG_DEVICE_SELF_TEST(2)

🌸 NAME 🌸

nvme_mi_admin_get_log_device_self_test β€” bestie, this one pulls up the device self test log for you πŸ’–

It lives in the libnvme API manual, so you already know it's the good stuff.


✨ SYNOPSIS ✨

int nvme_mi_admin_get_log_device_self_test (nvme_mi_ctrl_t ctrl , struct
nvme_self_test_log *log );

πŸŽ€ ARGUMENTS πŸŽ€

  • ctrl β€” the controller you're interrogating, aka the thing you wanna know about πŸ”
  • log β€” the userspace address of the log payload. yeah, it's just a pointer to where the log is gonna land πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea, and it's genuinely good tea 🍡

This log page is giving you two whole things. First: the status of a self test that's currently in progress, plus the percent complete of that operation β€” so you always know exactly how far along it is, no guessing, no vibes-based estimation, fr fr.

Second: the results of the previous 20 self-test operations. twenty!! that's so much history, she's keeping receipts πŸ’€βœ¨

So basically one call and you've got the live status and the whole saga of everything that came before. iconic behavior honestly.


πŸ’œ RETURN πŸ’œ

She gives you back the nvme command status if a response was received β€” peep enum nvme_status_field for the deets on what those values mean πŸ‘‘

Otherwise you get -1 with errno set. so like, check your errno bestie, it's trying to tell you something 😭

ngl if you're seeing -1, that's your sign to go read errno before you do literally anything else. she's not being mysterious for fun.

🌈 SEE ALSO 🌈

  • enum nvme_status_field β€” go look at it, it's right there in the return value lore 🫢

and that's the whole page, no cap πŸŽ€ shoutout to the libnvme API manual, July 2026 edition, for keeping us all fed and informed. slay, take care of your controllers, and may your self tests always report back to you promptly βœ¨πŸ‘‘πŸ’–

πŸ“¦ where this page comes from