From: Jani Nikula <jani.nikula@linux.intel.com>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 5/5] tests/flip_test: use subtest infrastructure
Date: Thu, 29 Nov 2012 13:30:25 +0200 [thread overview]
Message-ID: <87fw3sd4tq.fsf@intel.com> (raw)
In-Reply-To: <1354047233-23264-6-git-send-email-daniel.vetter@ffwll.ch>
On Tue, 27 Nov 2012, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> To make the testnames easier to handle in scripts, replace all
> spaces with dashes.
>
> The important part is to not print anything to stdout when enumerating
> subtests, so protect the timestamp test with the right check.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/Makefile.am | 2 +-
> tests/flip_test.c | 51 ++++++++++++++++++++++++++++-----------------------
> 2 files changed, 29 insertions(+), 24 deletions(-)
>
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index ff6e829..f4a3abb 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -13,6 +13,7 @@ NOUVEAU_TESTS = \
> endif
>
> TESTS_progs_M = \
> + flip_test \
> $(NULL)
>
> TESTS_progs = \
> @@ -81,7 +82,6 @@ TESTS_progs = \
> drm_vma_limiter_cached \
> sysfs_rc6_residency \
> sysfs_rps \
> - flip_test \
> gem_wait_render_timeout \
> gem_ctx_create \
> gem_ctx_bad_destroy \
> diff --git a/tests/flip_test.c b/tests/flip_test.c
> index 5214da9..5ad62d1 100644
> --- a/tests/flip_test.c
> +++ b/tests/flip_test.c
> @@ -969,50 +969,55 @@ int main(int argc, char **argv)
> int flags;
> const char *name;
> } tests[] = {
> - { 15, TEST_VBLANK | TEST_CHECK_TS, "wf-vblank" },
> + { 15, TEST_VBLANK | TEST_CHECK_TS, "wf_vblank" },
> { 15, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_CHECK_TS,
> - "blocking wf-vblank" },
> + "blocking-wf_vblank" },
The commit message says nothing about replacing dashes with
underscores. Seems to me it would be better to leave dashes as they are,
and replace spaces with underscores. Or replace all [^a-zA-Z0-9] with -.
BR,
Jani.
> { 5, TEST_VBLANK | TEST_VBLANK_ABSOLUTE,
> - "absolute wf-vblank" },
> + "absolute-wf_vblank" },
> { 5, TEST_VBLANK | TEST_VBLANK_BLOCK | TEST_VBLANK_ABSOLUTE,
> - "blocking absolute wf-vblank" },
> - { 30, TEST_VBLANK | TEST_DPMS | TEST_EINVAL, "wf-vblank vs dpms" },
> + "blocking-absolute-wf_vblank" },
> + { 30, TEST_VBLANK | TEST_DPMS | TEST_EINVAL, "wf_vblank-vs-dpms" },
> { 30, TEST_VBLANK | TEST_DPMS | TEST_WITH_DUMMY_LOAD,
> - "delayed wf-vblank vs dpms" },
> - { 30, TEST_VBLANK | TEST_MODESET | TEST_EINVAL, "wf-vblank vs modeset" },
> + "delayed-wf_vblank-vs-dpms" },
> + { 30, TEST_VBLANK | TEST_MODESET | TEST_EINVAL, "wf_vblank-vs-modeset" },
> { 30, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_LOAD,
> - "delayed wf-vblank vs modeset" },
> -
> - { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain flip" },
> - { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip vs dpms" },
> - { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed flip vs dpms" },
> - { 5, TEST_FLIP | TEST_PAN, "flip vs panning" },
> - { 30, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_LOAD, "delayed flip vs panning" },
> - { 30, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip vs modeset" },
> - { 30, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_LOAD, "delayed flip vs modeset" },
> + "delayed-wf_vblank-vs-modeset" },
> +
> + { 15, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip" },
> + { 30, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
> + { 30, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-dpms" },
> + { 5, TEST_FLIP | TEST_PAN, "flip-vs-panning" },
> + { 30, TEST_FLIP | TEST_PAN | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-panning" },
> + { 30, TEST_FLIP | TEST_MODESET | TEST_EINVAL, "flip-vs-modeset" },
> + { 30, TEST_FLIP | TEST_MODESET | TEST_WITH_DUMMY_LOAD, "delayed-flip-vs-modeset" },
> { 5, TEST_FLIP | TEST_VBLANK_EXPIRED_SEQ,
> - "flip vs. expired vblank" },
> + "flip-vs-expired-vblank" },
>
> { 15, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_ABSOLUTE |
> - TEST_CHECK_TS, "flip vs absolute wf-vblank" },
> + TEST_CHECK_TS, "flip-vs-absolute-wf_vblank" },
> { 15, TEST_FLIP | TEST_VBLANK | TEST_CHECK_TS,
> - "flip vs wf-vblank" },
> + "flip-vs-wf_vblank" },
> { 15, TEST_FLIP | TEST_VBLANK | TEST_VBLANK_BLOCK |
> - TEST_CHECK_TS, "flip vs blocking wf-vblank" },
> + TEST_CHECK_TS, "flip-vs-blocking-wf-vblank" },
> };
> int i;
>
> + drmtest_subtest_init(argc, argv);
> +
> drm_fd = drm_open_any();
>
> - get_timestamp_format();
> + if (!drmtest_only_list_subtests())
> + get_timestamp_format();
>
> bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
> devid = intel_get_drm_devid(drm_fd);
> batch = intel_batchbuffer_alloc(bufmgr, devid);
>
> for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
> - printf("running testcase: %s\n", tests[i].name);
> - run_test(tests[i].duration, tests[i].flags, tests[i].name);
> + if (drmtest_run_subtest(tests[i].name)) {
> + printf("running testcase: %s\n", tests[i].name);
> + run_test(tests[i].duration, tests[i].flags, tests[i].name);
> + }
> }
>
> close(drm_fd);
> --
> 1.7.11.7
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2012-11-29 11:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 20:13 [PATCH 0/5] igt subtests support and piglit integration Daniel Vetter
2012-11-27 20:13 ` [PATCH 1/5] tests: infrastructure for piglit runner Daniel Vetter
2012-11-27 20:13 ` [PATCH 2/5] tests: remove ZZ_check_dmesg from runner Daniel Vetter
2012-11-27 20:13 ` [PATCH 3/5] tests: dont polute stderr if the test succeeds/skips Daniel Vetter
2012-11-27 20:13 ` [PATCH 4/5] lib/drmtest: subtest infrastructure Daniel Vetter
2012-11-27 20:13 ` [PATCH 5/5] tests/flip_test: use " Daniel Vetter
2012-11-29 11:30 ` Jani Nikula [this message]
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=87fw3sd4tq.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.