summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/tests/igt_subtest_group.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tests/igt_subtest_group.c b/lib/tests/igt_subtest_group.c
index 7783d021..973a30e4 100644
--- a/lib/tests/igt_subtest_group.c
+++ b/lib/tests/igt_subtest_group.c
@@ -28,8 +28,13 @@
igt_main
{
- bool t1 = false;
- int t2 = 0;
+ /*
+ * local variables have to be volatile here otherwise they end up being
+ * undefined when modified in igt_subtest, fixture, etc. because of
+ * longjmps
+ */
+ volatile bool t1 = false;
+ volatile int t2 = 0;
igt_subtest_group {
igt_fixture {