500f43
From eedab4fd872c3be8ab15af767897f92c78a71fde Mon Sep 17 00:00:00 2001
500f43
From: Lokesh Mandvekar <lsm5@fedoraproject.org>
500f43
Date: Mon, 21 Feb 2022 14:58:40 -0500
500f43
Subject: [PATCH] helpers.bash: Use correct syntax
500f43
500f43
Fixes gating test failure:
500f43
```
500f43
 /usr/share/buildah/test/system/./helpers.bash: line 474: !is_cgroupsv2: command not found
500f43
 ```
500f43
500f43
Co-authored-by: Yiqiao Pu <ypu@redhat.com>
500f43
500f43
I'm just the committer.
500f43
500f43
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
500f43
---
500f43
 tests/helpers.bash | 8 ++++----
500f43
 1 file changed, 4 insertions(+), 4 deletions(-)
500f43
500f43
diff --git a/tests/helpers.bash b/tests/helpers.bash
500f43
index bd2794c974..3e72108bec 100644
500f43
--- a/tests/helpers.bash
500f43
+++ b/tests/helpers.bash
500f43
@@ -433,9 +433,9 @@ function skip_if_rootless() {
500f43
 ##################################
500f43
 function skip_if_rootless_and_cgroupv1() {
500f43
     if test "$BUILDAH_ISOLATION" = "rootless"; then
500f43
-	if !is_cgroupsv2; then
500f43
-		skip "${1:-test does not work when \$BUILDAH_ISOLATION = rootless} and not cgroupv2"
500f43
-	fi
500f43
+        if ! is_cgroupsv2; then
500f43
+            skip "${1:-test does not work when \$BUILDAH_ISOLATION = rootless} and not cgroupv2"
500f43
+        fi
500f43
     fi
500f43
 }
500f43
 
500f43
@@ -471,7 +471,7 @@ function skip_if_cgroupsv2() {
500f43
 #  skip_if_cgroupsv1  #  Some tests don't work with cgroupsv1
500f43
 #######################
500f43
 function skip_if_cgroupsv1() {
500f43
-    if !is_cgroupsv2; then
500f43
+    if ! is_cgroupsv2; then
500f43
         skip "${1:-test does not work with cgroups v1}"
500f43
     fi
500f43
 }