Skip to content

Commit

Permalink
ci: define runas function inline
Browse files Browse the repository at this point in the history
We don't have `test/units/util.sh`, which provides the definition of `runas` function in the RHEL9 codebase

rhel-only

Related: RHEL-35703
  • Loading branch information
jamacku committed Jun 11, 2024
1 parent adbc711 commit 27e836b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/units/testsuite-65.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ set -eux
# shellcheck source=test/units/assert.sh
. "$(dirname "$0")"/assert.sh

# On RHEL9 we don't have the `util.sh` script, so we need to define the `runas` function here
runas() {
local userid="${1:?}"
shift
XDG_RUNTIME_DIR=/run/user/"$(id -u "$userid")" setpriv --reuid="$userid" --init-groups "$@"
}

systemctl log-level debug
export SYSTEMD_LOG_LEVEL=debug

Expand Down

0 comments on commit 27e836b

Please sign in to comment.