Move watermark code from tests to tools
PATCH 1/2 Move watermark code from tests to tools
They're now igt tests, and so if you blindly run lib/igt.cocci with spatch on tests/*c they get mangled. Move them away, but still keep them as noinst targets.
--- tests/.gitignore | 2 - tests/Makefile.sources | 2 - tests/ddi_compute_wrpll.c | 626 --------------------------------------------- tests/skl_ddb_allocation.c | 424 ------------------------------ tools/.gitignore | 2 + tools/Makefile.sources | 5 + tools/ddi_compute_wrpll.c | 626 +++++++++++++++++++++++++++++++++++++++++++++ tools/skl_ddb_allocation.c | 424 ++++++++++++++++++++++++++++++ 8 files changed, 1057 insertions(+), 1054 deletions(-) delete mode 100644 tests/ddi_compute_wrpll.c delete mode 100644 tests/skl_ddb_allocation.c create mode 100644 tools/ddi_compute_wrpll.c create mode 100644 tools/skl_ddb_allocation.c
tests/.gitignore +0 -2
@@ -3,7 +3,6 @@ core_get_client_auth core_getclient core_getstats core_getversion -ddi_compute_wrpll drm_import_export drm_vma_limiter drm_vma_limiter_cached
@@ -149,6 +148,5 @@ prime_nv_test prime_self_import prime_udl single-tests.txt -skl_ddb_allocation template testdisplay
tests/Makefile.sources +0 -2
@@ -1,8 +1,6 @@ noinst_PROGRAMS = \ gem_alive \ gem_stress \ - ddi_compute_wrpll \ - skl_ddb_allocation \ $(TESTS_progs) \ $(TESTS_progs_M) \ $(HANG) \
tests/ddi_compute_wrpll.c deleted +0 -626
626 lines not on this page · raw message
tests/skl_ddb_allocation.c deleted +0 -424
424 lines not on this page · raw message
tools/.gitignore +2 -0
@@ -1,4 +1,5 @@ # Please keep sorted alphabetically +ddi_compute_wrpll forcewaked intel_audio_dump intel_backlight
@@ -35,3 +36,4 @@ intel_reg_write intel_stepping intel_vga_read intel_vga_write +skl_ddb_allocation
tools/Makefile.sources +5 -0
@@ -1,3 +1,8 @@ +noinst_PROGRAMS = \ + ddi_compute_wrpll \ + skl_ddb_allocation \ + $(NULL) + bin_PROGRAMS = \ intel_audio_dump \ intel_backlight \
tools/ddi_compute_wrpll.c new file +626 -0
626 lines not on this page · raw message
tools/skl_ddb_allocation.c new file +424 -0
424 lines not on this page · raw message
Signature · 6 lines
2.1.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 Move library selftests to lib/tests
Again they're not really igt testcases so are in the way of running spatch unconditionally. Move them someplace else.
--- configure.ac | 1 + lib/Makefile.am | 2 + lib/tests/.gitignore | 7 ++ lib/tests/Makefile.am | 18 +++++ lib/tests/Makefile.sources | 29 +++++++ lib/tests/igt_command_line.sh | 61 ++++++++++++++ lib/tests/igt_fork_helper.c | 37 +++++++++ lib/tests/igt_list_only.c | 42 ++++++++++ lib/tests/igt_no_exit.c | 39 +++++++++ lib/tests/igt_no_exit_list_only.c | 40 ++++++++++ lib/tests/igt_no_subtest.c | 38 +++++++++ lib/tests/igt_simulation.c | 164 ++++++++++++++++++++++++++++++++++++++ tests/.gitignore | 6 -- tests/Makefile.am | 4 +- tests/Makefile.sources | 18 ----- tests/igt_command_line.sh | 61 -------------- tests/igt_fork_helper.c | 37 --------- tests/igt_list_only.c | 42 ---------- tests/igt_no_exit.c | 39 --------- tests/igt_no_exit_list_only.c | 40 ---------- tests/igt_no_subtest.c | 38 --------- tests/igt_simulation.c | 164 -------------------------------------- 22 files changed, 480 insertions(+), 447 deletions(-) create mode 100644 lib/tests/.gitignore create mode 100644 lib/tests/Makefile.am create mode 100644 lib/tests/Makefile.sources create mode 100755 lib/tests/igt_command_line.sh create mode 100644 lib/tests/igt_fork_helper.c create mode 100644 lib/tests/igt_list_only.c create mode 100644 lib/tests/igt_no_exit.c create mode 100644 lib/tests/igt_no_exit_list_only.c create mode 100644 lib/tests/igt_no_subtest.c create mode 100644 lib/tests/igt_simulation.c delete mode 100755 tests/igt_command_line.sh delete mode 100644 tests/igt_fork_helper.c delete mode 100644 tests/igt_list_only.c delete mode 100644 tests/igt_no_exit.c delete mode 100644 tests/igt_no_exit_list_only.c delete mode 100644 tests/igt_no_subtest.c delete mode 100644 tests/igt_simulation.c
configure.ac +1 -0
@@ -216,6 +216,7 @@ AC_CONFIG_FILES([ docs/reference/intel-gpu-tools/Makefile docs/reference/intel-gpu-tools/version.xml lib/Makefile + lib/tests/Makefile man/Makefile scripts/Makefile tests/Makefile
lib/Makefile.am +2 -0
@@ -1,6 +1,8 @@ IGT_LIB_PATH := $(builddir) GPU_TOOLS_PATH := $(top_srcdir) +SUBDIRS = tests + include Makefile.sources noinst_LTLIBRARIES = libintel_tools.la
lib/tests/.gitignore new file +7 -0
@@ -0,0 +1,7 @@ +# Please keep sorted alphabetically +igt_fork_helper +igt_list_only +igt_no_exit +igt_no_exit_list_only +igt_no_subtest +igt_simulation
lib/tests/Makefile.am new file +18 -0
@@ -0,0 +1,18 @@ +include Makefile.sources + +EXTRA_PROGRAMS = $(TESTS_testsuite) +EXTRA_DIST = $(TESTS_scripts) + +CLEANFILES = $(EXTRA_PROGRAMS) + +AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \ + -I$(srcdir)/../.. \ + -I$(srcdir)/.. \ + -include "$(srcdir)/../../lib/check-ndebug.h" \ + -DIGT_DATADIR=\""$(abs_srcdir)"\" \ + $(NULL) + +LDADD = ../libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) + +LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) +AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS)
lib/tests/Makefile.sources new file +29 -0
@@ -0,0 +1,29 @@ +noinst_PROGRAMS = \ + $(TESTS_testsuite) \ + $(NULL) + +TESTS_testsuite = \ + igt_no_exit \ + igt_no_exit_list_only \ + igt_fork_helper \ + igt_list_only \ + igt_no_subtest \ + igt_simulation \ + $(NULL) + +TESTS_testsuite_scripts = \ + igt_command_line.sh \ + $(NULL) + +TESTS = \ + $(TESTS_testsuite) \ + $(TESTS_testsuite_scripts) \ + $(NULL) + +# Test that exercise specific asserts in the test framework library and are +# hence expected to fail. +XFAIL_TESTS = \ + igt_no_exit \ + igt_no_exit_list_only \ + igt_no_subtest \ + $(NULL)
lib/tests/igt_command_line.sh new file +61 -0
61 lines not on this page · raw message
lib/tests/igt_fork_helper.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* 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 <[email protected]> +* +*/ + +#include "drmtest.h" +#include "igt_aux.h" + +int main (int argc,char **argv) +{ +for (int i =0 ; i <1000 ; i++) { +igt_fork_signal_helper (); +igt_stop_signal_helper (); + } +}
lib/tests/igt_list_only.c new file +42 -0
42 lines not on this page · raw message
lib/tests/igt_no_exit.c new file +39 -0
@@ -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 <[email protected]> +* +*/ + +#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" ) + ; +}
lib/tests/igt_no_exit_list_only.c new file +40 -0
@@ -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 <[email protected]> +* +*/ + +#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" ) + ; +}
lib/tests/igt_no_subtest.c new file +38 -0
@@ -0,0 +1,38 @@ +/* +* 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 <[email protected]> +* +*/ + +#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_exit (); +}
lib/tests/igt_simulation.c new file +164 -0
164 lines not on this page · raw message
tests/.gitignore +0 -6
@@ -112,12 +112,6 @@ gen3_render_mixed_blits gen3_render_tiledx_blits gen3_render_tiledy_blits gen7_forcewake_mt -igt_fork_helper -igt_list_only -igt_no_exit -igt_no_exit_list_only -igt_no_subtest -igt_simulation kms_3d kms_addfb kms_cursor_crc
tests/Makefile.am +2 -2
@@ -27,8 +27,8 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@ -EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite) -EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files) +EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) +EXTRA_DIST = $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files) CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt
tests/Makefile.sources +0 -18
@@ -191,24 +191,6 @@ kernel_tests = \ $(multi_kernel_tests) \ $(NULL) -TESTS_testsuite = \ - igt_no_exit \ - igt_no_exit_list_only \ - igt_fork_helper \ - igt_list_only \ - igt_no_subtest \ - igt_simulation \ - $(NULL) - -TESTS_testsuite_scripts = \ - igt_command_line.sh \ - $(NULL) - -TESTS = \ - $(TESTS_testsuite) \ - $(TESTS_testsuite_scripts) \ - $(NULL) - # Test that exercise specific asserts in the test framework library and are # hence expected to fail. XFAIL_TESTS = \
tests/igt_command_line.sh deleted +0 -61
61 lines not on this page · raw message
tests/igt_fork_helper.c deleted +0 -37
@@ -1,37 +0,0 @@ -/* -* 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 <[email protected]> -* -*/ - -#include "drmtest.h" -#include "igt_aux.h" - -int main (int argc,char **argv) -{ -for (int i =0 ; i <1000 ; i++) { -igt_fork_signal_helper (); -igt_stop_signal_helper (); - } -}
tests/igt_list_only.c deleted +0 -42
42 lines not on this page · raw message
tests/igt_no_exit.c deleted +0 -39
@@ -1,39 +0,0 @@ -/* -* 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 <[email protected]> -* -*/ - -#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" ) - ; -}
tests/igt_no_exit_list_only.c deleted +0 -40
@@ -1,40 +0,0 @@ -/* -* 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 <[email protected]> -* -*/ - -#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" ) - ; -}
tests/igt_no_subtest.c deleted +0 -38
@@ -1,38 +0,0 @@ -/* -* 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 <[email protected]> -* -*/ - -#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_exit (); -}
tests/igt_simulation.c deleted +0 -164
164 lines not on this page · raw message
Signature · 6 lines
2.1.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx