lib: fix symbol names in documentation comments
PATCH 1/3 lib: fix symbol names in documentation comments
Signed-off-by Thomas Wood <[email protected]>
--- lib/drmtest.c | 2 +- lib/igt_core.h | 2 +- lib/intel_batchbuffer.c | 4 ++-- lib/ioctl_wrappers.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)
lib/drmtest.c +1 -1
@@ -344,7 +344,7 @@ int drm_open_any_master(void) }/** -* drm_open_any: +* drm_open_any_render: * * Open an i915 drm render device node. *
lib/igt_core.h +1 -1
@@ -263,7 +263,7 @@ void igt_exit(void) __attribute__((noreturn));#define igt_fail_on (expr) igt_assert(!(expr))/** -* igt_assert_f: +* igt_fail_on_f: * @expr: condition to test * @...: format string and optional arguments *
lib/intel_batchbuffer.c +2 -2
@@ -86,7 +86,7 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch) }/** -* intel_batchbuffer_reset: +* intel_batchbuffer_alloc: * @bufmgr: libdrm buffer manager * @devid: pci device id of the drm device *
@@ -109,7 +109,7 @@ intel_batchbuffer_alloc(drm_intel_bufmgr *bufmgr, uint32_t devid) }/** -* intel_batchbuffer_reset: +* intel_batchbuffer_free: * @batch: batchbuffer object * * Releases all resource of the batchbuffer object @batch.
lib/ioctl_wrappers.c +2 -2
@@ -620,7 +620,7 @@ bool gem_uses_aliasing_ppgtt(int fd) }/** -* gem_uses_aliasing_ppgtt: +* gem_available_fences: * @fd: open i915 drm file descriptor * * Feature test macro to query the kernel for the number of available fences
@@ -811,7 +811,7 @@ uint64_t gem_aperture_size(int fd) }/** -* gem_aperture_size: +* gem_mappable_aperture_size: * @fd: open i915 drm file descriptor * * Feature test macro to query the kernel for the mappable gpu aperture size.
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 tests: use subtests in gem_tiled_swapping
Signed-off-by Thomas Wood <[email protected]>
--- tests/gem_tiled_swapping.c | 64 ++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 30 deletions(-)
tests/gem_tiled_swapping.c +34 -30
@@ -143,42 +143,46 @@ static void thread_fini(struct thread *t)free (t->idx_arr); } -igt_simple_main +igt_main {struct thread *threads;int fd, n, count, num_threads; - current_tiling_mode =I915_TILING_X ; - -intel_purge_vm_caches (); - - fd =drm_open_any (); -/* need slightly more than available memory */ - count =intel_get_total_ram_mb () +intel_get_total_swap_mb () /4 ; - bo_handles =calloc (count,sizeof (uint32_t )); -igt_assert (bo_handles); - - num_threads =gem_available_fences (fd); - threads =calloc (num_threads,sizeof (struct thread )); -igt_assert (threads); - -igt_log (IGT_LOG_INFO , -"Using %d 1MiB objects (available RAM: %ld/%ld, swap: %ld)\n" , - count, - (long )intel_get_avail_ram_mb (), - (long )intel_get_total_ram_mb (), - (long )intel_get_total_swap_mb ()); -intel_require_memory (count,1024 *1024 ,CHECK_RAM |CHECK_SWAP ); - -for (n =0 ; n < count; n++) { - bo_handles[n] =create_bo_and_fill (fd); -/* Not enough mmap address space possible. */ -igt_require (bo_handles[n]); + igt_fixture { + current_tiling_mode =I915_TILING_X ; + +intel_purge_vm_caches (); + + fd =drm_open_any (); +/* need slightly more than available memory */ + count =intel_get_total_ram_mb () +intel_get_total_swap_mb () /4 ; + bo_handles =calloc (count,sizeof (uint32_t )); +igt_assert (bo_handles); + + num_threads =gem_available_fences (fd); + threads =calloc (num_threads,sizeof (struct thread )); +igt_assert (threads); + +igt_log (IGT_LOG_INFO , +"Using %d 1MiB objects (available RAM: %ld/%ld, swap: %ld)\n" , + count, + (long )intel_get_avail_ram_mb (), + (long )intel_get_total_ram_mb (), + (long )intel_get_total_swap_mb ()); +intel_require_memory (count,1024 *1024 ,CHECK_RAM |CHECK_SWAP ); + +for (n =0 ; n < count; n++) { + bo_handles[n] =create_bo_and_fill (fd); +/* Not enough mmap address space possible. */ +igt_require (bo_handles[n]); + } } -thread_init (&threads[0 ], fd, count); -thread_run (&threads[0 ]); -thread_fini (&threads[0 ]); + igt_subtest("non-threaded") { +thread_init (&threads[0 ], fd, count); +thread_run (&threads[0 ]); +thread_fini (&threads[0 ]); + }/* Once more with threads */ igt_subtest("threaded") {
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 lib: ensure subtests are not added to simple tests
In reply to Thomas WoodSimple tests do not support subtests, so fail if igt_subtest is used in one.
Signed-off-by Thomas Wood <[email protected]>
--- lib/igt_core.c | 1 + lib/tests/.gitignore | 1 + lib/tests/Makefile.sources | 2 ++ lib/tests/igt_simple_test_subtests.c | 31 +++++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 lib/tests/igt_simple_test_subtests.c
lib/igt_core.c +1 -0
@@ -672,6 +672,7 @@ bool __igt_run_subtest(const char *subtest_name) {assert (!in_subtest);assert (!in_fixture); +assert (test_with_subtests);if (list_subtests) {printf ("%s\n" , subtest_name);
lib/tests/.gitignore +1 -0
@@ -5,4 +5,5 @@ igt_no_exit igt_no_exit_list_only igt_no_subtest igt_simulation +igt_simple_test_subtests igt_timeout
lib/tests/Makefile.sources +2 -0
@@ -5,6 +5,7 @@ check_PROGRAMS = \ igt_list_only \ igt_no_subtest \ igt_simulation \ + igt_simple_test_subtests \ igt_timeout \ $(NULL)
@@ -23,5 +24,6 @@ XFAIL_TESTS = \ igt_no_exit \ igt_no_exit_list_only \ igt_no_subtest \ + igt_simple_test_subtests \ igt_timeout \ $(NULL)
lib/tests/igt_simple_test_subtests.c new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Copyright © 2014 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. +*/ + +#include "igt_core.h" + +igt_simple_main +{ + igt_subtest("subtest") { +igt_info ("Invalid subtest.\n" ); + } +}
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx