]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Allow overriding of container name
authorTom Hromatka <tom.hromatka@oracle.com>
Thu, 24 Mar 2022 15:00:30 +0000 (09:00 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 1 Apr 2022 14:01:18 +0000 (08:01 -0600)
The parameter --name was previously added to allow overriding
the container's name, but it wasn't fully plumbed.  Enable the
--name feature by fully connecting it down to the Container
class.

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

index b65d31c790602422c66e3ce135ae5a20e87b21b2..e14d28fe881aec4390764d9778134d29df3428a3 100644 (file)
@@ -23,7 +23,7 @@ class Config(object):
                 self.container = container
             else:
                 # Use the default container settings
-                self.container = Container(name=consts.DEFAULT_CONTAINER_NAME,
+                self.container = Container(name=args.name,
                                            stop_timeout=args.timeout,
                                            arch=None,
                                            distro=args.distro,
index ee8faba07ad57ed3114fca20b16ba9b9e1869f72..af357a9f82f6a9e59b454a797c5a210dfe6195af 100755 (executable)
@@ -30,7 +30,7 @@ def parse_args():
                             help='name of the container',
                             required=False,
                             type=str,
-                            default=None
+                            default=consts.DEFAULT_CONTAINER_NAME
                         )
     parser.add_argument(
                             '-d', '--distro',