* [PATCH] tests: add prefixes to the bare mkdtemp calls
@ 2020-11-13 13:34 Alex Bennée
2020-11-13 13:39 ` no-reply
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alex Bennée @ 2020-11-13 13:34 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, Eduardo Habkost, Alex Bennée,
Alex Bennée, Wainer dos Santos Moschetta,
Philippe Mathieu-Daudé,
Cleber Rosa, John Snow
The first step to debug a thing is to know what created the thing in
the first place. Add some prefixes so random tmpdir's have something
grep in the code.
Signed-off-by: Alex Bennée <alex.bennee@hackbox2.linaro.org>
---
python/qemu/machine.py | 2 +-
tests/acceptance/avocado_qemu/__init__.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 6420f01bed..052a77592c 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -303,7 +303,7 @@ class QEMUMachine:
return args
def _pre_launch(self) -> None:
- self._temp_dir = tempfile.mkdtemp(dir=self._test_dir)
+ self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-", dir=self._test_dir)
self._qemu_log_path = os.path.join(self._temp_dir, self._name + ".log")
self._qemu_log_file = open(self._qemu_log_path, 'wb')
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 4cda037187..8496a0c43d 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -171,7 +171,7 @@ class Test(avocado.Test):
self.cancel("No QEMU binary defined or found in the build tree")
def _new_vm(self, *args):
- vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp())
+ vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp(prefix="avocado_qemu_sock_"))
if args:
vm.add_args(*args)
return vm
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: add prefixes to the bare mkdtemp calls
2020-11-13 13:34 [PATCH] tests: add prefixes to the bare mkdtemp calls Alex Bennée
@ 2020-11-13 13:39 ` no-reply
2020-11-16 12:42 ` Philippe Mathieu-Daudé
2020-11-23 15:38 ` Willian Rampazzo
2 siblings, 0 replies; 4+ messages in thread
From: no-reply @ 2020-11-13 13:39 UTC (permalink / raw)
To: alex.bennee
Cc: peter.maydell, ehabkost, alex.bennee, qemu-devel, wainersm,
philmd, jsnow, crosa, alex.bennee
Patchew URL: https://patchew.org/QEMU/20201113133424.8723-1-alex.bennee@linaro.org/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 20201113133424.8723-1-alex.bennee@linaro.org
Type: series
Subject: [PATCH] tests: add prefixes to the bare mkdtemp calls
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/20201113082626.2725812-1-armbru@redhat.com -> patchew/20201113082626.2725812-1-armbru@redhat.com
* [new tag] patchew/20201113133424.8723-1-alex.bennee@linaro.org -> patchew/20201113133424.8723-1-alex.bennee@linaro.org
Switched to a new branch 'test'
0a6d11e tests: add prefixes to the bare mkdtemp calls
=== OUTPUT BEGIN ===
WARNING: line over 80 characters
#23: FILE: python/qemu/machine.py:306:
+ self._temp_dir = tempfile.mkdtemp(prefix="qemu-machine-", dir=self._test_dir)
ERROR: line over 90 characters
#36: FILE: tests/acceptance/avocado_qemu/__init__.py:174:
+ vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp(prefix="avocado_qemu_sock_"))
total: 1 errors, 1 warnings, 16 lines checked
Commit 0a6d11e02824 (tests: add prefixes to the bare mkdtemp calls) has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/20201113133424.8723-1-alex.bennee@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: add prefixes to the bare mkdtemp calls
2020-11-13 13:34 [PATCH] tests: add prefixes to the bare mkdtemp calls Alex Bennée
2020-11-13 13:39 ` no-reply
@ 2020-11-16 12:42 ` Philippe Mathieu-Daudé
2020-11-23 15:38 ` Willian Rampazzo
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-16 12:42 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: peter.maydell, Eduardo Habkost, Alex Bennée,
Wainer dos Santos Moschetta, Cleber Rosa, John Snow
On 11/13/20 2:34 PM, Alex Bennée wrote:
> The first step to debug a thing is to know what created the thing in
> the first place. Add some prefixes so random tmpdir's have something
> grep in the code.
>
> Signed-off-by: Alex Bennée <alex.bennee@hackbox2.linaro.org>
> ---
> python/qemu/machine.py | 2 +-
> tests/acceptance/avocado_qemu/__init__.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: add prefixes to the bare mkdtemp calls
2020-11-13 13:34 [PATCH] tests: add prefixes to the bare mkdtemp calls Alex Bennée
2020-11-13 13:39 ` no-reply
2020-11-16 12:42 ` Philippe Mathieu-Daudé
@ 2020-11-23 15:38 ` Willian Rampazzo
2 siblings, 0 replies; 4+ messages in thread
From: Willian Rampazzo @ 2020-11-23 15:38 UTC (permalink / raw)
To: Alex Bennée
Cc: Peter Maydell, Eduardo Habkost, Alex Bennée, qemu-devel,
Wainer dos Santos Moschetta, John Snow, Cleber Rosa,
Philippe Mathieu-Daudé
On Fri, Nov 13, 2020 at 10:35 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The first step to debug a thing is to know what created the thing in
> the first place. Add some prefixes so random tmpdir's have something
> grep in the code.
>
> Signed-off-by: Alex Bennée <alex.bennee@hackbox2.linaro.org>
> ---
> python/qemu/machine.py | 2 +-
> tests/acceptance/avocado_qemu/__init__.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-23 15:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 13:34 [PATCH] tests: add prefixes to the bare mkdtemp calls Alex Bennée
2020-11-13 13:39 ` no-reply
2020-11-16 12:42 ` Philippe Mathieu-Daudé
2020-11-23 15:38 ` Willian Rampazzo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.