Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Thierry Bultel <thierry.bultel@linatsea.fr>,
	Adam Duskett <aduskett@gmail.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] Remaining issue with Dracut runtime tests
Date: Sat, 12 Nov 2022 10:07:31 +0100	[thread overview]
Message-ID: <20221112090731.GA2123054@scaer> (raw)
In-Reply-To: <20221111215321.7cfdbc46@windsurf>

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

  reply	other threads:[~2022-11-12  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 20:53 [Buildroot] Remaining issue with Dracut runtime tests Thomas Petazzoni via buildroot
2022-11-12  9:07 ` Yann E. MORIN [this message]
2022-11-12 10:15   ` Yann E. MORIN
2022-11-12 13:38     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221112090731.GA2123054@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=aduskett@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=thierry.bultel@linatsea.fr \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox