Page MenuHomeFreeBSD

Add a basic test for nvmecontrol
ClosedPublic

Authored by dab on Apr 3 2020, 12:23 AM.
Tags
None
Referenced Files
F55961433: D24269.id70319.diff
Mon, Feb 6, 4:13 PM
Unknown Object (File)
Jan 7 2023, 3:53 PM
Unknown Object (File)
Dec 27 2022, 6:04 AM
Unknown Object (File)
Dec 25 2022, 5:48 AM
Unknown Object (File)
Dec 23 2022, 1:28 AM
Unknown Object (File)
Dec 20 2022, 11:48 AM
Unknown Object (File)
Dec 20 2022, 11:43 AM
Unknown Object (File)
Dec 20 2022, 11:40 AM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #70274)

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.