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

Proposed by Thadeu Lima de Souza Cascardo
Status: Merged
Merge reported by: Po-Hsu Lin
Merged at revision: 306eead8977d0b37118e5e37b90d4d8e20c534d3
Proposed branch: ~canonical-kernel-team/+git/overlay-shiftfs-tests:systemd-tmpfiles-race
Merge into: ~canonical-kernel-team/+git/overlay-shiftfs-tests:main
Diff against target: 13 lines (+1/-1)
1 file modified
tests/ovl-mkdir-xattrs.sh (+1/-1)
Reviewer Review Type Date Requested Status
Po-Hsu Lin Approve
Andrea Righi Pending
Review via email: mp+453942@code.launchpad.net

Commit message

    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>

To post a comment you must log in.
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Thanks for fixing this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tests/ovl-mkdir-xattrs.sh b/tests/ovl-mkdir-xattrs.sh
2index 91bd996..8e4c1de 100755
3--- a/tests/ovl-mkdir-xattrs.sh
4+++ b/tests/ovl-mkdir-xattrs.sh
5@@ -10,7 +10,7 @@ fi
6
7 cat > test.sh <<'EOF'
8 #!/bin/bash -xe
9-dir=`mktemp -d`
10+dir=`mktemp -p "${HOME}" -d`
11 cleanup() {
12 umount -l $dir/t
13 rm -rf $dir

Subscribers

People subscribed via source and target branches

to all changes: