tests/int/cgroups.bats: fix a shellcheck warning

Fixes the following warning:

> In cgroups.bats line 58:
>     if [ "$KERNEL_MAJOR" -lt 4 ] || [ "$KERNEL_MAJOR" -eq 4 -a "$KERNEL_MINOR" -le 5 ]; then
>                                                             ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-08-09 13:36:37 -07:00
parent 4b8ff6a17c
commit 82836d2429
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ function setup() {
runc update test_cgroups_kmem --kernel-memory 50331648
# Since kernel 4.6, we can update kernel memory without initialization
# because it's accounted by default.
if [ "$KERNEL_MAJOR" -lt 4 ] || [ "$KERNEL_MAJOR" -eq 4 -a "$KERNEL_MINOR" -le 5 ]; then
if [[ "$KERNEL_MAJOR" -lt 4 || ( "$KERNEL_MAJOR" -eq 4 && "$KERNEL_MINOR" -le 5 ) ]]; then
[ ! "$status" -eq 0 ]
else
[ "$status" -eq 0 ]