]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: use tar --no-same-owner for sysfs dump extraction
authorKarel Zak <kzak@redhat.com>
Thu, 28 May 2026 09:05:55 +0000 (11:05 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 28 May 2026 09:10:18 +0000 (11:10 +0200)
commitf6381d7c695a13eab1407475b93f58385ea28691
tree5bee3fde3062314c72a38670252a9123c5e09832
parent2f064612e09fc4b9b4f2d4b31ffe1c4d846ed9fc
tests: use tar --no-same-owner for sysfs dump extraction

Use --no-same-owner when extracting sysfs dump tarballs so that
extracted files are owned by the current user rather than preserving
the original (often root) ownership from the archive.

This allows chmem tests to run without root since they only operate
on a local sysfs dump via --sysroot. The valid_zones file (0444 in
real sysfs) needs an explicit chmod u+w before the test can write
to it. Apply --no-same-owner to lsblk, lscpu, lsmem, and hardlink
tests for consistency.

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/chmem/aarch64_16k_16g
tests/ts/chmem/x86_64_16g
tests/ts/hardlink/options
tests/ts/lsblk/lsblk
tests/ts/lscpu/lscpu
tests/ts/lsmem/lsmem