]> git.ipfire.org Git - thirdparty/systemd.git/commit
TEST-13-NSPAWN: remove pulled image on exit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Jan 2026 12:21:59 +0000 (21:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Jan 2026 19:54:48 +0000 (04:54 +0900)
commitfc48bf0c6bc363eff993c3ed54a73a268d489914
tree3c2c7f92f8bc834083919508bc1d340eb2d35151
parent0eaddf8c82c03fee8ad197e9c0891637661a0076
TEST-13-NSPAWN: remove pulled image on exit

Otherwise, if the VM is unexpectedly rebooted, then `importctl --user pull-tar`
may fail as the file may already exist.
```
[  123.351751] TEST-13-NSPAWN.sh[3946]: + run0 -u testuser importctl --user pull-tar file:///var/tmp/image-tar/kurps.tar.gz nurps --verify=checksum -m
[  123.541603] TEST-13-NSPAWN.sh[4311]: Enqueued transfer job 3. Press C-c to continue download in background.
[  123.552456] TEST-13-NSPAWN.sh[4311]: Pulling 'file:///var/tmp/image-tar/kurps.tar.gz', saving as 'nurps'.
[  123.552788] TEST-13-NSPAWN.sh[4311]: Operating on image directory '/home/testuser/.local/state/machines'.
[  123.819942] TEST-13-NSPAWN.sh[4311]: Got 1% of file:///var/tmp/image-tar/kurps.tar.gz.
[  124.156557] TEST-13-NSPAWN.sh[4311]: * shutting down connection #0
[  124.156896] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.tar.gz.sha256
[  124.157223] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159198] TEST-13-NSPAWN.sh[4311]: * Could not open file /var/tmp/image-tar/kurps.nspawn
[  124.159493] TEST-13-NSPAWN.sh[4311]: * closing connection #-1
[  124.159818] TEST-13-NSPAWN.sh[4311]: Acquired 68.5M.
[  124.160395] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/kurps.tar.gz complete.
[  124.160664] TEST-13-NSPAWN.sh[4311]: Transfer failed: Could not read a file:// file
[  124.160923] TEST-13-NSPAWN.sh[4311]: Settings file could not be retrieved, proceeding without.
[  124.404733] TEST-13-NSPAWN.sh[4311]: * shutting down connection #1
[  124.405162] TEST-13-NSPAWN.sh[4311]: Acquired 79B.
[  124.406170] TEST-13-NSPAWN.sh[4311]: Download of file:///var/tmp/image-tar/SHA256SUMS complete.
[  124.406734] TEST-13-NSPAWN.sh[4311]: SHA256 checksum of file:///var/tmp/image-tar/kurps.tar.gz is valid.
[  124.455446] TEST-13-NSPAWN.sh[4311]: Failed to rename to final image name to /home/testuser/.local/state/machines/.tar-file:\x2f\x2f\x2fvar\x2ftmp\x2fimage-tar\x2fkurps\x2etar\x2egz: File exists
[  124.457251] TEST-13-NSPAWN.sh[4311]: Exiting.
```
Workaround for issue #38240.
test/units/TEST-13-NSPAWN.unpriv.sh