From: Tom Hromatka Date: Wed, 2 Aug 2023 18:39:06 +0000 (-0600) Subject: ftests: Fix erroneous calls to log_error() X-Git-Tag: v3.2.0~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a82f3c0344d95cd5b91a770b67e58b112fcd2b33;p=thirdparty%2Flibcgroup.git ftests: Fix erroneous calls to log_error() Two places in the functional tests were calling a nonexistent logging function - log_error(). Replace these erroneous calls with calls to log_critical(). Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/ftests.py b/tests/ftests/ftests.py index a6aa6af0..da26d590 100755 --- a/tests/ftests/ftests.py +++ b/tests/ftests/ftests.py @@ -262,11 +262,11 @@ def run_tests(config): try: filesuite = filename.split('-')[1] except IndexError: - Log.log_error( - 'Skipping {}. It doesn\'t conform to the ' - 'filename format' - ''.format(filename) - ) + Log.log_critical( + 'Skipping {}. It doesn\'t conform to the ' + 'filename format' + ''.format(filename) + ) continue if config.args.suite == consts.TESTS_RUN_ALL_SUITES or \ diff --git a/tests/ftests/run.py b/tests/ftests/run.py index c985162d..83a277a1 100644 --- a/tests/ftests/run.py +++ b/tests/ftests/run.py @@ -78,7 +78,7 @@ class Run(object): if err.find('Error: websocket: bad handshake') >= 0: # LXD sometimes throws this error on underpowered machines. # Wait a bit, then try the request again - Log.log_error('Received \'{}\' error. Re-running command'.format(err)) + Log.log_critical('Received \'{}\' error. Re-running command'.format(err)) time.sleep(5) ret, out, err = Run.__run(command, shell_bool, timeout)