Fix label fatboot#513
Conversation
|
Github's diff view here is a little unfortunate. Beyond incorporating @smoser 's suggested changes, I added a class around the pre-existing pytest tests, added an additional non-BSD test (since we didn't have any), and added an extra @smoser and @igalic , since you commented on the last one, I thought you might be interested in my updates here too. |
igalic
left a comment
There was a problem hiding this comment.
how do i recreate these conditions?
to see how this actually looks like in a (free)bsd image?
|
|
||
| # lp: #1841466 | ||
| devlist = util.find_devs_with_freebsd(criteria="LABEL_FATBOOT=A_LABEL") | ||
| assert devlist == [] |
There was a problem hiding this comment.
has anyone tried booting a freebsd image under these conditions to see what the result looks like, and what we could be looking for?
There was a problem hiding this comment.
@igalic Was that one of the BSD people you pinged on the last ticket? Should I ping them here too? If we make an effort to reach out but they're unavailable, do you think the unit test changes are sufficient?
There was a problem hiding this comment.
Aloha,
Thank you @TheRealFalcon and @igalic, I will give a try to the patch.
OddBloke
left a comment
There was a problem hiding this comment.
This LGTM, thanks! Two minor testing notes, but not enough to block landing. (If you care to spend the time, they can come as a follow-up.)
| devlist = util.find_devs_with_freebsd() | ||
| assert set(devlist) == set([ | ||
| '/dev/iso9660/config-2', '/dev/msdosfs/EFISYS']) | ||
|
|
||
| devlist = util.find_devs_with_freebsd(criteria="TYPE=iso9660") | ||
| assert devlist == ['/dev/iso9660/config-2'] | ||
|
|
||
| devlist = util.find_devs_with_freebsd(criteria="TYPE=vfat") | ||
| assert devlist == ['/dev/msdosfs/EFISYS'] | ||
|
|
||
| # lp: #1841466 | ||
| devlist = util.find_devs_with_freebsd(criteria="LABEL_FATBOOT=A_LABEL") | ||
| assert devlist == [] |
There was a problem hiding this comment.
It'd be nice to see these tests parameterised.
| devlist = util.find_devs_with_netbsd() | ||
| assert set(devlist) == set( | ||
| ["/dev/ld0", "/dev/dk0", "/dev/dk1", "/dev/cd0"] | ||
| ) | ||
|
|
||
| m_subp.side_effect = side_effect_values | ||
| devlist = util.find_devs_with_netbsd(criteria="TYPE=iso9660") | ||
| assert devlist == ["/dev/cd0"] | ||
|
|
||
| m_subp.side_effect = side_effect_values | ||
| devlist = util.find_devs_with_netbsd(criteria="TYPE=vfat") | ||
| assert devlist == ["/dev/ld0", "/dev/dk0", "/dev/dk1"] | ||
|
|
||
| # lp: #1841466 | ||
| m_subp.side_effect = side_effect_values | ||
| devlist = util.find_devs_with_netbsd(criteria="LABEL_FATBOOT=A_LABEL") | ||
| assert devlist == ['/dev/ld0', '/dev/dk0', '/dev/dk1', '/dev/cd0'] |
Continuation of #500.
Proposed squashed commit message: