From 565962e2cb78798618e0e478672afbc58176021f Mon Sep 17 00:00:00 2001 From: oech3 <> Date: Thu, 1 Jan 2026 23:34:40 +0900 Subject: [PATCH] GnuTests: Replace incompat tests --- util/build-gnu.sh | 3 --- util/fetch-gnu.sh | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 7e92396bfc3..0d58cb4fa7d 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -107,7 +107,6 @@ fi cd "${path_GNU}" && echo "[ pwd:'${PWD}' ]" # Any binaries that aren't built become `false` to make tests failure -# Note that some test (e.g. runcon/runcon-compute.sh) incorrectly passes by this for binary in $(./build-aux/gen-lists-of-programs.sh --list-progs); do bin_path="${UU_BUILD_DIR}/${binary}" test -f "${bin_path}" || cp -v /usr/bin/false "${bin_path}" @@ -174,8 +173,6 @@ grep -rl '\$abs_path_dir_' tests/*/*.sh | xargs -r "${SED}" -i "s|\$abs_path_dir "${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/runcon/runcon-no-reorder.sh "${SED}" -i 's/^print_ver_.*/require_selinux_/' tests/chcon/chcon-fail.sh -# Mask mtab by unshare instead of LD_PRELOAD (able to merge this to GNU?) -"${SED}" -i -e 's|^export LD_PRELOAD=.*||' -e "s|.*maybe LD_PRELOAD.*|df() { unshare -rm bash -c \"mount -t tmpfs tmpfs /proc \&\& command df \\\\\"\\\\\$@\\\\\"\" -- \"\$@\"; }|" tests/df/no-mtab-status.sh # We use coreutils yes "${SED}" -i "s|--coreutils-prog=||g" tests/misc/coreutils.sh # Different message diff --git a/util/fetch-gnu.sh b/util/fetch-gnu.sh index 92e88ed75c6..5bc3c26f437 100755 --- a/util/fetch-gnu.sh +++ b/util/fetch-gnu.sh @@ -8,5 +8,9 @@ curl -L ${repo}/raw/refs/heads/master/tests/mv/hardlink-case.sh > tests/mv/hardl curl -L ${repo}/raw/refs/heads/master/tests/mkdir/writable-under-readonly.sh > tests/mkdir/writable-under-readonly.sh curl -L ${repo}/raw/refs/heads/master/tests/cp/cp-mv-enotsup-xattr.sh > tests/cp/cp-mv-enotsup-xattr.sh #spell-checker:disable-line curl -L ${repo}/raw/refs/heads/master/tests/csplit/csplit-io-err.sh > tests/csplit/csplit-io-err.sh +# Replace tests not compatible with our binaries +sed -i -e 's/no-mtab-status.sh/no-mtab-status-masked-proc.sh/' -e 's/nproc-quota.sh/nproc-quota-systemd.sh/' tests/local.mk +curl -L ${repo}/raw/refs/heads/master/tests/df/no-mtab-status-masked-proc.sh > tests/df/no-mtab-status-masked-proc.sh +curl -L ${repo}/raw/refs/heads/master/tests/nproc/nproc-quota-systemd.sh > tests/nproc/nproc-quota-systemd.sh # Avoid incorrect PASS curl -L ${repo}/raw/refs/heads/master/tests/runcon/runcon-compute.sh > tests/runcon/runcon-compute.sh