Bug 1760809 - src/imgbased/bootloader.py fails unit testing with nosetests-3
Summary: src/imgbased/bootloader.py fails unit testing with nosetests-3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: imgbased
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Linux
urgent
high
Target Milestone: ovirt-4.4.0
: 1.2.6
Assignee: Yuval Turgeman
QA Contact: Sandro Bonazzola
URL:
Whiteboard:
Depends On:
Blocks: 1696701
TreeView+ depends on / blocked
 
Reported: 2019-10-11 11:45 UTC by Sandro Bonazzola
Modified: 2020-05-20 20:03 UTC (History)
11 users (show)

Fixed In Version: imgbased-1.2.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 20:03:39 UTC
oVirt Team: Node
Embargoed:
sbonazzo: ovirt-4.4?
cshao: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 104058 0 'None' MERGED automation: drop nosetests on el8 2020-05-21 01:59:49 UTC
oVirt gerrit 104464 0 'None' MERGED build: fix nosetest checks with python3 2020-05-21 01:59:49 UTC

Description Sandro Bonazzola 2019-10-11 11:45:52 UTC
nosetests-3 fails with:

[2019-10-11T11:20:18.899Z] ======================================================================

[2019-10-11T11:20:18.899Z] ERROR: test_simple_flow (testBootloader.GrubbyTestCase)

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]   File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1303, in patched

[2019-10-11T11:20:18.899Z]     return func(*args, **keywargs)

[2019-10-11T11:20:18.899Z]   File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/tests/testBootloader.py", line 58, in test_simple_flow

[2019-10-11T11:20:18.899Z]     "a-append")

[2019-10-11T11:20:18.899Z]   File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/bootloader.py", line 284, in add_entry

[2019-10-11T11:20:18.899Z]     fname = glob.glob(tmpdir + "/*.conf")[0]

[2019-10-11T11:20:18.899Z] IndexError: list index out of range

[2019-10-11T11:20:18.899Z] -------------------- >> begin captured logging << --------------------

[2019-10-11T11:20:18.899Z] imgbased: DEBUG: Adding entry: a

[2019-10-11T11:20:18.899Z] --------------------- >> end captured logging << ---------------------

[2019-10-11T11:20:18.899Z] 

[2019-10-11T11:20:18.899Z] ======================================================================

[2019-10-11T11:20:18.899Z] FAIL: Doctest: imgbased.bootloader.Grubby.GrubbyEntry

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]   File "/usr/lib64/python3.6/doctest.py", line 2199, in runTest

[2019-10-11T11:20:18.899Z]     raise self.failureException(self.format_failure(new.getvalue()))

[2019-10-11T11:20:18.899Z] AssertionError: Failed doctest test for imgbased.bootloader.Grubby.GrubbyEntry

[2019-10-11T11:20:18.899Z]   File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/bootloader.py", line 96, in GrubbyEntry

[2019-10-11T11:20:18.899Z] 

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/bootloader.py", line 133, in imgbased.bootloader.Grubby.GrubbyEntry

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     parsed = Grubby.GrubbyEntry.parse(entry)

[2019-10-11T11:20:18.899Z] Expected:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]     ...

[2019-10-11T11:20:18.899Z]     InvalidBootEntryError

[2019-10-11T11:20:18.899Z] Got:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.bootloader.Grubby.GrubbyEntry[12]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         parsed = Grubby.GrubbyEntry.parse(entry)

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/bootloader.py", line 187, in parse

[2019-10-11T11:20:18.899Z]         raise InvalidBootEntryError()

[2019-10-11T11:20:18.899Z]     imgbased.bootloader.InvalidBootEntryError

[2019-10-11T11:20:18.899Z] 

[2019-10-11T11:20:18.899Z] -------------------- >> begin captured logging << --------------------

Comment 1 Sandro Bonazzola 2020-05-20 20:03:39 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.