Skip to content

Commit 302b2e8

Browse files
committed
tests/int: use gawk where needed
This expression is specific to GNU awk (gawk), so if someone has other version of awk installed, this won't work and it's not easy to see why. Explicitly requiring gawk here is better. Revert "tests/int/helpers: gawk -> awk" This reverts commit 4e65118. Reported-by: lifubang <[email protected]> Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 9d2842d commit 302b2e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/integration/helpers.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ function init_cgroup_paths() {
132132
CGROUP_SUBSYSTEMS=$(awk '!/^#/ {print $1}' /proc/cgroups)
133133
local g base_path
134134
for g in ${CGROUP_SUBSYSTEMS}; do
135-
base_path=$(awk '$(NF-2) == "cgroup" && $NF ~ /\<'"${g}"'\>/ { print $5; exit }' /proc/self/mountinfo)
135+
# This uses gawk-specific feature (\< ... \>).
136+
base_path=$(gawk '$(NF-2) == "cgroup" && $NF ~ /\<'"${g}"'\>/ { print $5; exit }' /proc/self/mountinfo)
136137
test -z "$base_path" && continue
137138
eval CGROUP_"${g^^}"_BASE_PATH="${base_path}"
138139
done

0 commit comments

Comments
 (0)