mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-19 20:33:01 +00:00
tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean up code while at it. To avoid gcc getting upset about unitialized variables just move them out of main as global data (where they always get initialized to 0) - gcc can't see through our igt_fixture and igt_subtest maze properly. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
+4
-3
@@ -75,13 +75,14 @@ test_create_fd_close(int fd)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
int fd;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int fd;
|
||||
|
||||
igt_subtest_init(argc, argv);
|
||||
|
||||
fd = drm_open_any();
|
||||
igt_fixture
|
||||
fd = drm_open_any();
|
||||
|
||||
igt_subtest("bad-close")
|
||||
test_bad_close(fd);
|
||||
|
||||
Reference in New Issue
Block a user