Skip to contentSkip to conversation

Remaining issue with Dracut runtime tests

Buildroot Thomas Petazzoni via buildroot 2 participants 4 messages Nov 11, 2022 – Nov 12, 2022

lore
Share & tools
lore
#0 lore raw

Hello Yann,

Even after your recent Dracut runtime tests fixes there is still one issue:

======================================================================
FAIL: test_run (tests.fs.test_cpio.TestCpioDracutUclibcMergedUsr)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builds/buildroot.org/buildroot/support/testing/tests/fs/test_cpio.py", line 105, in test_run
self.check_dracut()
File "/builds/buildroot.org/buildroot/support/testing/tests/fs/test_cpio.py", line 60, in check_dracut

    self.assertNotEqual(out.find("usr/lib/libz.so"), -1)

AssertionError: -1 == -1
----------------------------------------------------------------------

See:

https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261241
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261239
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261236

Could you have a look?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Thomas, All,

+Thierry, who submitted dracut in the first place, +Adam, who I know uses dracut

On 2022-11-11 21:53 +0100, Thomas Petazzoni spake thusly:

Quoted 13 lines

Even after your recent Dracut runtime tests fixes there is still one issue:

======================================================================
FAIL: test_run (tests.fs.test_cpio.TestCpioDracutUclibcMergedUsr)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builds/buildroot.org/buildroot/support/testing/tests/fs/test_cpio.py", line 105, in test_run
self.check_dracut()
File "/builds/buildroot.org/buildroot/support/testing/tests/fs/test_cpio.py", line 60, in check_dracut

    self.assertNotEqual(out.find("usr/lib/libz.so"), -1)

AssertionError: -1 == -1
----------------------------------------------------------------------

Quoted 7 lines

See:

https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261241
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261239
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261236

Could you have a look?

The error occurs because we can't find usr/lib/libz.so in the list of files in the cpio archive:

    $ cat -n support/testing/tests/fs/test_cpio.py
    [...]
    60          self.assertNotEqual(out.find("usr/lib/libz.so"), -1)
    [...]

And it is indeed not there (I used the cpio from the pipeline, of course):

    $ cpio --list <rootfs.cpio |grep lib/libz.so
    lib/libz.so
    lib/libz.so.1
    lib/libz.so.1.2.13

So, wtf? Why is libz in /lib when we expect it in /usr/lib? Especially since this is a merged-usr to begin with!

    $ grep MERGED_USR .config
    BR2_ROOTFS_MERGED_USR=y

Seriously, what?

Now, where did libzlib install its files?

cp libz.a /builds/buildroot.org/buildroot/test-output/TestCpioDracutGlibcMergedUsr/target/usr/lib chmod 644 /builds/buildroot.org/buildroot/test-output/TestCpioDracutGlibcMergedUsr/target/usr/lib/libz.a cp libz.so.1.2.13 /builds/buildroot.org/buildroot/test-output/TestCpioDracutGlibcMergedUsr/target/usr/lib chmod 755 /builds/buildroot.org/buildroot/test-output/TestCpioDracutGlibcMergedUsr/target/usr/lib/libz.so.1.2.13

Cool, they were installed in /usr/lib...

Thierry, Adam, presumably you would have an idea on how to investigate further? Why would dracut misplace files?

Oh, and I looked at dracut, and it is really not meant to be installed out of / (i.e. with --prefix=/) , because it really hard-codes calls to files in there. For example, host/lib/dracut/modules.d/99base/dracut-lib.sh has a line like:

    type wait_for_dev >/dev/null 2>&1 || . /lib/dracut/dracut-dev-lib.sh

So, meh... :-(

Final data point: as usual, the tests run OK here: libz is in /usr/lib, and /lib is a symlink to /usr/lib, exactly as expected.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

All,

On 2022-11-12 10:07 +0100, Yann E. MORIN spake thusly:

Quoted 8 lines

On 2022-11-11 21:53 +0100, Thomas Petazzoni spake thusly:

Quoted 5 lines

Even after your recent Dracut runtime tests fixes there is still one issue:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261241
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261239
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261236
Could you have a look?

The error occurs because we can't find usr/lib/libz.so in the list of files in the cpio archive:

[--SNIP--]

Quoted 2 lines

Final data point: as usual, the tests run OK here: libz is in /usr/lib, and /lib is a symlink to /usr/lib, exactly as expected.

I was able to reproduce the issue by running in our reference build iamge, registry.gitlab.com/buildroot.org/buildroot/base:20220206.1756

This is a good starting point; now, we can investigate further.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Thomas, All,

On 2022-11-12 11:15 +0100, Yann E. MORIN spake thusly:

Quoted 7 lines

On 2022-11-12 10:07 +0100, Yann E. MORIN spake thusly:

Quoted 6 lines

On 2022-11-11 21:53 +0100, Thomas Petazzoni spake thusly:

Quoted 5 lines

Even after your recent Dracut runtime tests fixes there is still one issue:
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261241
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261239
https://gitlab.com/buildroot.org/buildroot/-/jobs/3282261236
Could you have a look?

There, there:

    https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot