From: Daniel Vetter Subject: [PATCH 0/7] drmtest framework support for retval handling Date: Mon, 12 Aug 2013 11:09:54 +0200 Message-ID: <1376298601-18641-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BFA2E5EA8 for ; Mon, 12 Aug 2013 02:10:10 -0700 (PDT) Received: by mail-ea0-f172.google.com with SMTP id r16so3336413ead.3 for ; Mon, 12 Aug 2013 02:10:09 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org Hi all, So I've grown fed-up with our add-hoc (and pretty much always buggy) return value tracking for testcases with subtests. Furthermore sprinkling testcases with tons of if (kernel_has_some_optional_feature) return 77; isn't really helping test case readability. So I've gone ahead and implement some magic stuff using setjmp/longjmp and a few macros. On top of that a few exemplary conversions of existing testcases. Comments highly welcome. Cheers, Daniel Daniel Vetter (7): tests: s/cacheing/caching lib/drmtest: Add drmtest_subtest_block macro lib/drmtest: skip/fail handling tests/gem_caching: convert to use drmtest retval infrastructure lib/drmtest: make signal process cleanup more robust tests: use drmtest_skip() in caching ioctl helpers tests: use drmtest_skip to check for rings demos/intel_sprite_on.c | 2 - lib/drmtest.c | 134 ++++++++++++--- lib/drmtest.h | 46 ++++- tests/.gitignore | 2 +- tests/Makefile.am | 6 +- tests/gem_bad_length.c | 2 - tests/gem_basic.c | 6 +- tests/gem_cacheing.c | 303 -------------------------------- tests/gem_caching.c | 305 +++++++++++++++++++++++++++++++++ tests/gem_cpu_concurrent_blit.c | 12 +- tests/gem_cs_tlb.c | 20 +-- tests/gem_ctx_bad_exec.c | 1 - tests/gem_dummy_reloc_loop.c | 18 +- tests/gem_exec_bad_domains.c | 10 +- tests/gem_exec_big.c | 1 - tests/gem_exec_faulting_reloc.c | 4 +- tests/gem_exec_lut_handle.c | 1 - tests/gem_exec_nop.c | 19 +- tests/gem_fence_thrash.c | 14 +- tests/gem_flink.c | 10 +- tests/gem_flink_race.c | 4 +- tests/gem_gtt_concurrent_blit.c | 12 +- tests/gem_linear_blits.c | 4 +- tests/gem_lut_handle.c | 1 - tests/gem_mmap_gtt.c | 14 +- tests/gem_partial_pwrite_pread.c | 21 +-- tests/gem_pread.c | 50 +++--- tests/gem_pread_after_blit.c | 25 +-- tests/gem_prw_concurrent_blit.c | 12 +- tests/gem_pwrite.c | 49 +++--- tests/gem_pwrite_pread.c | 194 ++++++++++----------- tests/gem_ringfill.c | 8 +- tests/gem_set_tiling_vs_blt.c | 6 +- tests/gem_suspend.c | 4 +- tests/gem_tiled_blits.c | 4 +- tests/gem_tiled_partial_pwrite_pread.c | 6 +- tests/gem_write_read_ring_switch.c | 15 +- tests/kms_flip.c | 4 +- tests/kms_render.c | 2 +- tests/prime_nv_api.c | 2 +- tests/prime_nv_pcopy.c | 17 +- tests/prime_nv_test.c | 2 +- tests/prime_self_import.c | 4 +- tests/testdisplay.c | 2 - 44 files changed, 749 insertions(+), 629 deletions(-) delete mode 100644 tests/gem_cacheing.c create mode 100644 tests/gem_caching.c -- 1.8.3.2