dname does not work for partitions on trusty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I'm not exactly sure what is going wrong here, but in my recent commit to trunk, I broke TrustyTestRaid5
It will now reliably fail like this:
=======
FAIL: test_dname (vmtests.
-------
Traceback (most recent call last):
File "/opt/fast/
self.
AssertionError: 'sda-part2' not found in ['bcache0', 'md0']
The reason for that is not actually regression, but fix of the test. my change to tests/vmtests/
def test_dname(self):
- if (os.path.
- self.disk_to_check is not None):
- with open(os.
+ fpath = os.path.
+ if (os.path.
+ with open(fpath, "r") as fp:
for diskname, part in self.disk_
if part is not 0:
Previously the test was not actually doing anything as self.td.mnt did not have a trailing '/', resulting in os.path.exists always returning false. So this test would always pass but never did what was desired.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- curtin developers: Pending requested
-
Diff: 11 lines (+4/-0)1 file modifiedtests/vmtests/test_raid5_bcache.py (+4/-0)
Changed in curtin: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: maas-sru |
tags: |
added: curtin-sru removed: maas-sru |
I've pushed a branch lp:~smoser/curtin/trunk.trusty-raid5bcache with a work around to let the test pass for the moment.