qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-8.1] tests/test-util-filemonitor: Avoid pointless allocat


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH for-8.1] tests/test-util-filemonitor: Avoid pointless allocations
Date: Wed, 19 Jul 2023 17:49:47 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 19/7/23 17:39, Daniel P. Berrangé wrote:
On Wed, Jul 19, 2023 at 05:01:03PM +0200, Philippe Mathieu-Daudé wrote:
Coverity reports few resource leaks. While they are
harmless, fix them to avoid them showing on the reports.

Reported-by: Coverity (CID 1432615: RESOURCE_LEAK)
Fixes: 4f370b1098 ("test-util-filemonitor: Skip test on non-x86 Travis 
containers")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  tests/unit/test-util-filemonitor.c | 13 ++++++++-----
  1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/unit/test-util-filemonitor.c 
b/tests/unit/test-util-filemonitor.c
index b629e10857..3ca687860d 100644
--- a/tests/unit/test-util-filemonitor.c
+++ b/tests/unit/test-util-filemonitor.c
@@ -398,7 +398,7 @@ test_file_monitor_events(void)


      /*
       * This test does not work on Travis LXD containers since some
       * syscalls are blocked in that environment.

Right here is logic that checks the TRAVIS_ARCH env variable.

IMHO this should just be moved out into the main() method, so
we don't even start test when under Travis. Just make the whole
program exits with a skip status on travis.

Clever eh :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]