All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH i-g-t 2/2] lib/tests: More igt_subtest_group checks
Date: Sat, 19 Mar 2016 12:15:59 +0100	[thread overview]
Message-ID: <1458386159-29415-2-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1458386159-29415-1-git-send-email-daniel.vetter@ffwll.ch>

... for some cases discussed with Chris on irc. We seem to get them all
right.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/tests/igt_subtest_group.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lib/tests/igt_subtest_group.c b/lib/tests/igt_subtest_group.c
index 2b17955c5ac8..c2364d799f36 100644
--- a/lib/tests/igt_subtest_group.c
+++ b/lib/tests/igt_subtest_group.c
@@ -28,6 +28,7 @@
 igt_main
 {
 	bool t1 = false;
+	int t2 = 0;
 
 	igt_subtest_group {
 		igt_fixture {
@@ -59,5 +60,24 @@ igt_main
 		}
 	}
 
+	igt_subtest_group {
+		igt_fixture {
+			assert(t2 == 0);
+			t2 = 1;
+		}
+
+		igt_subtest("run-again") {
+			assert(t2 == 1);
+			t2 = 2;
+		}
+
+		igt_fixture {
+			assert(t2 == 2);
+			t2 = 3;
+
+		}
+	}
+
 	assert(t1);
+	assert(t2 == 3);
 }
-- 
2.7.0

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

      reply	other threads:[~2016-03-19 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-19 11:15 [PATCH i-g-t 1/2] lib: Fix some doc warnings Daniel Vetter
2016-03-19 11:15 ` Daniel Vetter [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=1458386159-29415-2-git-send-email-daniel.vetter@ffwll.ch \
    --to=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.