Page MenuHomeFreeBSD

Add a basic test for nvmecontrol
ClosedPublic

Authored by dab on Apr 3 2020, 12:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 12:31 AM
Unknown Object (File)
Mar 18 2024, 11:01 PM
Unknown Object (File)
Feb 5 2024, 7:49 AM
Unknown Object (File)
Jan 29 2024, 4:24 AM
Unknown Object (File)
Jan 28 2024, 9:59 AM
Unknown Object (File)
Jan 15 2024, 12:16 AM
Unknown Object (File)
Jan 14 2024, 3:12 PM
Unknown Object (File)
Jan 3 2024, 2:03 PM
Subscribers

Details

Summary

I recently made some bug fixes in nvmecontrol. It occurred to
me that since nvmecontrol lacks any kyua tests, I should convert the
informal testing I did into a more formal automated test. The test in
this change should be considered just a starting point; it is neither
complete nor thorough. While converting the test to ATF/kyua, I
discovered a small bug in nvmecontrol; the nvmecontrol devlist
command would always exit with an unsuccessful status. So I included
the fix for that, too, so that the test won't fail.

Test Plan

Run the test.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30258
Build 28036: arc lint + arc unit

Event Timeline

Fix a problem in the devlist test when /dev/nvme0 does _not_ exist.

Modify the test to handle the nvme drives not starting at 0. I don't
think that is likely, but it is easy enough to handle.

Let's try uploading that diff again...

In D24269#534897, @dab wrote:

Modify the test to handle the nvme drives not starting at 0. I don't
think that is likely, but it is easy enough to handle.

We wire our drives to specific PCI locations, so it can and will happen often. Don't know if we'll be running these tests there, but it's a widely used feature.

I'm not an expert in atf tests, but this seems reasonable to my eye as a good set of smoke tests.

sbin/nvmecontrol/devlist.c
130

This change is good, but I'd be tempted to commit it separately.

This revision is now accepted and ready to land.Apr 6 2020, 9:38 PM
This revision was automatically updated to reflect the committed changes.