public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value.
Date: Fri,  3 Nov 2017 11:47:56 +0000	[thread overview]
Message-ID: <20171103114756.20144-3-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20171103114756.20144-1-tvrtko.ursulin@linux.intel.com>

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.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 tools/intel_gvtg_test.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index 7a29fbdde7cd..8c3d10cbd97f 100644
--- a/tools/intel_gvtg_test.c
+++ b/tools/intel_gvtg_test.c
@@ -144,7 +144,9 @@ static void create_guest(void)
 
 static void destroy_all_guest(void)
 {
-    system("pkill qemu");
+	int ret = system("pkill qemu");
+
+	igt_assert(ret == 0 || ret == 1);
 }
 
 static void remove_vgpu(void)
-- 
2.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-11-03 11:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03 11:47 [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Tvrtko Ursulin
2017-11-03 11:47 ` [PATCH i-g-t 2/3] gem_syslatency: Avoid arithmetic on void * warning Tvrtko Ursulin
2017-11-03 11:53   ` Chris Wilson
2017-11-03 11:47 ` Tvrtko Ursulin [this message]
2017-11-03 11:55   ` [PATCH i-g-t 3/3] intel_gvtg_test: Handle system(3) return value Chris Wilson
2017-11-03 12:01     ` Tvrtko Ursulin
2017-11-03 11:52 ` [PATCH i-g-t 1/3] lib/core: Avoid unused result in backtrace printing Chris Wilson
2017-11-03 12:04   ` Tvrtko Ursulin
2017-11-03 12:10     ` Chris Wilson
2017-11-03 12:56       ` Tvrtko Ursulin
2017-11-03 13:02         ` Chris Wilson
2017-11-03 13:07           ` Tvrtko Ursulin
2017-11-03 13:09           ` [PATCH i-g-t v2 " Tvrtko Ursulin
2017-11-03 12:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] " Patchwork
2017-11-03 14:18 ` ✗ Fi.CI.BAT: warning for series starting with [v2,1/3] lib/core: Avoid unused result in backtrace printing (rev2) 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=20171103114756.20144-3-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    /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