* [PATCH igt] igt: Remove gem_ctx_basic
@ 2017-11-27 23:19 Chris Wilson
2017-11-27 23:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-28 8:08 ` [PATCH igt] " Joonas Lahtinen
0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-11-27 23:19 UTC (permalink / raw)
To: intel-gfx
This is just a very plain stress test that doesn't do any verification,
and is entirely duplicated by the other context tests. The test
currently leaks objects from every thread on every pass, while fixing it
would be trivial, it also is pointless as the test is of little merit.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/Makefile.am | 2 -
tests/Makefile.sources | 1 -
tests/gem_ctx_basic.c | 168 ----------------------------------
tests/intel-ci/fast-feedback.testlist | 1 -
tests/meson.build | 1 -
5 files changed, 173 deletions(-)
delete mode 100644 tests/gem_ctx_basic.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 82489b60..4754698c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -104,8 +104,6 @@ drm_import_export_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
drm_import_export_LDADD = $(LDADD) -lpthread
gem_close_race_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_close_race_LDADD = $(LDADD) -lpthread
-gem_ctx_basic_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
-gem_ctx_basic_LDADD = $(LDADD) -lpthread
gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_ctx_thrash_LDADD = $(LDADD) -lpthread
gem_exec_parallel_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 17d54a6e..0847fd57 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -56,7 +56,6 @@ TESTS_progs = \
gem_cs_tlb \
gem_ctx_bad_destroy \
gem_ctx_bad_exec \
- gem_ctx_basic \
gem_ctx_create \
gem_ctx_exec \
gem_ctx_isolation \
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c
deleted file mode 100644
index c18a9efa..00000000
--- a/tests/gem_ctx_basic.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright © 2011 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:
- * Ben Widawsky <ben@bwidawsk.net>
- *
- */
-
-/*
- * This test is useful for finding memory and refcount leaks.
- */
-
-#include "igt.h"
-#include <pthread.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
-
-IGT_TEST_DESCRIPTION("Basic test for memory and refcount leaks.");
-
-/* options */
-int num_contexts = 10;
-int uncontexted = 0; /* test only context create/destroy */
-int multiple_fds = 1;
-int iter = 10000;
-
-/* globals */
-pthread_t *threads;
-int devid;
-int fd;
-
-static void init_buffer(drm_intel_bufmgr *bufmgr,
- struct igt_buf *buf,
- uint32_t size)
-{
- buf->bo = drm_intel_bo_alloc(bufmgr, "", size, 4096);
- buf->size = size;
- igt_assert(buf->bo);
- buf->tiling = I915_TILING_NONE;
- buf->stride = 4096;
-}
-
-static void *work(void *arg)
-{
- struct intel_batchbuffer *batch;
- igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
- drm_intel_context *context;
- drm_intel_bufmgr *bufmgr;
- int td_fd;
- int i;
-
- if (multiple_fds)
- td_fd = fd = drm_open_driver_render(DRIVER_INTEL);
- else
- td_fd = fd;
-
- igt_assert_lte(0, td_fd);
-
- bufmgr = drm_intel_bufmgr_gem_init(td_fd, 4096);
- batch = intel_batchbuffer_alloc(bufmgr, devid);
- context = drm_intel_gem_context_create(bufmgr);
- igt_require(context);
-
- for (i = 0; i < iter; i++) {
- struct igt_buf src, dst;
-
- init_buffer(bufmgr, &src, 4096);
- init_buffer(bufmgr, &dst, 4096);
-
-
- if (uncontexted) {
- igt_assert(rendercopy);
- rendercopy(batch, NULL, &src, 0, 0, 0, 0, &dst, 0, 0);
- } else {
- int ret;
- ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer);
- igt_assert_eq(ret, 0);
- intel_batchbuffer_flush_with_context(batch, context);
- }
- }
-
- drm_intel_gem_context_destroy(context);
- intel_batchbuffer_free(batch);
- drm_intel_bufmgr_destroy(bufmgr);
-
- if (multiple_fds)
- close(td_fd);
-
- pthread_exit(NULL);
-}
-
-static int opt_handler(int opt, int opt_index, void *data)
-{
- switch (opt) {
- case 'i':
- iter = atoi(optarg);
- break;
- case 'c':
- num_contexts = atoi(optarg);
- break;
- case 'm':
- multiple_fds = 1;
- break;
- case 'u':
- uncontexted = 1;
- break;
- }
-
- return 0;
-}
-
-int main(int argc, char *argv[])
-{
- int i;
-
- igt_simple_init_parse_opts(&argc, argv, "i:c:n:mu", NULL, NULL,
- opt_handler, NULL);
-
- fd = drm_open_driver_render(DRIVER_INTEL);
- devid = intel_get_drm_devid(fd);
-
- if (igt_run_in_simulation()) {
- num_contexts = 2;
- iter = 4;
- }
-
- threads = calloc(num_contexts, sizeof(*threads));
-
- for (i = 0; i < num_contexts; i++)
- pthread_create(&threads[i], NULL, work, &i);
-
- for (i = 0; i < num_contexts; i++) {
- void *retval;
- igt_assert(pthread_join(threads[i], &retval) == 0);
- }
-
- free(threads);
- close(fd);
-
- igt_exit();
-}
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 422678cd..7845b4ae 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -15,7 +15,6 @@ igt@gem_close_race@basic-process
igt@gem_close_race@basic-threads
igt@gem_cpu_reloc@basic
igt@gem_cs_tlb@basic-default
-igt@gem_ctx_basic
igt@gem_ctx_create@basic
igt@gem_ctx_create@basic-files
igt@gem_ctx_exec@basic
diff --git a/tests/meson.build b/tests/meson.build
index dd2abd79..59ccd9a6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -33,7 +33,6 @@ test_progs = [
'gem_cs_tlb',
'gem_ctx_bad_destroy',
'gem_ctx_bad_exec',
- 'gem_ctx_basic',
'gem_ctx_create',
'gem_ctx_exec',
'gem_ctx_param',
--
2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✗ Fi.CI.BAT: failure for igt: Remove gem_ctx_basic
2017-11-27 23:19 [PATCH igt] igt: Remove gem_ctx_basic Chris Wilson
@ 2017-11-27 23:21 ` Patchwork
2017-11-28 8:08 ` [PATCH igt] " Joonas Lahtinen
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-11-27 23:21 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: igt: Remove gem_ctx_basic
URL : https://patchwork.freedesktop.org/series/34500/
State : failure
== Summary ==
Series 34500 revision 1 was fully merged or fully failed: no git log
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH igt] igt: Remove gem_ctx_basic
2017-11-27 23:19 [PATCH igt] igt: Remove gem_ctx_basic Chris Wilson
2017-11-27 23:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-11-28 8:08 ` Joonas Lahtinen
1 sibling, 0 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2017-11-28 8:08 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Mon, 2017-11-27 at 23:19 +0000, Chris Wilson wrote:
> This is just a very plain stress test that doesn't do any verification,
> and is entirely duplicated by the other context tests. The test
> currently leaks objects from every thread on every pass, while fixing it
> would be trivial, it also is pointless as the test is of little merit.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH igt] igt: Remove gem_ctx_basic
@ 2017-11-28 11:14 Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-11-28 11:14 UTC (permalink / raw)
To: intel-gfx
This is just a very plain stress test that doesn't do any verification,
and is entirely duplicated by the other context tests. The test
currently leaks objects from every thread on every pass (which is
triggering an oom on smaller machines), while fixing it would be trivial,
it also is pointless as the test is of little merit.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
tests/Makefile.am | 2 -
tests/Makefile.sources | 1 -
tests/gem_ctx_basic.c | 168 ----------------------------------
tests/intel-ci/fast-feedback.testlist | 1 -
tests/meson.build | 1 -
5 files changed, 173 deletions(-)
delete mode 100644 tests/gem_ctx_basic.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a790d8f9..1b9a7b0a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -104,8 +104,6 @@ drm_import_export_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
drm_import_export_LDADD = $(LDADD) -lpthread
gem_close_race_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_close_race_LDADD = $(LDADD) -lpthread
-gem_ctx_basic_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
-gem_ctx_basic_LDADD = $(LDADD) -lpthread
gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_ctx_thrash_LDADD = $(LDADD) -lpthread
gem_exec_parallel_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index b4d4831e..34ca71a0 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -55,7 +55,6 @@ TESTS_progs = \
gem_cs_tlb \
gem_ctx_bad_destroy \
gem_ctx_bad_exec \
- gem_ctx_basic \
gem_ctx_create \
gem_ctx_exec \
gem_ctx_param \
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c
deleted file mode 100644
index c18a9efa..00000000
--- a/tests/gem_ctx_basic.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright © 2011 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:
- * Ben Widawsky <ben@bwidawsk.net>
- *
- */
-
-/*
- * This test is useful for finding memory and refcount leaks.
- */
-
-#include "igt.h"
-#include <pthread.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include "drm.h"
-#include "intel_bufmgr.h"
-
-IGT_TEST_DESCRIPTION("Basic test for memory and refcount leaks.");
-
-/* options */
-int num_contexts = 10;
-int uncontexted = 0; /* test only context create/destroy */
-int multiple_fds = 1;
-int iter = 10000;
-
-/* globals */
-pthread_t *threads;
-int devid;
-int fd;
-
-static void init_buffer(drm_intel_bufmgr *bufmgr,
- struct igt_buf *buf,
- uint32_t size)
-{
- buf->bo = drm_intel_bo_alloc(bufmgr, "", size, 4096);
- buf->size = size;
- igt_assert(buf->bo);
- buf->tiling = I915_TILING_NONE;
- buf->stride = 4096;
-}
-
-static void *work(void *arg)
-{
- struct intel_batchbuffer *batch;
- igt_render_copyfunc_t rendercopy = igt_get_render_copyfunc(devid);
- drm_intel_context *context;
- drm_intel_bufmgr *bufmgr;
- int td_fd;
- int i;
-
- if (multiple_fds)
- td_fd = fd = drm_open_driver_render(DRIVER_INTEL);
- else
- td_fd = fd;
-
- igt_assert_lte(0, td_fd);
-
- bufmgr = drm_intel_bufmgr_gem_init(td_fd, 4096);
- batch = intel_batchbuffer_alloc(bufmgr, devid);
- context = drm_intel_gem_context_create(bufmgr);
- igt_require(context);
-
- for (i = 0; i < iter; i++) {
- struct igt_buf src, dst;
-
- init_buffer(bufmgr, &src, 4096);
- init_buffer(bufmgr, &dst, 4096);
-
-
- if (uncontexted) {
- igt_assert(rendercopy);
- rendercopy(batch, NULL, &src, 0, 0, 0, 0, &dst, 0, 0);
- } else {
- int ret;
- ret = drm_intel_bo_subdata(batch->bo, 0, 4096, batch->buffer);
- igt_assert_eq(ret, 0);
- intel_batchbuffer_flush_with_context(batch, context);
- }
- }
-
- drm_intel_gem_context_destroy(context);
- intel_batchbuffer_free(batch);
- drm_intel_bufmgr_destroy(bufmgr);
-
- if (multiple_fds)
- close(td_fd);
-
- pthread_exit(NULL);
-}
-
-static int opt_handler(int opt, int opt_index, void *data)
-{
- switch (opt) {
- case 'i':
- iter = atoi(optarg);
- break;
- case 'c':
- num_contexts = atoi(optarg);
- break;
- case 'm':
- multiple_fds = 1;
- break;
- case 'u':
- uncontexted = 1;
- break;
- }
-
- return 0;
-}
-
-int main(int argc, char *argv[])
-{
- int i;
-
- igt_simple_init_parse_opts(&argc, argv, "i:c:n:mu", NULL, NULL,
- opt_handler, NULL);
-
- fd = drm_open_driver_render(DRIVER_INTEL);
- devid = intel_get_drm_devid(fd);
-
- if (igt_run_in_simulation()) {
- num_contexts = 2;
- iter = 4;
- }
-
- threads = calloc(num_contexts, sizeof(*threads));
-
- for (i = 0; i < num_contexts; i++)
- pthread_create(&threads[i], NULL, work, &i);
-
- for (i = 0; i < num_contexts; i++) {
- void *retval;
- igt_assert(pthread_join(threads[i], &retval) == 0);
- }
-
- free(threads);
- close(fd);
-
- igt_exit();
-}
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index f74da743..f71a16bc 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -15,7 +15,6 @@ igt@gem_close_race@basic-process
igt@gem_close_race@basic-threads
igt@gem_cpu_reloc@basic
igt@gem_cs_tlb@basic-default
-igt@gem_ctx_basic
igt@gem_ctx_create@basic
igt@gem_ctx_create@basic-files
igt@gem_ctx_exec@basic
diff --git a/tests/meson.build b/tests/meson.build
index dd2abd79..59ccd9a6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -33,7 +33,6 @@ test_progs = [
'gem_cs_tlb',
'gem_ctx_bad_destroy',
'gem_ctx_bad_exec',
- 'gem_ctx_basic',
'gem_ctx_create',
'gem_ctx_exec',
'gem_ctx_param',
--
2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-28 11:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-27 23:19 [PATCH igt] igt: Remove gem_ctx_basic Chris Wilson
2017-11-27 23:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-28 8:08 ` [PATCH igt] " Joonas Lahtinen
-- strict thread matches above, loose matches on Subject: below --
2017-11-28 11:14 Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.