tests: Sprinkle missing igt_exit() where needed.
PATCH 1/1 tests: Sprinkle missing igt_exit() where needed.
From: Daniel Vetter <[email protected]>
Yay for breaking piles of tests.
This regression has been introduced with
commit 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce
Author: Tim Gore <[email protected]> Date: Wed Oct 1 13:25:20 2014 +0100
lib/igt_core.c: disable lowmemorykiller during tests
--- tests/gem_ctx_basic.c | 2 +- tests/gem_exec_blt.c | 2 +- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 2 +- tests/gem_ppgtt.c | 2 -- tests/gem_render_copy.c | 2 +- tests/gem_render_copy_redux.c | 2 -- tests/gem_render_linear_blits.c | 2 +- tests/gem_render_tiled_blits.c | 2 +- tests/gem_seqno_wrap.c | 7 ++----- tests/gem_stress.c | 2 +- tests/gem_userptr_blits.c | 2 -- tests/gen3_mixed_blits.c | 2 +- tests/gen3_render_linear_blits.c | 2 +- tests/gen3_render_mixed_blits.c | 2 +- tests/gen3_render_tiledx_blits.c | 2 +- tests/gen3_render_tiledy_blits.c | 2 +- tests/testdisplay.c | 4 +++- 18 files changed, 18 insertions(+), 25 deletions(-)
tests/gem_ctx_basic.c +1 -1
@@ -166,5 +166,5 @@ int main(int argc, char *argv[])free (threads);close (fd); -return 0 ; +igt_exit (); }
tests/gem_exec_blt.c +1 -1
@@ -270,5 +270,5 @@ int main(int argc, char **argv) }else run (OBJECT_SIZE ); -return 0 ; +igt_exit (); }
tests/gem_gtt_speed.c +1 -1
@@ -329,5 +329,5 @@ int main(int argc, char **argv)gem_close (fd, handle);close (fd); -return 0 ; +igt_exit (); }
tests/gem_hang.c +1 -1
@@ -93,5 +93,5 @@ int main(int argc, char **argv)close (fd); -return 0 ; +igt_exit (); }
tests/gem_ppgtt.c +0 -2
@@ -230,6 +230,4 @@ int main(int argc, char **argv) }igt_exit (); - -return 0 ; }
tests/gem_render_copy.c +1 -1
@@ -186,5 +186,5 @@ int main(int argc, char **argv)scratch_buf_check (&data, &dst,WIDTH -10 ,HEIGHT -10 ,SRC_COLOR ); } -return 0 ; +igt_exit (); }
tests/gem_render_copy_redux.c +0 -2
@@ -241,6 +241,4 @@ int main(int argc, char **argv) }igt_exit (); - -return 0 ; }
tests/gem_render_linear_blits.c +1 -1
@@ -200,5 +200,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, bo[i]->handle, start_val[i]); -return 0 ; +igt_exit (); }
tests/gem_render_tiled_blits.c +1 -1
@@ -211,5 +211,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (batch, &buf[i], start_val[i]); -return 0 ; +igt_exit (); }
tests/gem_seqno_wrap.c +2 -5
@@ -527,10 +527,7 @@ int main(int argc, char **argv) options.dontwrap ? "tests" : "wraps", wcount); } -if (options.rounds == wcount) { -igt_debug ("done %d wraps successfully\n" , wcount); -return 0 ; - } +igt_assert (options.rounds == wcount); -return r; +igt_exit (); }
tests/gem_stress.c +1 -1
@@ -914,5 +914,5 @@ int main(int argc, char **argv)igt_stop_signal_helper (); -return 0 ; +igt_exit (); }
tests/gem_userptr_blits.c +0 -2
@@ -1443,6 +1443,4 @@ int main(int argc, char **argv)test_access_control (fd);igt_exit (); - -return 0 ; }
tests/gen3_mixed_blits.c +1 -1
@@ -533,5 +533,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }
tests/gen3_render_linear_blits.c +1 -1
@@ -393,5 +393,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, handle[i], start_val[i]); -return 0 ; +igt_exit (); }
tests/gen3_render_mixed_blits.c +1 -1
@@ -421,5 +421,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }
tests/gen3_render_tiledx_blits.c +1 -1
@@ -400,5 +400,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, handle[i], start_val[i]); -return 0 ; +igt_exit (); }
tests/gen3_render_tiledy_blits.c +1 -1
@@ -407,5 +407,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }
tests/testdisplay.c +3 -1
@@ -786,5 +786,7 @@ out_mainloop: out_close:close (drm_fd); -return ret; +igt_assert (ret); + +igt_exit (); }
Signature · 1 line
1.9.3
Quoted 9 lines
-----Original Message-----
From: root [mailto:[email protected]]
Sent: Thursday, October 02, 2014 10:36 AM
To: Intel Graphics Development
Cc: Daniel Vetter; Gore, Tim; Vetter, Daniel
Subject: [PATCH] tests: Sprinkle missingigt_exit()where needed.
Quoted 6 lines
From: Daniel Vetter <[email protected]>
Yay for breaking piles of tests.
This regression has been introduced with
Oops yes, this was my mistake. Forgot about the tests that use the igt init function but then just use return. Patch looks sensible, especially as this brings the single tests more into line with the multi-tests. I am very much in favour of this.
Tim
Quoted 243 lines
commit
5782eca1e19e85a04ad402fa4094aa1b5f9c53ceAuthor: Tim Gore <[email protected]> Date: Wed Oct 1 13:25:20 2014 +0100
lib/igt_core.c: disable lowmemorykiller during testsCc Tim Gore <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- tests/gem_ctx_basic.c | 2 +- tests/gem_exec_blt.c | 2 +- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 2 +- tests/gem_ppgtt.c | 2 -- tests/gem_render_copy.c | 2 +- tests/gem_render_copy_redux.c | 2 -- tests/gem_render_linear_blits.c | 2 +- tests/gem_render_tiled_blits.c | 2 +- tests/gem_seqno_wrap.c | 7 ++----- tests/gem_stress.c | 2 +- tests/gem_userptr_blits.c | 2 -- tests/gen3_mixed_blits.c | 2 +- tests/gen3_render_linear_blits.c | 2 +- tests/gen3_render_mixed_blits.c | 2 +- tests/gen3_render_tiledx_blits.c | 2 +- tests/gen3_render_tiledy_blits.c | 2 +- tests/testdisplay.c | 4 +++- 18 files changed, 18 insertions(+), 25 deletions(-)tests/gem_ctx_basic.c index renamed from tests/gem_ctx_basic.c +0
-0
a0bec602a911..b8b01c03e122100644tests/gem_ctx_basic.c +1
-1@@ -166,5 +166,5 @@ int main(int argc, char *argv[])free (threads);close (fd); -return 0 ; +igt_exit (); }tests/gem_exec_blt.c index renamed from tests/gem_exec_blt.c +0
-0
db997b335197..301c9397c590100644tests/gem_exec_blt.c +1
-1@@ -270,5 +270,5 @@ int main(int argc, char **argv) }else run (OBJECT_SIZE ); -return 0 ; +igt_exit (); }tests/gem_gtt_speed.c index renamed from tests/gem_gtt_speed.c +0
-0
5125078d36e8..c8581035653d100644tests/gem_gtt_speed.c +1
-1@@ -329,5 +329,5 @@ int main(int argc, char **argv)gem_close (fd, handle);close (fd); -return 0 ; +igt_exit (); }tests/gem_hang.c index renamed from tests/gem_hang.c +0
-0
7a7c8acbd84a..8767615c83ea100644tests/gem_hang.c +1
-1@@ -93,5 +93,5 @@ int main(int argc, char **argv)close (fd); -return 0 ; +igt_exit (); }tests/gem_ppgtt.c index renamed from tests/gem_ppgtt.c +0
-0
8c560f269601..0ee4f5b2a31e100644tests/gem_ppgtt.c +0
-2@@ -230,6 +230,4 @@ int main(int argc, char **argv) }igt_exit (); - -return 0 ; }tests/gem_render_copy.c index renamed from tests/gem_render_copy.c +0
-0
6ff0c776e5e4..094816c92143100644tests/gem_render_copy.c +1
-1@@ -186,5 +186,5 @@ int main(int argc, char **argv)scratch_buf_check (&data, &dst,WIDTH -10 ,HEIGHT -10 ,SRC_COLOR ); } -return 0 ; +igt_exit ();}
(quoted diff) +0
-0
b/tests/gem_render_copy_redux.cindexcb48aa73e6c3..6fc82df9a858100644tests/gem_render_copy_redux.c +0
-2@@ -241,6 +241,4 @@ int main(int argc, char **argv) }igt_exit (); - -return 0 ; }(quoted diff) +0
-0
b/tests/gem_render_linear_blits.cindex28fd8c8c482a..60ba83162d40100644tests/gem_render_linear_blits.c +1
-1@@ -200,5 +200,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, bo[i]->handle, start_val[i]); -return 0 ; +igt_exit (); }tests/gem_render_tiled_blits.c +1
-1@@ -211,5 +211,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (batch, &buf[i], start_val[i]); -return 0 ; +igt_exit (); }tests/gem_seqno_wrap.c index renamed from tests/gem_seqno_wrap.c +0
-0
e8528ec68575..6772d1e1436f100644tests/gem_seqno_wrap.c +2
-5@@ -527,10 +527,7 @@ int main(int argc, char **argv) options.dontwrap ? "tests" : "wraps", wcount); } -if (options.rounds == wcount) { -igt_debug ("done %d wraps successfully\n" , wcount); -return 0 ; - } +igt_assert (options.rounds == wcount); -return r; +igt_exit (); }tests/gem_stress.c index renamed from tests/gem_stress.c +0
-0
8d62b0357565..ab2cd0eb4656100644tests/gem_stress.c +1
-1@@ -914,5 +914,5 @@ int main(int argc, char **argv)igt_stop_signal_helper (); -return 0 ; +igt_exit (); }tests/gem_userptr_blits.c index renamed from tests/gem_userptr_blits.c +0
-0
638b74c29c24..a729f3191dae100644tests/gem_userptr_blits.c +0
-2@@ -1443,6 +1443,4 @@ int main(int argc, char **argv)test_access_control (fd);igt_exit (); - -return 0 ; }tests/gen3_mixed_blits.c index renamed from tests/gen3_mixed_blits.c +0
-0
33eea746cb4b..2d41cb4e2a88100644tests/gen3_mixed_blits.c +1
-1@@ -533,5 +533,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }tests/gen3_render_linear_blits.c +1
-1@@ -393,5 +393,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, handle[i], start_val[i]); -return 0 ; +igt_exit (); }(quoted diff) +0
-0
b/tests/gen3_render_mixed_blits.cindex1fe323c49ad7..bdfd66f6883e100644tests/gen3_render_mixed_blits.c +1
-1@@ -421,5 +421,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }tests/gen3_render_tiledx_blits.c +1
-1@@ -400,5 +400,5 @@ int main(int argc, char **argv)for (i =0 ; i < count; i++)check_bo (fd, handle[i], start_val[i]); -return 0 ; +igt_exit (); }tests/gen3_render_tiledy_blits.c +1
-1@@ -407,5 +407,5 @@ int main(int argc, char **argv)check_bo (fd, handle[i], start_val[i]);igt_info ("done\n" ); -return 0 ; +igt_exit (); }tests/testdisplay.c index renamed from tests/testdisplay.c +0
-0
a3cba44eb938..04e41db8e01a100644tests/testdisplay.c +3
-2@@ -786,5 +786,7 @@ out_mainloop: out_close:close (drm_fd); -return ret; +igt_assert (ret); + +igt_exit (); } --1.9.3