~canonical-kernel-team/+git/overlay-shiftfs-tests:main

Last commit made on 2024-04-22
Get this branch:
git clone -b main https://git.launchpad.net/~canonical-kernel-team/+git/overlay-shiftfs-tests
Members of Canonical Kernel Team can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

d6c454f... by Po-Hsu Lin

install-deps: use LXD 5.20 for Focal 5.4

BugLink: https://bugs.launchpad.net/bugs/2061107

On Focal the newly released LXD 5.21 in latest/stable require ZFS 2.1
from 5.15 HWE kernel.
With that version of LXD installed the shiftfs-lxd.sh test will fail
with:
   Error: Required tool zpool is missing

LXD team suggests to use 5.21/stable, which contains ZFS 0.8 suport.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Francis Ginther <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

6ed50e5... by Po-Hsu Lin

Skip shiftfs related tests on 6.5+

BugLink: https://bugs.launchpad.net/bugs/2042057

Shiftfs support will be dropped from 6.5 variants on Jammy as well.
The result we saw for J-hwe-6.5 in sru-20231030 is because we are
still in the middle of this transition.

Use `dpkg --compare-versions` for kernel version comparison.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Andrei Gherzan <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

721ddbb... by Po-Hsu Lin

Skip ZFS related tests on realtime kernel

BugLink: https://bugs.launchpad.net/bugs/2032166

ZFS is required by the shiftfs-lxd.sh test, but it is not supported
on realtime kernel (LP: #2017637)

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Francis Ginther <email address hidden>

27ae847... by Po-Hsu Lin

Skip shiftfs tests on Mantic+

BugLink: https://bugs.launchpad.net/bugs/2042057

Shiftfs support has been dropped on Mantic since 6.5.0-12.12
(LP: #2038522). I think we can skip shiftfs related tests on
newer releases.

For J-hwe-6.5, these tests are still working in sru-20231030.
Therefore limit changes for Mantic+.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Francis Ginther <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

68d31ce... by Thadeu Lima de Souza Cascardo

ovl-refcnt: avoid race with systemd-tmpfiles

BugLink: https://bugs.launchpad.net/bugs/2034586

systemd-tmpfiles-setup service might still run under a container just
created, leading to a race where files under /tmp are removed during the
test.

Create the temporary directory under $HOME instead.

Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Sean Feole <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

01ed128... by Thadeu Lima de Souza Cascardo

ovl-mkdir-xattrs: avoid race with systemd-tmpfiles

BugLink: https://bugs.launchpad.net/bugs/2034586

systemd-tmpfiles-setup service might still run under a container just
created, leading to a race where files under /tmp are removed during the
test.

Create the temporary directory under $HOME instead.

Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Po-Hsu Lin <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

e4dcc51... by Po-Hsu Lin

install-deps: refresh lxd with latest/stable channel

BugLink: https://bugs.launchpad.net/bugs/2036861

On Jammy, the preloaded 5.0 stable lxd is too old for 6.5 ZFS. And thus
causing this issue even with the presence of zpool command:
  Error: Required tool zpool is missing

Fix this by refreshing the snap with with latest/stable channel.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Francis Ginther <email address hidden>

Merged branch ~canonical-kernel-team/+git/overlay-shiftfs-tests:refresh-latest-stable
f2b80c8... by Po-Hsu Lin

tests: stop containers forcefully after test finishes

BugLink: https://bugs.launchpad.net/bugs/2035301

Test indicates on slower instances like Google g1-small, the container
we started for test purposes might not be ready yet to process the
signal from "lxc stop" command. And test consequently timeout.

Use --force to stop the container forcefully after test finishes,
another approach would be checking if it's fully ready. Since we just
care about the command we want to test and we don't care about possible
data corruption of the container for the test, I think adding this flag
is enough.

This issue was spotted with shiftfs-lxd.sh test. Add this flag to other
tests as well just in case.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Sean Feole <email address hidden>
Acked-by: Francis Ginther <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

13d2899... by Po-Hsu Lin

[install-deps] ensure lxd is up-to-date

Test on Mantic shows shiftfs-lxd.sh requires lxd 5.17 to run, otherwise
it will fail with:
  Error: Required tool zpool is missing
  Creating c1
  Error: Failed loading storage pool "zfs": Storage pool not found
  Error: Instance not found
  FAIL
  Error: Instance not found
  Error: Failed checking instance exists "local:c1": Instance not found
  Error: Storage pool not found

With lxd 5.13 preloaded on Mantic, we need to run the refresh command
to ensure it's up-to-date.

Remove the if statement for lxc command check, just try to install and
refresh it.

Signed-off-by: Po-Hsu Lin <email address hidden>
Acked-by: Andrea Righi <email address hidden>
Signed-off-by: Po-Hsu Lin <email address hidden>

c2d43b8... by Andrea Righi

[install-deps] add zfsutils-linux to the install dependencies

BugLink: https://bugs.launchpad.net/bugs/2033753

Signed-off-by: Andrea Righi <email address hidden>