From b3412202e7995e932f3091db9269902bbca8fe5a Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Thu, 29 Sep 2022 16:13:34 +0530 Subject: [PATCH] ftests/027: fix the exit code on invalid parameters Fix the expected exit code for invalid/bad parameters passed to libcgroup tools from '255' to '129'. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka (cherry picked from commit bc3210d724fa5b0c6feec56e26d8a8eb36edc495) --- tests/ftests/027-cgset-invalid_options.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/ftests/027-cgset-invalid_options.py b/tests/ftests/027-cgset-invalid_options.py index 64a23128..6bca8a69 100755 --- a/tests/ftests/027-cgset-invalid_options.py +++ b/tests/ftests/027-cgset-invalid_options.py @@ -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 -- 2.47.2