~canonical-kernel-team/+git/overlay-shiftfs-tests:systemd-tmpfiles-race

Last commit made on 2023-11-01
Get this branch:
git clone -b systemd-tmpfiles-race 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

Name:
systemd-tmpfiles-race
Repository:
lp:~canonical-kernel-team/+git/overlay-shiftfs-tests

Recent commits

d9b1b68... 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>

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>

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>

61d85e2... by Po-Hsu Lin

[install-deps] Only install testing tools for Focal and newer releases

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

We have decided to run just the old ubuntu_overlayfs_smoke_test.sh test
on older release (< Focal), therefore there is no need to install these
packages there.

Also note that snapd is not fully supported on Trusty. That's another
reason why we should skip installing these packages.

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

70eeeb7... by Po-Hsu Lin

Revert "install-deps: install git for trusty"

This reverts commit 3f3e934b8df1c645ce8346bdef542b947b170ff4.

git package must be installed before cloning this repo.
We should install it somewhere else.

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

3f3e934... by Po-Hsu Lin

install-deps: install git for trusty

git was not installed by default on trusty, add it to
the package dependency.

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

a2a4d65... by Po-Hsu Lin

install-deps: make sure snap and bc are available

On Xenial, it's complaining about bc command not found.
And snap command is not available when testing on Jammy ADT.

Ensure these two packages are properly installed.

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