Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Remaining issue with Dracut runtime tests
@ 2022-11-11 20:53 Thomas Petazzoni via buildroot
  2022-11-12  9:07 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-11-11 20:53 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot@buildroot.org

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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Remaining issue with Dracut runtime tests
  2022-11-11 20:53 [Buildroot] Remaining issue with Dracut runtime tests Thomas Petazzoni via buildroot
@ 2022-11-12  9:07 ` Yann E. MORIN
  2022-11-12 10:15   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2022-11-12  9:07 UTC (permalink / raw)
  To: Thomas Petazzoni, Thierry Bultel, Adam Duskett; +Cc: buildroot@buildroot.org

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:
> 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?

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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Remaining issue with Dracut runtime tests
  2022-11-12  9:07 ` Yann E. MORIN
@ 2022-11-12 10:15   ` Yann E. MORIN
  2022-11-12 13:38     ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2022-11-12 10:15 UTC (permalink / raw)
  To: Thomas Petazzoni, Thierry Bultel, Adam Duskett; +Cc: buildroot@buildroot.org

All,

On 2022-11-12 10:07 +0100, Yann E. MORIN spake thusly:
> On 2022-11-11 21:53 +0100, Thomas Petazzoni spake thusly:
> > 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--]
> 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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] Remaining issue with Dracut runtime tests
  2022-11-12 10:15   ` Yann E. MORIN
@ 2022-11-12 13:38     ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2022-11-12 13:38 UTC (permalink / raw)
  To: Thomas Petazzoni, Thierry Bultel, Adam Duskett; +Cc: buildroot@buildroot.org

Thomas, All,

On 2022-11-12 11:15 +0100, Yann E. MORIN spake thusly:
> On 2022-11-12 10:07 +0100, Yann E. MORIN spake thusly:
> > On 2022-11-11 21:53 +0100, Thomas Petazzoni spake thusly:
> > > 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/20221112133707.1674986-1-yann.morin.1998@free.fr/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-12 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 20:53 [Buildroot] Remaining issue with Dracut runtime tests Thomas Petazzoni via buildroot
2022-11-12  9:07 ` Yann E. MORIN
2022-11-12 10:15   ` Yann E. MORIN
2022-11-12 13:38     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox