From 02cfe361d64793e86f7cee7d157c53a012b5c3b1 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 5 Jul 2023 11:50:01 +0100 Subject: oeqa/runtime/cases/rpm: fix wait_for_no_process_for_user failure case str.format() doesn't use % notation, update the formatting to work. assertTrue() is a member of self not a global, and assertTrue(True) will always pass. Change this to just self.fail() as this is the failure case. (From OE-Core rev: 2be0f2c62fb893f093091cbb30967f32f9d3165b) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit 017f3a0b1265c1a3b69c20bdb56bbf446111977e) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/runtime/cases/rpm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/lib/oeqa') diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py index 2b6cfe5ff2..203fcc8505 100644 --- a/meta/lib/oeqa/runtime/cases/rpm.py +++ b/meta/lib/oeqa/runtime/cases/rpm.py @@ -57,8 +57,8 @@ class RpmBasicTest(OERuntimeTestCase): return time.sleep(1) user_pss = [ps for ps in output.split("\n") if u + ' ' in ps] - msg = "There're %s 's process(es) still running: %s".format(u, "\n".join(user_pss)) - assertTrue(True, msg=msg) + msg = "User %s has processes still running: %s" % (u, "\n".join(user_pss)) + self.fail(msg=msg) def unset_up_test_user(u): # ensure no test1 process in running -- cgit v1.2.3-54-g00ecf