]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Change util get uid/gid functions to return an int
authorTom Hromatka <tom.hromatka@oracle.com>
Fri, 27 Jan 2023 20:28:10 +0000 (13:28 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 27 Jan 2023 20:28:10 +0000 (13:28 -0700)
get_file_owner_uid() and get_file_owner_gid() previously returned
the owning uid and gid as strings, respectively.  Change them to
return the uid and gid as ints.

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

index 61e4df6e39e6fe1ea96588f2ed4816041934b871..a0fb6ee4293b39bf0eca0d0df89552653c53b246 100644 (file)
@@ -23,9 +23,9 @@ def get_file_owner_uid(config, filename):
     cmd.append(filename)
 
     if config.args.container:
-        return config.container.run(cmd, shell_bool=True)
+        return int(config.container.run(cmd, shell_bool=True))
     else:
-        return Run.run(cmd, shell_bool=True)
+        return int(Run.run(cmd, shell_bool=True))
 
 
 def get_file_owner_username(config, filename):
@@ -49,9 +49,9 @@ def get_file_owner_gid(config, filename):
     cmd.append(filename)
 
     if config.args.container:
-        return config.container.run(cmd, shell_bool=True)
+        return int(config.container.run(cmd, shell_bool=True))
     else:
-        return Run.run(cmd, shell_bool=True)
+        return int(Run.run(cmd, shell_bool=True))
 
 
 def get_file_owner_group_name(config, filename):