From patchwork Sun Mar 23 14:18:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3879091 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 75FD89F391 for ; Sun, 23 Mar 2014 14:19:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A25B201B4 for ; Sun, 23 Mar 2014 14:19:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 718A52018E for ; Sun, 23 Mar 2014 14:19:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 09F2F6E6A1; Sun, 23 Mar 2014 07:19:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 4654A6E693 for ; Sun, 23 Mar 2014 07:19:29 -0700 (PDT) Received: by mail-ee0-f52.google.com with SMTP id e49so3488797eek.39 for ; Sun, 23 Mar 2014 07:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VoW+99/fRBlAhZPRWY9K/KVvq3T2qW7ePRoiZNql0i0=; b=iiNt1nuonTot9oy992yeMPyqpKpJcgAdh8AdxJhBbqz/Io31x8wym5xGtzWnv1DXxB 8GgewLsChZ9Pt3svPtVgJAgwvbPgP+eG2ai3yvy8l2jLWAsehfL8BopAm4UFZZsqsYQF IYHjL1kt96h6wvQRST1BbSIv0eRTlAHasSSJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VoW+99/fRBlAhZPRWY9K/KVvq3T2qW7ePRoiZNql0i0=; b=QWxq++PrVR6Oz0u7BS5GHYjDF/08c4+U18kS9vy4qMj1uXl29VpnspDu2n51zypU86 6cNp+usscfVFAf/JutY5ZzJgl34RA+fUtooGWnWMTEEps84gJSqEa3rh6AVJO1yjbni0 vqFR5xxuzEL/omBVz9f457w40tDRxyPt1qP3iaaqPCskqwAnUGt3AjN3l/4MVcZ0o5NG ti2zhva6YYPkD5s3ahHTTeLeD4vRKrqynAZpu9rXawF5fxsaXhPhqtbm24BRn8ogIeOW JI8IRNIGalrCKMx26QJJUPqpYc1vRvrGjAOUk5XkF2FeCv9N90Zdt3glYPomWav8u732 9hpA== X-Gm-Message-State: ALoCoQlz5nIbXGhOIxHCLCZ9Zj2Uc56NQFbtM92XuCBRwBLStVWShCsJLA8NOP1dg3gbtp/sKLjB X-Received: by 10.14.127.132 with SMTP id d4mr57329eei.84.1395584368565; Sun, 23 Mar 2014 07:19:28 -0700 (PDT) Received: from phenom.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id cb5sm26392589eeb.18.2014.03.23.07.19.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Mar 2014 07:19:27 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 23 Mar 2014 15:18:47 +0100 Message-Id: <1395584342-11812-14-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1395584342-11812-1-git-send-email-daniel.vetter@ffwll.ch> References: <1395584342-11812-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 13/28] tests|lib: remove assert.h includes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Only the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead. Fix things up where assert instead of igt_assert was used. One tiny step towards header sanity. Signed-off-by: Daniel Vetter --- lib/drmtest.c | 2 +- lib/drmtest.h | 1 - lib/igt_core.c | 1 + lib/igt_kms.c | 6 +++--- lib/intel_batchbuffer.h | 10 +++++----- lib/ioctl_wrappers.c | 2 +- lib/media_fill.h | 1 - tests/drv_suspend.c | 4 ++-- tests/gem_ctx_basic.c | 2 -- tests/gem_fence_thrash.c | 32 ++++++++++++++++---------------- tests/gem_media_fill.c | 2 -- tests/gem_render_copy.c | 2 -- tests/gem_render_linear_blits.c | 2 -- tests/gem_render_tiled_blits.c | 2 -- tests/gem_storedw_batches_loop.c | 2 +- tests/gem_stress.c | 2 -- tests/gem_wait_render_timeout.c | 2 -- tests/igt_simulation.c | 1 + tests/kms_setmode.c | 25 ++++++++++++------------- tests/pm_rps.c | 2 +- tests/testdisplay.c | 4 ++-- tools/intel_l3_parity.c | 1 + 22 files changed, 47 insertions(+), 61 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index 78b9999d76f6..c2751e75d86a 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -396,7 +396,7 @@ void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr) num_trash_bos = gem_mappable_aperture_size() / (1024*1024); trash_bos = malloc(num_trash_bos * sizeof(drm_intel_bo *)); - assert(trash_bos); + igt_assert(trash_bos); for (i = 0; i < num_trash_bos; i++) trash_bos[i] = drm_intel_bo_alloc(bufmgr, "trash bo", 1024*1024, 4096); diff --git a/lib/drmtest.h b/lib/drmtest.h index ed6040f7e3b7..d048ee095386 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/igt_core.c b/lib/igt_core.c index dbfcd74f9160..3ff7efa7de93 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include #include diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d5d9e0228408..ac27d7ae1534 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -146,7 +146,7 @@ int kmstest_cairo_printf_line(cairo_t *cr, enum kmstest_text_align align, va_start(ap, fmt); ret = vasprintf(&text, fmt, ap); - assert(ret >= 0); + igt_assert(ret >= 0); va_end(ap); cairo_text_extents(cr, text, &extents); @@ -221,7 +221,7 @@ void kmstest_paint_test_pattern(cairo_t *cr, int width, int height) paint_marker(cr, 0, height); paint_marker(cr, width, height); - assert(!cairo_status(cr)); + igt_assert(!cairo_status(cr)); } void kmstest_paint_image(cairo_t *cr, const char *filename, @@ -232,7 +232,7 @@ void kmstest_paint_image(cairo_t *cr, const char *filename, double scale_x, scale_y; image = cairo_image_surface_create_from_png(filename); - assert(cairo_surface_status(image) == CAIRO_STATUS_SUCCESS); + igt_assert(cairo_surface_status(image) == CAIRO_STATUS_SUCCESS); img_width = cairo_image_surface_get_width(image); img_height = cairo_image_surface_get_height(image); diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index b3e4b8ffd4e5..7764064286b9 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -1,9 +1,9 @@ #ifndef INTEL_BATCHBUFFER_H #define INTEL_BATCHBUFFER_H -#include #include #include "intel_bufmgr.h" +#include "igt_core.h" #define BATCH_SZ 4096 #define BATCH_RESERVED 16 @@ -58,7 +58,7 @@ intel_batchbuffer_space(struct intel_batchbuffer *batch) static inline void intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, uint32_t dword) { - assert(intel_batchbuffer_space(batch) >= 4); + igt_assert(intel_batchbuffer_space(batch) >= 4); *(uint32_t *) (batch->ptr) = dword; batch->ptr += 4; } @@ -67,7 +67,7 @@ static inline void intel_batchbuffer_require_space(struct intel_batchbuffer *batch, unsigned int sz) { - assert(sz < BATCH_SZ - BATCH_RESERVED); + igt_assert(sz < BATCH_SZ - BATCH_RESERVED); if (intel_batchbuffer_space(batch) < sz) intel_batchbuffer_flush(batch); } @@ -110,7 +110,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch, * scope. */ #define OUT_RELOC_FENCED(buf, read_domains, write_domain, delta) do { \ - assert((delta) >= 0); \ + igt_assert((delta) >= 0); \ intel_batchbuffer_emit_reloc(batch, buf, delta, \ read_domains, write_domain, 1); \ } while (0) @@ -128,7 +128,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch, * scope. */ #define OUT_RELOC(buf, read_domains, write_domain, delta) do { \ - assert((delta) >= 0); \ + igt_assert((delta) >= 0); \ intel_batchbuffer_emit_reloc(batch, buf, delta, \ read_domains, write_domain, 0); \ } while (0) diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index 375693062eb6..febfc8b7ff91 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -808,7 +808,7 @@ void gem_require_ring(int fd, int ring_id) return; #endif default: - assert(0); + igt_assert(0); return; } } diff --git a/lib/media_fill.h b/lib/media_fill.h index 2e1af325cac6..3568cf603955 100644 --- a/lib/media_fill.h +++ b/lib/media_fill.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/drv_suspend.c b/tests/drv_suspend.c index 400c34b98fce..ff8a348bdd77 100644 --- a/tests/drv_suspend.c +++ b/tests/drv_suspend.c @@ -109,7 +109,7 @@ test_debugfs_reader(void) snprintf(tmp, sizeof(tmp) - 1, "while true; do find %s/%i/ -type f | xargs cat > /dev/null 2>&1; done", dfs_base, drm_get_card()); - assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); + igt_assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); } sleep(1); @@ -134,7 +134,7 @@ test_sysfs_reader(void) snprintf(tmp, sizeof(tmp) - 1, "while true; do find %s%i*/ -type f | xargs cat > /dev/null 2>&1; done", dfs_base, drm_get_card()); - assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); + igt_assert(execl("/bin/sh", "sh", "-c", tmp, (char *) NULL) != -1); } sleep(1); diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c index 3bfbe616eebd..4340000e25a1 100644 --- a/tests/gem_ctx_basic.c +++ b/tests/gem_ctx_basic.c @@ -30,12 +30,10 @@ */ #include -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c index bff73ddd7f92..86ee5bec30ce 100644 --- a/tests/gem_fence_thrash.c +++ b/tests/gem_fence_thrash.c @@ -113,8 +113,8 @@ _bo_write_verify(struct test *t) unsigned int dwords = OBJECT_SIZE >> 2; const char *tile_str[] = { "none", "x", "y" }; - assert (t->tiling >= 0 && t->tiling <= I915_TILING_Y); - assert (t->num_surfaces > 0); + igt_assert(t->tiling >= 0 && t->tiling <= I915_TILING_Y); + igt_assert(t->num_surfaces > 0); s = calloc(sizeof(*s), t->num_surfaces); igt_assert(s); @@ -171,7 +171,7 @@ static int run_test(int threads_per_fence, void *f, int tiling, t.num_surfaces = surfaces_per_thread; num_fences = gem_available_fences(t.fd); - assert (num_fences > 0); + igt_assert(num_fences > 0); num_threads = threads_per_fence * num_fences; @@ -181,7 +181,7 @@ static int run_test(int threads_per_fence, void *f, int tiling, if (threads_per_fence) { threads = calloc(sizeof(*threads), num_threads); - assert (threads != NULL); + igt_assert(threads != NULL); for (n = 0; n < num_threads; n++) pthread_create (&threads[n], NULL, f, &t); @@ -203,29 +203,29 @@ igt_main igt_skip_on_simulation(); igt_subtest("bo-write-verify-none") - assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0); + igt_assert(run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0); igt_subtest("bo-write-verify-x") - assert (run_test(0, bo_write_verify, I915_TILING_X, 80) == 0); + igt_assert(run_test(0, bo_write_verify, I915_TILING_X, 80) == 0); igt_subtest("bo-write-verify-y") - assert (run_test(0, bo_write_verify, I915_TILING_Y, 80) == 0); + igt_assert(run_test(0, bo_write_verify, I915_TILING_Y, 80) == 0); igt_subtest("bo-write-verify-threaded-none") - assert (run_test(5, bo_write_verify, I915_TILING_NONE, 2) == 0); + igt_assert(run_test(5, bo_write_verify, I915_TILING_NONE, 2) == 0); igt_subtest("bo-write-verify-threaded-x") { - assert (run_test(2, bo_write_verify, I915_TILING_X, 2) == 0); - assert (run_test(5, bo_write_verify, I915_TILING_X, 2) == 0); - assert (run_test(10, bo_write_verify, I915_TILING_X, 2) == 0); - assert (run_test(20, bo_write_verify, I915_TILING_X, 2) == 0); + igt_assert(run_test(2, bo_write_verify, I915_TILING_X, 2) == 0); + igt_assert(run_test(5, bo_write_verify, I915_TILING_X, 2) == 0); + igt_assert(run_test(10, bo_write_verify, I915_TILING_X, 2) == 0); + igt_assert(run_test(20, bo_write_verify, I915_TILING_X, 2) == 0); } igt_subtest("bo-write-verify-threaded-y") { - assert (run_test(2, bo_write_verify, I915_TILING_Y, 2) == 0); - assert (run_test(5, bo_write_verify, I915_TILING_Y, 2) == 0); - assert (run_test(10, bo_write_verify, I915_TILING_Y, 2) == 0); - assert (run_test(20, bo_write_verify, I915_TILING_Y, 2) == 0); + igt_assert(run_test(2, bo_write_verify, I915_TILING_Y, 2) == 0); + igt_assert(run_test(5, bo_write_verify, I915_TILING_Y, 2) == 0); + igt_assert(run_test(10, bo_write_verify, I915_TILING_Y, 2) == 0); + igt_assert(run_test(20, bo_write_verify, I915_TILING_Y, 2) == 0); } igt_subtest("bo-copy") diff --git a/tests/gem_media_fill.c b/tests/gem_media_fill.c index ef73ed68a8fa..220f8629ea5d 100644 --- a/tests/gem_media_fill.c +++ b/tests/gem_media_fill.c @@ -32,12 +32,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_render_copy.c b/tests/gem_render_copy.c index 2e029ebd2e54..ad48bfc25848 100644 --- a/tests/gem_render_copy.c +++ b/tests/gem_render_copy.c @@ -32,12 +32,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c index b32a4cbb7574..92c5bf6aaa32 100644 --- a/tests/gem_render_linear_blits.c +++ b/tests/gem_render_linear_blits.c @@ -37,12 +37,10 @@ #include "config.h" #endif -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c index 2456c2fb9b05..5233b2314816 100644 --- a/tests/gem_render_tiled_blits.c +++ b/tests/gem_render_tiled_blits.c @@ -33,12 +33,10 @@ * The goal is to simply ensure the basics work. */ -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_storedw_batches_loop.c b/tests/gem_storedw_batches_loop.c index 96b5a4dfbb58..85d6f6c076eb 100644 --- a/tests/gem_storedw_batches_loop.c +++ b/tests/gem_storedw_batches_loop.c @@ -83,7 +83,7 @@ store_dword_loop(int divider, unsigned flags) cmd_address_offset = j * 4; buf[j++] = target_bo->offset; } - assert(j > 0); + igt_assert(j > 0); buf[j++] = 0x42000000 + val; igt_assert(drm_intel_bo_references(cmd_bo, target_bo) == 0); diff --git a/tests/gem_stress.c b/tests/gem_stress.c index a994f7f9424f..3a94fb1aa5d5 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -49,12 +49,10 @@ * In short: designed for maximum evilness. */ -#include #include #include #include #include -#include #include #include #include diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c index 1c6aa7d1da18..074810490c55 100644 --- a/tests/gem_wait_render_timeout.c +++ b/tests/gem_wait_render_timeout.c @@ -27,12 +27,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/tests/igt_simulation.c b/tests/igt_simulation.c index b9c6241d12e4..f4007b80929e 100644 --- a/tests/igt_simulation.c +++ b/tests/igt_simulation.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "drmtest.h" #include "igt_core.h" diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 593bc772c327..4c1a5676a7a0 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -24,7 +24,6 @@ #include "config.h" #endif -#include #include #include #include @@ -193,7 +192,7 @@ static void create_fb_for_crtc(struct crtc_config *crtc, fb_id = kmstest_create_fb(drm_fd, crtc->mode.hdisplay, crtc->mode.vdisplay, bpp, depth, enable_tiling, fb_info); - assert(fb_id > 0); + igt_assert(fb_id > 0); } static void get_mode_for_crtc(struct crtc_config *crtc, @@ -239,7 +238,7 @@ static int get_encoder_idx(drmModeRes *resources, drmModeEncoder *encoder) for (i = 0; i < resources->count_encoders; i++) if (resources->encoders[i] == encoder->encoder_id) return i; - assert(0); + igt_assert(0); } static void get_crtc_config_str(struct crtc_config *crtc, char *buf, @@ -304,7 +303,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, crtc->cconfs = malloc(sizeof(*crtc->cconfs) * crtc->connector_count); - assert(crtc->cconfs); + igt_assert(crtc->cconfs); encoder_mask = 0; for (j = 0; j < crtc->connector_count; j++) { @@ -318,7 +317,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, igt_assert(connector->count_encoders == 1); encoder = drmModeGetEncoder(drm_fd, connector->encoders[0]); - assert(encoder); + igt_assert(encoder); config_valid &= !!(encoder->possible_crtcs & (1 << crtc->crtc_idx)); @@ -371,7 +370,7 @@ static uint32_t *get_connector_ids(struct crtc_config *crtc) int i; ids = malloc(sizeof(*ids) * crtc->connector_count); - assert(ids); + igt_assert(ids); for (i = 0; i < crtc->connector_count; i++) ids[i] = crtc->cconfs[i].connector->connector_id; @@ -502,7 +501,7 @@ static int get_one_connector(drmModeRes *resources, int connector_id, drmModeModeInfo mode; connector = drmModeGetConnector(drm_fd, connector_id); - assert(connector); + igt_assert(connector); cconf->connector = connector; cconf->connected = connector->connection == DRM_MODE_CONNECTED; @@ -543,7 +542,7 @@ static int get_connectors(drmModeRes *resources, int *connector_idxs, int connector_id; connector_idx = connector_idxs[i]; - assert(connector_idx < resources->count_connectors); + igt_assert(connector_idx < resources->count_connectors); connector_id = resources->connectors[connector_idx]; if (get_one_connector(resources, connector_id, &cconfs[i]) < 0) @@ -589,7 +588,7 @@ static void iterate_combinations(int n, int k, bool allow_repetitions, int v; if (!k) { - assert(set->count < ARRAY_SIZE(set->items)); + igt_assert(set->count < ARRAY_SIZE(set->items)); set->items[set->count++] = *comb; return; } @@ -608,7 +607,7 @@ static void get_combinations(int n, int k, bool allow_repetitions, { struct combination comb; - assert(k <= ARRAY_SIZE(set->items[0].elems)); + igt_assert(k <= ARRAY_SIZE(set->items[0].elems)); set->count = 0; iterate_combinations(n, k, allow_repetitions, 0, 0, &comb, set); } @@ -634,7 +633,7 @@ static void test_combinations(const struct test_config *tconf, int j; cconfs = malloc(sizeof(*cconfs) * connector_count); - assert(cconfs); + igt_assert(cconfs); connector_idxs = &connector_combs.items[i].elems[0]; ret = get_connectors(tconf->resources, connector_idxs, @@ -678,7 +677,7 @@ static int opt_handler(int opt, int opt_index) filter_test_id = atoi(optarg); break; default: - assert(0); + igt_assert(0); } return 0; @@ -723,7 +722,7 @@ int main(int argc, char **argv) igt_set_vt_graphics_mode(); drm_resources = drmModeGetResources(drm_fd); - assert(drm_resources); + igt_assert(drm_resources); } for (i = 0; i < ARRAY_SIZE(tests); i++) { diff --git a/tests/pm_rps.c b/tests/pm_rps.c index 2f321840edcd..038987c03b28 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -197,7 +197,7 @@ static void emit_store_dword_imm(uint32_t val) #define LOAD_HELPER_BO_SIZE (16*1024*1024) static void load_helper_set_load(enum load load) { - assert(lh.igt_proc.running); + igt_assert(lh.igt_proc.running); if (lh.load == load) return; diff --git a/tests/testdisplay.c b/tests/testdisplay.c index e667ab95e294..d0cd5123ab0c 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -504,7 +504,7 @@ static void stereo_fb_layout_from_mode(struct stereo_fb_layout *layout, break; } default: - assert(0); + igt_assert(0); } } @@ -520,7 +520,7 @@ static const char *stereo_mode_str(drmModeModeInfo *mode) case DRM_MODE_FLAG_3D_FRAME_PACKING: return "FP"; default: - assert(0); + igt_assert(0); } } diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c index 79e591043869..aed36c83b73b 100644 --- a/tools/intel_l3_parity.c +++ b/tools/intel_l3_parity.c @@ -28,6 +28,7 @@ #define _GNU_SOURCE #include #include +#include #include #include #include