]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/055: Fix quote warnings
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 19 Jul 2024 10:33:03 +0000 (16:03 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Tue, 20 Aug 2024 20:42:50 +0000 (14:42 -0600)
Fix multiple "Q003 Change outer quotes to avoid escaping inner quotes"
warnings.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/055-sudo-set_uid_gid_v1.py

index 7ca972e452ff9d02ca36809f2a2317f64de80f29..94579b50c64745afa4ca5cc1152f1e6d96880baf 100755 (executable)
@@ -53,12 +53,12 @@ def test(config):
     tasks_uid = utils.get_file_owner_uid(config, tasks_path)
     if tasks_uid != TASKS_UID:
         result = consts.TEST_FAILED
-        cause = 'Expected tasks owner to be {} but it\'s {}'.format(TASKS_UID, tasks_uid)
+        cause = "Expected tasks owner to be {} but it's {}".format(TASKS_UID, tasks_uid)
 
     tasks_gid = utils.get_file_owner_gid(config, tasks_path)
     if tasks_gid != TASKS_GID:
         result = consts.TEST_FAILED
-        tmp_cause = 'Expected tasks group to be {} but it\'s {}'.format(TASKS_GID, tasks_gid)
+        tmp_cause = "Expected tasks group to be {} but it's {}".format(TASKS_GID, tasks_gid)
         cause = '\n'.join(filter(None, [cause, tmp_cause]))
 
     ctrl_path = os.path.join(CgroupCli.get_controller_mount_point(CONTROLLER), CGNAME,
@@ -67,13 +67,13 @@ def test(config):
     ctrl_uid = utils.get_file_owner_uid(config, ctrl_path)
     if ctrl_uid != CTRL_UID:
         result = consts.TEST_FAILED
-        tmp_cause = 'Expected cgroup.procs owner to be {} but it\'s {}'.format(CTRL_UID, ctrl_uid)
+        tmp_cause = "Expected cgroup.procs owner to be {} but it's {}".format(CTRL_UID, ctrl_uid)
         cause = '\n'.join(filter(None, [cause, tmp_cause]))
 
     ctrl_gid = utils.get_file_owner_gid(config, ctrl_path)
     if ctrl_gid != CTRL_GID:
         result = consts.TEST_FAILED
-        tmp_cause = 'Expected cgroup.procs group to be {} but it\'s {}'.format(CTRL_GID, ctrl_gid)
+        tmp_cause = "Expected cgroup.procs group to be {} but it's {}".format(CTRL_GID, ctrl_gid)
         if not cause:
             cause = tmp_cause
         else: