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 readerrnobefore 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
- ubuntu stonking: libnvme-dev 1.16.2-1build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms