nvme_dev_self_test(2)
β¨ nvme_dev_self_test β¨
okay bestie, we're in the libnvme API manual and today's main character is nvme_dev_self_test(2) π
π NAME π
nvme_dev_self_test β start or abort a self test π©Ίβ¨
πΈ SYNOPSIS πΈ
int nvme_dev_self_test (struct nvme_dev_self_test_args *args );
π¦ ARGUMENTS π¦
argsβ thestruct nvme_dev_self_testargument structure. it's giving "here's everything you need, hand it over" π«Ά
π DESCRIPTION π
so like. the Device Self-test command either starts a device self-test operation or aborts one, no in-between, pick a lane. a device self-test operation is a diagnostic testing sequence that tests the integrity and functionality of the controller, and ngl it may also include testing of the media associated with namespaces π
and here's the lowkey iconic part: the controller may return a response to this command immediately while it runs the self-test in the background. it's doing side quests while you get your answer back, no cap π
now the nsid field, pay attention bestie, this is the whole vibe check:
- set the
'nsid'field to0to not include namespaces in the test π ββοΈ - set to
0xffffffffto test all namespaces π - all other values test a specific namespace, if present π―
β RETURN β
the nvme command status if a response was received (peep enum nvme_status_field for that) β or -1 with errno set otherwise π
fr fr, if you get-1, go checkerrno, that's where the tea is π
and that's the whole page, periodt π this lil slice of the libnvme API manual is the nvme_dev_self_test(2) page, dated July 2026, and yes we're obsessed with her. now go run that self test, you got this π§πΈ
π¦ 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