aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2024-03-06 00:37:53 +0100
committerBernd Schubert <bschubert@ddn.com>2024-03-07 11:56:30 +0100
commitaab146eea8877ee744a1b5a0da8bbbf31d14bad1 (patch)
treeed6112441fa1e14dda59e52aa940e1e62a7717e6 /test
parentb1cdc497b8c858b2f292a94e28ed39a4960f5274 (diff)
downloadlibfuse-aab146eea8877ee744a1b5a0da8bbbf31d14bad1.tar.gz
ci-build.sh: Always install and add s-bit for fusermount3
As per pull #898, fusermount3 had a severe issue that should have been detected by ASAN. I guess tests used the system default and not the sanitized binary. Order of execution of fusermount3 is to try 1) full install path if that fails 2) just fusermount3 So tests should be fixed by installing libfuse, setting the s-bit on fusermount3 and then to run the tests.
Diffstat (limited to 'test')
-rwxr-xr-xtest/ci-build.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/ci-build.sh b/test/ci-build.sh
index c266ea2..a023c15 100755
--- a/test/ci-build.sh
+++ b/test/ci-build.sh
@@ -18,6 +18,9 @@ umask 0022
# readable/executable.
SOURCE_DIR="$(readlink -f .)"
TEST_DIR="$(mktemp -dt libfuse-build-XXXXXX)"
+
+PREFIX_DIR="$(mktemp -dt libfuse-install-XXXXXXX)"
+
chmod 0755 "${TEST_DIR}"
cd "${TEST_DIR}"
echo "Running in ${TEST_DIR}"
@@ -47,13 +50,17 @@ for CC in gcc gcc-9 gcc-10 clang; do
else
build_opts=''
fi
- meson setup -D werror=true ${build_opts} "${SOURCE_DIR}" || (cat meson-logs/meson-log.txt; false)
+ meson setup -Dprefix=${PREFIX_DIR} -D werror=true ${build_opts} "${SOURCE_DIR}" || (cat meson-logs/meson-log.txt; false)
ninja
+ sudo ninja install
+
+ # libfuse will first try the install path and then system defaults
+ sudo chmod 4755 ${PREFIX_DIR}/bin/fusermount3
- sudo chown root:root util/fusermount3
- sudo chmod 4755 util/fusermount3
${TEST_CMD}
popd
+ rm -fr build-${CC}
+ sudo rm -fr ${PREFIX_DIR}
done
sanitized_build()
@@ -62,7 +69,7 @@ sanitized_build()
mkdir build-san; pushd build-san
- meson setup -D werror=true\
+ meson setup -Dprefix=${PREFIX_DIR} -D werror=true\
"${SOURCE_DIR}" \
|| (ct meson-logs/meson-log.txt; false)
meson configure $SAN
@@ -73,11 +80,11 @@ sanitized_build()
meson configure
ninja
+ sudo ninja install
+ sudo chmod 4755 ${PREFIX_DIR}/bin/fusermount3
# Test as root and regular user
sudo ${TEST_CMD}
- sudo chown root:root util/fusermount3
- sudo chmod 4755 util/fusermount3
# Cleanup temporary files (since they are now owned by root)
sudo rm -rf test/.pytest_cache/ test/__pycache__
@@ -85,6 +92,7 @@ sanitized_build()
popd
rm -fr build-san
+ sudo rm -fr ${PREFIX_DIR}
)
# Sanitized build