[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] docker.py: always use --rm
From: |
Alex Bennée |
Subject: |
Re: [PATCH] docker.py: always use --rm |
Date: |
Thu, 17 Sep 2020 17:52:59 +0100 |
User-agent: |
mu4e 1.5.5; emacs 28.0.50 |
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On 9/17/20 12:44 PM, Paolo Bonzini wrote:
>> Avoid that containers pile up.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>> tests/docker/Makefile.include | 1 -
>> tests/docker/docker.py | 4 ++--
>> 2 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 3daabaa2fd..75704268ff 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -243,7 +243,6 @@ docker-run: docker-qemu-src
>> $(DOCKER_SCRIPT) run \
>> $(if $(NOUSER),,--run-as-current-user) \
>> --security-opt seccomp=unconfined \
>> - $(if $V,,--rm) \
>> $(if $(DEBUG),-ti,) \
>
> Alternatively:
>
> - $(if $V,,--rm)
> - $(if $(DEBUG),-ti,)
> + $(if $(DEBUG),-ti,--rm)
Surely that should b:
$(if $(DEBUG),-ti --rm,)
I think being able to keep the container around is useful for debug, I
have no problem with changing the behaviour for V=1.
>
> Anyhow:
> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
>> $(if $(NETWORK),$(if $(subst
>> $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
>> -e TARGET_LIST=$(subst
>> $(SPACE),$(COMMA),$(TARGET_LIST)) \
>> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>> index 356d7618f1..36b7868406 100755
>> --- a/tests/docker/docker.py
>> +++ b/tests/docker/docker.py
>> @@ -377,7 +377,7 @@ class Docker(object):
>> if self._command[0] == "podman":
>> cmd.insert(0, '--userns=keep-id')
>>
>> - ret = self._do_check(["run", "--label",
>> + ret = self._do_check(["run", "--rm", "--label",
>> "com.qemu.instance.uuid=" + label] + cmd,
>> quiet=quiet)
>> if not keep:
>> @@ -616,7 +616,7 @@ class CcCommand(SubCommand):
>> if argv and argv[0] == "--":
>> argv = argv[1:]
>> cwd = os.getcwd()
>> - cmd = ["--rm", "-w", cwd,
>> + cmd = ["-w", cwd,
>> "-v", "%s:%s:rw" % (cwd, cwd)]
>> if args.paths:
>> for p in args.paths:
>>
--
Alex Bennée