* [PATCH] tests/unit/test-qga: do not qualify executable paths
@ 2024-01-03 16:51 Samuel Tardieu
2024-01-03 17:00 ` Daniel P. Berrangé
2024-01-03 17:34 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 4+ messages in thread
From: Samuel Tardieu @ 2024-01-03 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Konstantin Kostiuk, Michael Roth, Samuel Tardieu
guest-exec invocation does not need the full path of the executable to
execute. Using only the command names ensures correct execution of the
test on systems not adhering to the FHS.
Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
---
tests/unit/test-qga.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c
index 671e83cb86..8cddf5dc37 100644
--- a/tests/unit/test-qga.c
+++ b/tests/unit/test-qga.c
@@ -822,7 +822,7 @@ static void test_qga_guest_exec(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/echo', 'arg': [ '-n', '\" test_str \"' ],"
+ " 'path': 'echo', 'arg': [ '-n', '\" test_str \"' ],"
" 'capture-output': true } }");
g_assert_nonnull(ret);
qmp_assert_no_error(ret);
@@ -883,7 +883,7 @@ static void test_qga_guest_exec_separated(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/bash',"
+ " 'path': 'bash',"
" 'arg': [ '-c', 'for i in $(seq 4); do if (( $i %% 2 )); then echo stdout; else echo stderr 1>&2; fi; done;' ],"
" 'capture-output': 'separated' } }");
g_assert_nonnull(ret);
@@ -924,7 +924,7 @@ static void test_qga_guest_exec_merged(gconstpointer fix)
/* exec 'echo foo bar' */
ret = qmp_fd(fixture->fd, "{'execute': 'guest-exec', 'arguments': {"
- " 'path': '/bin/bash',"
+ " 'path': 'bash',"
" 'arg': [ '-c', 'for i in $(seq 4); do if (( $i %% 2 )); then echo stdout; else echo stderr 1>&2; fi; done;' ],"
" 'capture-output': 'merged' } }");
g_assert_nonnull(ret);
--
2.42.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/unit/test-qga: do not qualify executable paths
2024-01-03 16:51 [PATCH] tests/unit/test-qga: do not qualify executable paths Samuel Tardieu
@ 2024-01-03 17:00 ` Daniel P. Berrangé
2024-01-03 17:34 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2024-01-03 17:00 UTC (permalink / raw)
To: Samuel Tardieu; +Cc: qemu-devel, Konstantin Kostiuk, Michael Roth
On Wed, Jan 03, 2024 at 05:51:31PM +0100, Samuel Tardieu wrote:
> guest-exec invocation does not need the full path of the executable to
> execute. Using only the command names ensures correct execution of the
> test on systems not adhering to the FHS.
>
> Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
> ---
> tests/unit/test-qga.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/unit/test-qga: do not qualify executable paths
2024-01-03 16:51 [PATCH] tests/unit/test-qga: do not qualify executable paths Samuel Tardieu
2024-01-03 17:00 ` Daniel P. Berrangé
@ 2024-01-03 17:34 ` Philippe Mathieu-Daudé
2024-01-16 17:24 ` Konstantin Kostiuk
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-01-03 17:34 UTC (permalink / raw)
To: Samuel Tardieu, qemu-devel; +Cc: Konstantin Kostiuk, Michael Roth
On 3/1/24 17:51, Samuel Tardieu wrote:
> guest-exec invocation does not need the full path of the executable to
> execute. Using only the command names ensures correct execution of the
> test on systems not adhering to the FHS.
>
> Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
> ---
> tests/unit/test-qga.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/unit/test-qga: do not qualify executable paths
2024-01-03 17:34 ` Philippe Mathieu-Daudé
@ 2024-01-16 17:24 ` Konstantin Kostiuk
0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Kostiuk @ 2024-01-16 17:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé; +Cc: Samuel Tardieu, qemu-devel, Michael Roth
[-- Attachment #1: Type: text/plain, Size: 619 bytes --]
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
On Wed, Jan 3, 2024 at 7:34 PM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:
> On 3/1/24 17:51, Samuel Tardieu wrote:
> > guest-exec invocation does not need the full path of the executable to
> > execute. Using only the command names ensures correct execution of the
> > test on systems not adhering to the FHS.
> >
> > Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
> > ---
> > tests/unit/test-qga.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1150 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-16 18:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 16:51 [PATCH] tests/unit/test-qga: do not qualify executable paths Samuel Tardieu
2024-01-03 17:00 ` Daniel P. Berrangé
2024-01-03 17:34 ` Philippe Mathieu-Daudé
2024-01-16 17:24 ` Konstantin Kostiuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).