From: Vyacheslav Yurkov <uvv.mail@gmail.com>
To: Baruch Siach <baruch@tkos.co.il>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] overlayfs-etc: take read-only-rootfs into account
Date: Sun, 11 Feb 2024 19:22:30 +0100 [thread overview]
Message-ID: <33d0888f-281c-4bc1-8a03-3bc3fcd182d6@gmail.com> (raw)
In-Reply-To: <87cyt35dcy.fsf@tarshish>
[-- Attachment #1: Type: text/plain, Size: 2717 bytes --]
On 11.02.2024 14:23, Baruch Siach wrote:
> As I understand, the point of read-only-rootfs feature is to keep rootfs
> intact. Filesystems like squashfs or erofs don't support rw mount at
> all. How can we support this use case?
That's a really good question. I assume we need to differentiate here
the ro rootfs just because it's set this way in fstab, or ro rootfs,
which doesn't support writing at all. For the latter you still need all
your directories already created in the image (squashfs, erofs) or you
would mount it in some location on tmpfs. Point is, mount point has to
exist. I suggest we follow the similar approach like in
overlayfs.bbclass, i.e. we add a flag, which can be used to skip
directory creation for this use case. Please use 'false' as a default,
so existing users don't have to change anything when they upgrade their
Yocto version.
>> With this patch overlayfs.OverlayFSEtcRunTimeTests.test_sbin_init_preinit
>> fails:
>>
>> 2024-02-08 21:12:40,616 - oe-selftest - INFO - Traceback (most recent call
>> last):
>> File
>> "/home/uvv/projects/upstream/poky/meta/lib/oeqa/core/decorator/__init__.py",
>> line 35, in wrapped_f
>> return func(*args, **kwargs)
>> File
>> "/home/uvv/projects/upstream/poky/meta/lib/oeqa/selftest/cases/overlayfs.py",
>> line 370, in test_sbin_init_preinit
>> self.run_sbin_init(False)
>> File
>> "/home/uvv/projects/upstream/poky/meta/lib/oeqa/selftest/cases/overlayfs.py",
>> line 399, in run_sbin_init
>> self.assertTrue("/data" in output, msg=output)
>> AssertionError: False is not true : /dev/sda2 on / type ext4 (ro,relatime)
> Where is this /dev/sda2 coming from? I have also seen it in my
> /etc/fstab once I enabled the overlayfs-etc feature. I see no mention of
> sda2 in meta/lib/oeqa/selftest/cases/overlayfs.py.
The test actually expects sda3 as overlay partition. The partitions are
created by means of wic, the configuration is in
https://git.openembedded.org/openembedded-core/tree/meta-selftest/wic/overlayfs_etc.wks.in
, and pulled in by WKS_FILE in meta/lib/oeqa/selftest/cases/overlayfs.py.
Perhaps we could extend test coverage for your use case by parametrizing
wks.in file further and placing rootfs on squashfs partition? I haven't
checked TBH whether wic supports it :)
>> The test is not really explicit, but it looks like overlay is not mounted. We
>> could also add a generic test to search for "PREINIT" done/failed.
> How can I run this test?
Use this command:
oe-selftest -r overlayfs.OverlayFSEtcRunTimeTests.test_sbin_init_preinit
Check also this link https://wiki.yoctoproject.org/wiki/Oe-selftest and
prepare your environment first
Cheers,
Slava
>
> Thanks,
> baruch
[-- Attachment #2: Type: text/html, Size: 4113 bytes --]
next prev parent reply other threads:[~2024-02-11 18:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 7:22 [PATCH] overlayfs-etc: take read-only-rootfs into account Baruch Siach
2024-02-08 20:21 ` Vyacheslav Yurkov
2024-02-11 13:23 ` Baruch Siach
2024-02-11 18:22 ` Vyacheslav Yurkov [this message]
2024-02-12 14:21 ` Baruch Siach
2024-02-12 18:38 ` Vyacheslav Yurkov
2024-02-12 18:40 ` Baruch Siach
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=33d0888f-281c-4bc1-8a03-3bc3fcd182d6@gmail.com \
--to=uvv.mail@gmail.com \
--cc=baruch@tkos.co.il \
--cc=openembedded-core@lists.openembedded.org \
/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