From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Petri Latvala <petri.latvala@intel.com>,
Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2] intel_gvtg_test: Handle system(3) return value.
Date: Thu, 9 Nov 2017 10:16:47 +0000 [thread overview]
Message-ID: <f0df996a-c87d-0060-4b40-d3cda843e628@linux.intel.com> (raw)
In-Reply-To: <20171108125250.lenvh2zrs75sq2wj@platvala-desk.ger.corp.intel.com>
On 08/11/2017 12:52, Petri Latvala wrote:
> On Wed, Nov 08, 2017 at 12:47:43PM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Avoid the build warning by checking the pkill either did not find
>> any guests or managed to send a signal to all of them.
>>
>> v2: Inspect system(3) return value properly. (Petri Latvala)
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
>
> Someone(tm) can follow this up with a patch that changes it to use
> igt_terminate_process...
Better suited to actual owners of this file I think. I was only
distracted by the compile warning. Since it is a bigger task - question
of case comparison, full vs substring, mismatching return codes between
two implementations of igt_terminate_process...
Regards,
Tvrtko
>
>> ---
>> tools/intel_gvtg_test.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
>> index 7a29fbdde7cd..659b7956725c 100644
>> --- a/tools/intel_gvtg_test.c
>> +++ b/tools/intel_gvtg_test.c
>> @@ -144,7 +144,10 @@ static void create_guest(void)
>>
>> static void destroy_all_guest(void)
>> {
>> - system("pkill qemu");
>> + int ret = system("pkill qemu");
>> +
>> + igt_assert(ret >= 0 && WIFEXITED(ret));
>> + igt_assert(WEXITSTATUS(ret) == 0 || WEXITSTATUS(ret) == 1);
>> }
>>
>> static void remove_vgpu(void)
>> --
>> 2.14.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-09 10:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 12:06 [PATCH i-g-t 0/5] Assorted compile warnings fixes Tvrtko Ursulin
2017-11-08 12:06 ` [PATCH i-g-t 1/5] intel-gpu-overlay: Avoid theoretical string overflow Tvrtko Ursulin
2017-11-08 12:25 ` Petri Latvala
2017-11-08 12:06 ` [PATCH i-g-t 2/5] aubdump: Avoid mixing declarations and code Tvrtko Ursulin
2017-11-08 12:06 ` [PATCH i-g-t 3/5] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
2017-11-22 17:44 ` Tvrtko Ursulin
2017-11-22 17:52 ` Chris Wilson
2017-11-08 12:06 ` [PATCH i-g-t 4/5] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
2017-11-08 12:28 ` Petri Latvala
2017-11-09 10:18 ` Tvrtko Ursulin
2017-11-08 12:06 ` [PATCH i-g-t 5/5] intel_gvtg_test: Handle system(3) return value Tvrtko Ursulin
2017-11-08 12:19 ` Chris Wilson
2017-11-08 12:50 ` Tvrtko Ursulin
2017-11-08 12:22 ` Petri Latvala
2017-11-08 12:47 ` [PATCH i-g-t v2] " Tvrtko Ursulin
2017-11-08 12:52 ` Petri Latvala
2017-11-09 10:16 ` Tvrtko Ursulin [this message]
2017-11-08 18:09 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-08 20:14 ` ✗ Fi.CI.IGT: " Patchwork
2017-11-08 17:36 ` ✗ Fi.CI.BAT: failure for Assorted compile warnings fixes Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0df996a-c87d-0060-4b40-d3cda843e628@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox