]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/027: fix the exit code on invalid parameters
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Thu, 29 Sep 2022 10:43:34 +0000 (16:13 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 30 Sep 2022 14:34:56 +0000 (08:34 -0600)
Fix the expected exit code for invalid/bad parameters passed to
libcgroup tools from  '255' to '129'.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/027-cgset-invalid_options.py

index 64a231282fef4401c03db79d8c195b3b4427ea42..6bca8a69cd0297cb786d3a19afa3801eb62595b8 100755 (executable)
@@ -45,10 +45,10 @@ def test(config):
             cause = "#1 Expected 'Wrong input parameters' to be in stderr"
             return result, cause
 
-        if re.ret != 255:
+        if re.ret != 129:
             result = consts.TEST_FAILED
             cause = (
-                        '#1 Expected return code of 255 but received {}'
+                        '#1 Expected return code of 129 but received {}'
                         ''.format(re.ret)
                     )
             return result, cause
@@ -66,10 +66,10 @@ def test(config):
             cause = "#2 Expected 'no cgroup specified' to be in stderr"
             return result, cause
 
-        if re.ret != 255:
+        if re.ret != 129:
             result = consts.TEST_FAILED
             cause = (
-                        '#2 Expected return code of 255 but received {}'
+                        '#2 Expected return code of 129 but received {}'
                         ''.format(re.ret)
                     )
             return result, cause
@@ -87,10 +87,10 @@ def test(config):
             cause = "#3 Expected 'no name-value pair' to be in stderr"
             return result, cause
 
-        if re.ret != 255:
+        if re.ret != 129:
             result = consts.TEST_FAILED
             cause = (
-                        '#3 Expected return code of 255 but received {}'
+                        '#3 Expected return code of 129 but received {}'
                         ''.format(re.ret)
                     )
             return result, cause
@@ -108,10 +108,10 @@ def test(config):
             cause = "#4 Expected 'Usage is' to be in stderr"
             return result, cause
 
-        if re.ret != 255:
+        if re.ret != 129:
             result = consts.TEST_FAILED
             cause = (
-                        '#4 Expected return code of 255 but received {}'
+                        '#4 Expected return code of 129 but received {}'
                         ''.format(re.ret)
                     )
             return result, cause
@@ -129,10 +129,10 @@ def test(config):
             cause = "#5 Expected 'Wrong parameter of option' to be in stderr"
             return result, cause
 
-        if re.ret != 255:
+        if re.ret != 129:
             result = consts.TEST_FAILED
             cause = (
-                        '#5 Expected return code of 255 but received {}'
+                        '#5 Expected return code of 129 but received {}'
                         ''.format(re.ret)
                     )
             return result, cause