lib: add more self-tests around the igt_exit checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-11-01 18:29:33 +01:00
parent e14596a6d0
commit 0b51de8dd0
4 changed files with 88 additions and 0 deletions

2
tests/.gitignore vendored
View File

@ -98,6 +98,8 @@ getstats
getversion getversion
igt_fork_helper igt_fork_helper
igt_list_only igt_list_only
igt_no_exit
igt_no_exit_list_only
kms_addfb kms_addfb
kms_cursor_crc kms_cursor_crc
kms_flip kms_flip

View File

@ -159,6 +159,8 @@ kernel_tests = \
$(NULL) $(NULL)
TESTS_testsuite = \ TESTS_testsuite = \
igt_no_exit \
igt_no_exit_list_only \
igt_fork_helper \ igt_fork_helper \
igt_list_only \ igt_list_only \
$(NULL) $(NULL)
@ -167,6 +169,11 @@ TESTS = \
$(TESTS_testsuite) \ $(TESTS_testsuite) \
$(NULL) $(NULL)
XFAIL_TESTS = \
igt_no_exit \
igt_no_exit_list_only \
$(NULL)
list-single-tests: list-single-tests:
@echo TESTLIST @echo TESTLIST
@echo ${single_kernel_tests} @echo ${single_kernel_tests}

39
tests/igt_no_exit.c Normal file
View File

@ -0,0 +1,39 @@
/*
* Copyright © 2013 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Daniel Vetter <daniel.vetter@ffwll.ch>
*
*/
#include "drmtest.h"
int main(int argc, char **argv)
{
char prog[] = "igt_no_exit";
char *fake_argv[] = {prog};
igt_subtest_init(1, fake_argv);
igt_subtest("A")
;
}

View File

@ -0,0 +1,40 @@
/*
* Copyright © 2013 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* Authors:
* Daniel Vetter <daniel.vetter@ffwll.ch>
*
*/
#include "drmtest.h"
int main(int argc, char **argv)
{
char prog[] = "igt_list_only";
char arg[] = "--list-subtests";
char *fake_argv[] = {prog, arg};
igt_subtest_init(2, fake_argv);
igt_subtest("A")
;
}