summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-11-03 11:40:48 +0000
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-11-22 17:38:33 +0000
commitc1fe411c5d0461ffabcf96fd4305bd09f85005fa (patch)
tree7f9cf187a8acb141d8e5cca56ce83c304c1364c1 /tools
parent8a40a8a8538803893a0713a11014bd26451da90c (diff)
intel_gvtg_test: Handle system(3) return value.
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_gvtg_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/intel_gvtg_test.c b/tools/intel_gvtg_test.c
index 7a29fbdd..659b7956 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)