All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Re: [OE-core] [PATCH] oeqa/selftest/overlayfs: test read-only rootfs
       [not found] <17BDA4425135504F.24786@lists.openembedded.org>
@ 2024-03-26  7:47 ` Vyacheslav Yurkov
  2024-03-26  8:40   ` Alexander Kanavin
  0 siblings, 1 reply; 2+ messages in thread
From: Vyacheslav Yurkov @ 2024-03-26  7:47 UTC (permalink / raw
  To: Openembedded-core; +Cc: Baruch Siach

Just checking if there's any feedback for the patch or something that 
stops it from being merged.

Slava

On 17.03.2024 20:33, Vyacheslav Yurkov via lists.openembedded.org wrote:
> From: Baruch Siach <baruch@tkos.co.il>
>
> Use the read-only squashfs filesystem to test the read-only case.
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
> ---
>   meta-selftest/wic/overlayfs_etc.wks.in    |  4 +--
>   meta/lib/oeqa/selftest/cases/overlayfs.py | 34 +++++++++++++++++++----
>   2 files changed, 30 insertions(+), 8 deletions(-)
>
> diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in
> index 1e1e5836e7..066cd35b15 100644
> --- a/meta-selftest/wic/overlayfs_etc.wks.in
> +++ b/meta-selftest/wic/overlayfs_etc.wks.in
> @@ -1,4 +1,4 @@
>   part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024
> -part / --source rootfs --ondisk sda --fstype=ext4 --use-uuid --align 1024
> +part / --source rootfs --ondisk sda --fstype=${OVERLAYFS_ROOTFS_TYPE} --use-uuid --align 1024
>   part --ondisk sda --fstype=ext4 --size=5 --align 1024
> -bootloader --ptable gpt --timeout=1 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
> +bootloader --ptable gpt --timeout=1 --append="rootfstype=${OVERLAYFS_ROOTFS_TYPE} console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
> diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py
> index cd0dc60c64..e31063567b 100644
> --- a/meta/lib/oeqa/selftest/cases/overlayfs.py
> +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py
> @@ -353,6 +353,7 @@ EXTRA_IMAGE_FEATURES += "read-only-rootfs"
>   # Image configuration for overlayfs-etc
>   OVERLAYFS_ETC_MOUNT_POINT = "/data"
>   OVERLAYFS_ETC_DEVICE = "/dev/sda3"
> +OVERLAYFS_ROOTFS_TYPE = "ext4"
>   """
>   
>           self.write_config(config)
> @@ -367,13 +368,17 @@ OVERLAYFS_ETC_DEVICE = "/dev/sda3"
>   
>       @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
>       def test_sbin_init_preinit(self):
> -        self.run_sbin_init(False)
> +        self.run_sbin_init(False, "ext4")
>   
>       @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
>       def test_sbin_init_original(self):
> -        self.run_sbin_init(True)
> +        self.run_sbin_init(True, "ext4")
>   
> -    def run_sbin_init(self, origInit):
> +    @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
> +    def test_sbin_init_read_only(self):
> +        self.run_sbin_init(True, "squashfs")
> +
> +    def run_sbin_init(self, origInit, rootfsType):
>           """
>           Summary:   Confirm we can replace original init and mount overlay on top of /etc
>           Expected:  Image is created successfully and /etc is mounted as an overlay
> @@ -384,7 +389,9 @@ OVERLAYFS_ETC_DEVICE = "/dev/sda3"
>   
>           args = {
>               'OVERLAYFS_INIT_OPTION': "" if origInit else "init=/sbin/preinit",
> -            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': int(origInit == True)
> +            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': int(origInit == True),
> +            'OVERLAYFS_ROOTFS_TYPE': rootfsType,
> +            'OVERLAYFS_ETC_CREATE_MOUNT_DIRS': int(rootfsType == "ext4")
>           }
>   
>           self.write_config(config.format(**args))
> @@ -437,7 +444,9 @@ IMAGE_INSTALL:append = " overlayfs-user"
>   
>           args = {
>               'OVERLAYFS_INIT_OPTION': "",
> -            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': 1
> +            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': 1,
> +            'OVERLAYFS_ROOTFS_TYPE': "ext4",
> +            'OVERLAYFS_ETC_CREATE_MOUNT_DIRS': 1
>           }
>   
>           self.write_config(config.format(**args))
> @@ -463,10 +472,14 @@ IMAGE_INSTALL:append = " overlayfs-user"
>   INIT_MANAGER = "systemd"
>   
>   # enable overlayfs in the kernel
> -KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc"
> +KERNEL_EXTRA_FEATURES:append = " \
> +    features/overlayfs/overlayfs.scc \
> +    cfg/fs/squashfs.scc"
>   
>   IMAGE_FSTYPES += "wic"
>   OVERLAYFS_INIT_OPTION = "{OVERLAYFS_INIT_OPTION}"
> +OVERLAYFS_ROOTFS_TYPE = "{OVERLAYFS_ROOTFS_TYPE}"
> +OVERLAYFS_ETC_CREATE_MOUNT_DIRS = "{OVERLAYFS_ETC_CREATE_MOUNT_DIRS}"
>   WKS_FILE = "overlayfs_etc.wks.in"
>   
>   EXTRA_IMAGE_FEATURES += "read-only-rootfs"
> @@ -477,4 +490,13 @@ OVERLAYFS_ETC_MOUNT_POINT = "/data"
>   OVERLAYFS_ETC_FSTYPE = "ext4"
>   OVERLAYFS_ETC_DEVICE = "/dev/sda3"
>   OVERLAYFS_ETC_USE_ORIG_INIT_NAME = "{OVERLAYFS_ETC_USE_ORIG_INIT_NAME}"
> +
> +ROOTFS_POSTPROCESS_COMMAND += "{OVERLAYFS_ROOTFS_TYPE}_rootfs"
> +
> +ext4_rootfs() {{
> +}}
> +
> +squashfs_rootfs() {{
> +    mkdir -p ${{IMAGE_ROOTFS}}/data
> +}}
>   """
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197270): https://lists.openembedded.org/g/openembedded-core/message/197270
> Mute This Topic: https://lists.openembedded.org/mt/104989652/4455192
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [uvv.mail@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>



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

* Re: [OE-core] [PATCH] oeqa/selftest/overlayfs: test read-only rootfs
  2024-03-26  7:47 ` [OE-core] [PATCH] oeqa/selftest/overlayfs: test read-only rootfs Vyacheslav Yurkov
@ 2024-03-26  8:40   ` Alexander Kanavin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2024-03-26  8:40 UTC (permalink / raw
  To: Vyacheslav Yurkov; +Cc: Openembedded-core, Baruch Siach

Feature freeze perhaps? The patch is in abelloni/master-next and will
be handled later, possibly after the release is out. It's better to
not send it during the freeze period though to avoid adding to the
backlog.

Alex

On Tue, 26 Mar 2024 at 08:47, Vyacheslav Yurkov <uvv.mail@gmail.com> wrote:
>
> Just checking if there's any feedback for the patch or something that
> stops it from being merged.
>
> Slava
>
> On 17.03.2024 20:33, Vyacheslav Yurkov via lists.openembedded.org wrote:
> > From: Baruch Siach <baruch@tkos.co.il>
> >
> > Use the read-only squashfs filesystem to test the read-only case.
> >
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
> > ---
> >   meta-selftest/wic/overlayfs_etc.wks.in    |  4 +--
> >   meta/lib/oeqa/selftest/cases/overlayfs.py | 34 +++++++++++++++++++----
> >   2 files changed, 30 insertions(+), 8 deletions(-)
> >
> > diff --git a/meta-selftest/wic/overlayfs_etc.wks.in b/meta-selftest/wic/overlayfs_etc.wks.in
> > index 1e1e5836e7..066cd35b15 100644
> > --- a/meta-selftest/wic/overlayfs_etc.wks.in
> > +++ b/meta-selftest/wic/overlayfs_etc.wks.in
> > @@ -1,4 +1,4 @@
> >   part /boot --active --source bootimg-biosplusefi --ondisk sda --sourceparams="loader=grub-efi" --align 1024
> > -part / --source rootfs --ondisk sda --fstype=ext4 --use-uuid --align 1024
> > +part / --source rootfs --ondisk sda --fstype=${OVERLAYFS_ROOTFS_TYPE} --use-uuid --align 1024
> >   part --ondisk sda --fstype=ext4 --size=5 --align 1024
> > -bootloader --ptable gpt --timeout=1 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
> > +bootloader --ptable gpt --timeout=1 --append="rootfstype=${OVERLAYFS_ROOTFS_TYPE} console=ttyS0,115200 console=tty0 ${OVERLAYFS_INIT_OPTION}"
> > diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py
> > index cd0dc60c64..e31063567b 100644
> > --- a/meta/lib/oeqa/selftest/cases/overlayfs.py
> > +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py
> > @@ -353,6 +353,7 @@ EXTRA_IMAGE_FEATURES += "read-only-rootfs"
> >   # Image configuration for overlayfs-etc
> >   OVERLAYFS_ETC_MOUNT_POINT = "/data"
> >   OVERLAYFS_ETC_DEVICE = "/dev/sda3"
> > +OVERLAYFS_ROOTFS_TYPE = "ext4"
> >   """
> >
> >           self.write_config(config)
> > @@ -367,13 +368,17 @@ OVERLAYFS_ETC_DEVICE = "/dev/sda3"
> >
> >       @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
> >       def test_sbin_init_preinit(self):
> > -        self.run_sbin_init(False)
> > +        self.run_sbin_init(False, "ext4")
> >
> >       @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
> >       def test_sbin_init_original(self):
> > -        self.run_sbin_init(True)
> > +        self.run_sbin_init(True, "ext4")
> >
> > -    def run_sbin_init(self, origInit):
> > +    @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently")
> > +    def test_sbin_init_read_only(self):
> > +        self.run_sbin_init(True, "squashfs")
> > +
> > +    def run_sbin_init(self, origInit, rootfsType):
> >           """
> >           Summary:   Confirm we can replace original init and mount overlay on top of /etc
> >           Expected:  Image is created successfully and /etc is mounted as an overlay
> > @@ -384,7 +389,9 @@ OVERLAYFS_ETC_DEVICE = "/dev/sda3"
> >
> >           args = {
> >               'OVERLAYFS_INIT_OPTION': "" if origInit else "init=/sbin/preinit",
> > -            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': int(origInit == True)
> > +            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': int(origInit == True),
> > +            'OVERLAYFS_ROOTFS_TYPE': rootfsType,
> > +            'OVERLAYFS_ETC_CREATE_MOUNT_DIRS': int(rootfsType == "ext4")
> >           }
> >
> >           self.write_config(config.format(**args))
> > @@ -437,7 +444,9 @@ IMAGE_INSTALL:append = " overlayfs-user"
> >
> >           args = {
> >               'OVERLAYFS_INIT_OPTION': "",
> > -            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': 1
> > +            'OVERLAYFS_ETC_USE_ORIG_INIT_NAME': 1,
> > +            'OVERLAYFS_ROOTFS_TYPE': "ext4",
> > +            'OVERLAYFS_ETC_CREATE_MOUNT_DIRS': 1
> >           }
> >
> >           self.write_config(config.format(**args))
> > @@ -463,10 +472,14 @@ IMAGE_INSTALL:append = " overlayfs-user"
> >   INIT_MANAGER = "systemd"
> >
> >   # enable overlayfs in the kernel
> > -KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc"
> > +KERNEL_EXTRA_FEATURES:append = " \
> > +    features/overlayfs/overlayfs.scc \
> > +    cfg/fs/squashfs.scc"
> >
> >   IMAGE_FSTYPES += "wic"
> >   OVERLAYFS_INIT_OPTION = "{OVERLAYFS_INIT_OPTION}"
> > +OVERLAYFS_ROOTFS_TYPE = "{OVERLAYFS_ROOTFS_TYPE}"
> > +OVERLAYFS_ETC_CREATE_MOUNT_DIRS = "{OVERLAYFS_ETC_CREATE_MOUNT_DIRS}"
> >   WKS_FILE = "overlayfs_etc.wks.in"
> >
> >   EXTRA_IMAGE_FEATURES += "read-only-rootfs"
> > @@ -477,4 +490,13 @@ OVERLAYFS_ETC_MOUNT_POINT = "/data"
> >   OVERLAYFS_ETC_FSTYPE = "ext4"
> >   OVERLAYFS_ETC_DEVICE = "/dev/sda3"
> >   OVERLAYFS_ETC_USE_ORIG_INIT_NAME = "{OVERLAYFS_ETC_USE_ORIG_INIT_NAME}"
> > +
> > +ROOTFS_POSTPROCESS_COMMAND += "{OVERLAYFS_ROOTFS_TYPE}_rootfs"
> > +
> > +ext4_rootfs() {{
> > +}}
> > +
> > +squashfs_rootfs() {{
> > +    mkdir -p ${{IMAGE_ROOTFS}}/data
> > +}}
> >   """
> >
> >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#197527): https://lists.openembedded.org/g/openembedded-core/message/197527
> Mute This Topic: https://lists.openembedded.org/mt/104989652/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

end of thread, other threads:[~2024-03-26  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <17BDA4425135504F.24786@lists.openembedded.org>
2024-03-26  7:47 ` [OE-core] [PATCH] oeqa/selftest/overlayfs: test read-only rootfs Vyacheslav Yurkov
2024-03-26  8:40   ` Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.