From 7a4f15caf8a316241193f0aa72d7a049c820728e Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 30 Nov 2023 01:04:41 -0700 Subject: [PATCH] add a noexec check --- func/common/imports.sh | 10 ++++++++++ func/runtests.sh | 2 ++ 2 files changed, 12 insertions(+) diff --git a/func/common/imports.sh b/func/common/imports.sh index ae49ea2..562f1d7 100644 --- a/func/common/imports.sh +++ b/func/common/imports.sh @@ -46,6 +46,15 @@ function r_checkEPELEnabled() { return $? } +function r_checkTmpNoExec() { + grep 'tmp' /etc/fstab | grep -q noexec + tmpexec=$? + + if [ "$tmpexec" -eq "0" ]; then + r_log "internal" "WARN: noexec is set for temporary directories. Some tests may fail." + fi +} + ################################################################################ # Functions that deal with (p)ackages @@ -216,6 +225,7 @@ export -f r_log export -f r_checkExitStatus export -f r_processor export -f r_checkEPELEnabled +export -f r_checkTmpNoExec export -f p_installPackageNormal export -f p_installPackageNoWeaks export -f p_removePackage diff --git a/func/runtests.sh b/func/runtests.sh index 73f870b..40b2f89 100644 --- a/func/runtests.sh +++ b/func/runtests.sh @@ -38,6 +38,8 @@ if [[ "$is_epel" == "0" ]]; then exit 1 fi +r_checkTmpNoExec + r_log "internal" "Starting Release Engineering Core Tests" ################################################################################