mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
test: use sd-analyze for kernel version check in TEST-62
This commit is contained in:
parent
90db1582a9
commit
c790537b89
|
@ -34,15 +34,7 @@ teardown() {
|
||||||
systemd-analyze log-level info
|
systemd-analyze log-level info
|
||||||
}
|
}
|
||||||
|
|
||||||
KERNEL_VERSION="$(uname -r)"
|
if systemd-analyze compare-versions "$(uname -r)" lt 5.7; then
|
||||||
KERNEL_MAJOR="${KERNEL_VERSION%%.*}"
|
|
||||||
KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"
|
|
||||||
KERNEL_MINOR="${KERNEL_MINOR%%.*}"
|
|
||||||
|
|
||||||
MAJOR_REQUIRED=5
|
|
||||||
MINOR_REQUIRED=7
|
|
||||||
|
|
||||||
if [[ "$KERNEL_MAJOR" -lt $MAJOR_REQUIRED || ("$KERNEL_MAJOR" -eq $MAJOR_REQUIRED && "$KERNEL_MINOR" -lt $MINOR_REQUIRED) ]]; then
|
|
||||||
echo "kernel is not 5.7+" >>/skipped
|
echo "kernel is not 5.7+" >>/skipped
|
||||||
exit 77
|
exit 77
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue