Skip to contentSkip to conversation

tests/kms_flip_tiling: Fixes

PATCH In review Daniel Vetter 2 participants 2 messages Apr 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_flip_tiling: Fixes

- Wrap up testcase correctly into the magic code block.
- Put local variables out of the longjmp danger zone.

Cc Ander Conselvan de Oliveira <[email protected]>
---
 tests/kms_flip_tiling.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
tests/kms_flip_tiling.c +5 -6
index e70609d52e78..ca20ad96bc35 100644
@@ -119,11 +119,10 @@ test_flip_changes_tiling(data_t *data, igt_output_t *output)
 }
 
 static data_t data;
+igt_output_t *output;
 
 igt_main
 {
-	igt_output_t *output;
-
 	igt_skip_on_simulation();
 
 	igt_fixture {
@@ -135,10 +134,10 @@ igt_main
 		igt_display_init(&data.display, data.drm_fd);
 	}
 
-	igt_subtest_f("flip-changes-tiling");
-
-	for_each_connected_output(&data.display, output)
-		test_flip_changes_tiling(&data, output);
+	igt_subtest_f("flip-changes-tiling") {
+		for_each_connected_output(&data.display, output)
+			test_flip_changes_tiling(&data, output);
+	}
 
 	igt_fixture {
 		igt_display_fini(&data.display);
Signature · 1 line
1.8.5.2
#1 lore raw
Quoted 5 lines · Daniel Vetter

- Wrap up testcase correctly into the magic code block.
- Put local variables out of the longjmp danger zone.

Cc Ander Conselvan de Oliveira <[email protected]>

Ander, quick one for process: Please submit igt patches to the mailing list so that they don't get lost in bugzilla.

And thanks a lot for the testcase.
-Daniel

Quoted 39 lines
---
 tests/kms_flip_tiling.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
tests/kms_flip_tiling.c +5 -6
index e70609d52e78..ca20ad96bc35 100644
@@ -119,11 +119,10 @@ test_flip_changes_tiling(data_t *data, igt_output_t *output)
 }
 
 static data_t data;
+igt_output_t *output;
 
 igt_main
 {
-	igt_output_t *output;
-
 	igt_skip_on_simulation();
 
 	igt_fixture {
@@ -135,10 +134,10 @@ igt_main
 		igt_display_init(&data.display, data.drm_fd);
 	}
 
-	igt_subtest_f("flip-changes-tiling");
-
-	for_each_connected_output(&data.display, output)
-		test_flip_changes_tiling(&data, output);
+	igt_subtest_f("flip-changes-tiling") {
+		for_each_connected_output(&data.display, output)
+			test_flip_changes_tiling(&data, output);
+	}
 
 	igt_fixture {
 		igt_display_fini(&data.display);
Signature · 1 line
1.8.5.2
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch