Skip to content

Commit ecebbf9

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Stabilize iso format unit tests" into unmaintained/yoga
2 parents bda6be7 + 76c43c4 commit ecebbf9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nova/tests/unit/image/test_format_inspector.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,15 @@ def _create_iso(self, image_size, subformat='9660'):
9191
subprocess.check_output(
9292
'dd if=/dev/zero of=%s bs=1M count=%i' % (fn, size),
9393
shell=True)
94+
# We need to use different file as input and output as the behavior
95+
# of mkisofs is version dependent if both the input and the output
96+
# are the same and can cause test failures
97+
out_fn = "%s.iso" % fn
9498
subprocess.check_output(
95-
'%s -V "TEST" -o %s %s' % (base_cmd, fn, fn),
99+
'%s -V "TEST" -o %s %s' % (base_cmd, out_fn, fn),
96100
shell=True)
97-
return fn
101+
self._created_files.append(out_fn)
102+
return out_fn
98103

99104
def _create_img(
100105
self, fmt, size, subformat=None, options=None,

0 commit comments

Comments
 (0)