Skip to content

Commit

Permalink
add a noexec check
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Nov 30, 2023
1 parent dd1d5de commit 7a4f15c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions func/common/imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions func/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if [[ "$is_epel" == "0" ]]; then
exit 1
fi

r_checkTmpNoExec

r_log "internal" "Starting Release Engineering Core Tests"

################################################################################
Expand Down

0 comments on commit 7a4f15c

Please sign in to comment.