Skip to content

Commit

Permalink
check_sys: fix kernel version check
Browse files Browse the repository at this point in the history
  • Loading branch information
jovanbulck committed Sep 30, 2024
1 parent afb74c4 commit c365643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_sys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ assert_not_contains() {
}

assert_not_contains_from_version() {
if [[ "$(printf '%s\n' "$1" "$(uname -r)" | sort -rV | head -n1)" == "$1" ]]; then
if [[ "$(printf '%s\n' "$1" "$(uname -r)" | sort -V | head -n1)" == "$1" ]]; then
if [[ $2 =~ $3 ]]; then
print_err "\`$3\` $4"
fi
Expand Down Expand Up @@ -78,7 +78,7 @@ for c in $unknown_cmdline
do
# NOTE: pti=off wrongly reported as unknown by Linux kernel < 6.7
if [[ $c =~ "pti" ]]; then
assert_not_contains_from_version "6.4.0" "$sgxstep_cmdline" $c "reported unknown to kernel"
assert_not_contains_from_version "6.7.0" "$sgxstep_cmdline" $c "reported unknown to kernel"
else
assert_not_contains "$sgxstep_cmdline" $c "reported unknown to kernel"
fi
Expand Down

0 comments on commit c365643

Please sign in to comment.