Bug 1760809

Summary: src/imgbased/bootloader.py fails unit testing with nosetests-3
Product: [oVirt] imgbased Reporter: Sandro Bonazzola <sbonazzo>
Component: GeneralAssignee: Yuval Turgeman <yturgema>
Status: CLOSED CURRENTRELEASE QA Contact: Sandro Bonazzola <sbonazzo>
Severity: high Docs Contact:
Priority: urgent    
Version: ---CC: bugs, cshao, lsvaty, mavital, nlevy, peyu, qiyuan, sbonazzo, weiwang, yaniwang, yturgema
Target Milestone: ovirt-4.4.0Keywords: BuildBlocker
Target Release: 1.2.6Flags: sbonazzo: ovirt-4.4?
cshao: testing_ack+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: imgbased-1.2.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:03:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1696701    

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.