Skip to contentSkip to conversation

tests/dumb_buffer: Tests for creation and map

PATCH New Ramalingam C 2 participants 4 messages Nov 29, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 tests/dumb_buffer: Tests for creation and map

Dumb buffer creation and mapping are covered with test cases.

v2:
Made as a generic test for dumb buffer creation [Chris]
v3:
dumb_map is used [Chris]
Added two tests for map.

---
 tests/Makefile.am       |   2 +
 tests/Makefile.sources  |   1 +
 tests/gem_dumb_buffer.c | 317 ++++++++++++++++++++++++++++++++++++++++
 tests/meson.build       |   9 ++
 4 files changed, 329 insertions(+)
 create mode 100644 tests/gem_dumb_buffer.c
tests/Makefile.am +2 -0
index 7fe60b78e258..a9b05416177d 100644
@@ -97,6 +97,8 @@ gem_ctx_freq_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
 gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
 gem_ctx_thrash_LDADD = $(LDADD) -lpthread
 gem_ctx_sseu_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
+gem_dumb_buffer_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
+gem_dumb_buffer_LDADD = $(LDADD) -lpthread -latomic
 gem_exec_balancer_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la
 gem_exec_capture_LDADD = $(LDADD) -lz
 gem_exec_parallel_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
tests/Makefile.sources +1 -0
index bdd912d2d5a8..df9756dd703e 100644
@@ -99,6 +99,7 @@ TESTS_progs = \
 	tools_test \
 	vgem_basic \
 	vgem_slow \
+	gem_dumb_buffer \
 	$(NULL)
 
 TESTS_progs += gem_bad_reloc
tests/gem_dumb_buffer.c new file +317 -0

317 lines not on this page · raw message

tests/meson.build +9 -0
index 59c6961f1026..f043f4aff95b 100644
@@ -97,6 +97,7 @@ test_progs = [
 	'vc4_wait_seqno',
 	'vgem_basic',
 	'vgem_slow',
+	'gem_dumb_buffer'
 ]
 
 i915_progs = [
@@ -297,6 +298,14 @@ test_executables += executable('gem_ctx_freq',
 	   install : true)
 test_list += 'gem_ctx_freq'
 
+# test_executables += executable('gem_dumb_buffer',
+#	   join_paths('i915', 'gem_dumb_buffer.c'),
+#	   dependencies : test_deps + [ libatomic ],
+#	   install_dir : libexecdir,
+#	   install_rpath : libexecdir_rpathdir,
+#	   install : true)
+#test_list += 'gem_dumb_buffer'
+
 test_executables += executable('gem_ctx_sseu',
 	   join_paths('i915', 'gem_ctx_sseu.c'),
 	   dependencies : test_deps + [ lib_igt_perf ],
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw

PATCH v3 2/2 lib/kmstest_dumb_map_buffer: docs update

Added the need for munmapping the returned pointer, after its usage.

---
 lib/igt_kms.c | 1 +
 1 file changed, 1 insertion(+)
lib/igt_kms.c +1 -0
index e9b80b9bcb81..9242065ed36a 100644
@@ -837,6 +837,7 @@ uint32_t kmstest_dumb_create(int fd, int width, int height, int bpp,
  * @size: Length of the mapping, must be greater than 0
  * @prot: Describes the memory protection of the mapping
  * Returns: A pointer representing the start of the virtual mapping
+ * Caller of this function should munmap the pointer returned, after its usage.
  */
 void *kmstest_dumb_map_buffer(int fd, uint32_t handle, uint64_t size,
 			      unsigned prot)
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#2 lore raw

[igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,v3,1/2] tests/dumb_buffer: Tests for creation and map

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] tests/dumb_buffer: Tests for creation and map
URL : https://patchwork.freedesktop.org/series/70203/
State : warning

== Summary ==

Did not get list of undocumented tests for this run, something is wrong!

Other than that, pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/84009 for the overview.

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/1038966):
FAILED: tests/gem_dumb_buffer
/usr/bin/mips-linux-gnu-gcc -o tests/gem_dumb_buffer 'tests/59830eb@@gem_dumb_buffer@exe/gem_dumb_buffer.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group lib/libigt.so.0 /usr/lib/mips-linux-gnu/libcairo.so /usr/lib/mips-linux-gnu/libglib-2.0.so /usr/lib/mips-linux-gnu/libdrm.so /usr/lib/mips-linux-gnu/libdw.so /usr/lib/mips-linux-gnu/libelf.so /usr/lib/mips-linux-gnu/libkmod.so /usr/lib/mips-linux-gnu/libprocps.so /lib/mips-linux-gnu/libudev.so -lm /usr/lib/mips-linux-gnu/libpciaccess.so /usr/lib/mips-linux-gnu/libpixman-1.so -lrt -lz /usr/lib/mips-linux-gnu/libunwind.so /usr/lib/mips-linux-gnu/libgsl.so /usr/lib/mips-linux-gnu/libgslcblas.so -lm /usr/lib/mips-linux-gnu/libasound.so /usr/lib/mips-linux-gnu/libdrm_nouveau.so -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/../lib' -Wl,-rpath-link,/builds/gfx-ci/igt-ci-tags/build/lib tests/59830eb@@gem_dumb_buffer@exe/gem_dumb_buffer.c.o: In function `get_npages':
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:194: undefined reference to `__atomic_load_8'
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:194: undefined reference to `__atomic_load_8'
tests/59830eb@@gem_dumb_buffer@exe/gem_dumb_buffer.c.o: In function `atomic_compare_swap_u64':
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:186: undefined reference to `__atomic_compare_exchange_8'
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:186: undefined reference to `__atomic_compare_exchange_8'
tests/59830eb@@gem_dumb_buffer@exe/gem_dumb_buffer.c.o: In function `thread_clear':
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:255: undefined reference to `__atomic_fetch_add_8'
/builds/gfx-ci/igt-ci-tags/build/../tests/gem_dumb_buffer.c:255: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
section_end:1575027178:build_script
section_start:1575027178:after_script
section_end:1575027179:after_script
section_start:1575027179:upload_artifacts_on_failure
section_end:1575027181:upload_artifacts_on_failure
ERROR: Job failed: exit code 1


== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/84009
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/2] tests/dumb_buffer: Tests for creation and map

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v3,1/2] tests/dumb_buffer: Tests for creation and map
URL : https://patchwork.freedesktop.org/series/70203/
State : success

== Summary ==

CI Bug Log - changes from IGT_5316 -> IGTPW_3784
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/index.html

Known issues
------------

Here are the changes found in IGTPW_3784 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_gttfill@basic:
- fi-tgl-y: [PASS][1] -> [INCOMPLETE][2] ([fdo#111593])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-tgl-y/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-tgl-y/igt@[email protected]

* igt@i915_selftest@live_blt:
- fi-hsw-peppy: [PASS][3] -> [DMESG-FAIL][4] ([fdo#112147])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-hsw-peppy/igt@i915_selftest@live_blt.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-hsw-peppy/igt@i915_selftest@live_blt.html

* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [PASS][5] -> [FAIL][6] ([fdo#109483] / [fdo#109635 ]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][7] ([fdo#108511]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-skl-6770hq/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-skl-6770hq/igt@[email protected]

* igt@i915_selftest@live_gt_heartbeat:
- fi-skl-6600u: [DMESG-FAIL][9] ([fdo#112405]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-skl-6600u/igt@i915_selftest@live_gt_heartbeat.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-skl-6600u/igt@i915_selftest@live_gt_heartbeat.html

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][11] ([fdo#102614]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-hsw-peppy/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-hsw-peppy/igt@[email protected]

#### Warnings ####

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-x1275: [DMESG-WARN][13] ([fdo#103558] / [fdo#105602] / [fdo#105763] / [fdo#107139]) -> [DMESG-WARN][14] ([fdo#103558] / [fdo#105602] / [fdo#107139])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-kbl-x1275/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-kbl-x1275/igt@[email protected]

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-x1275: [DMESG-WARN][15] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [SKIP][16] ([fdo#109271])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-kbl-x1275/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-kbl-x1275/igt@[email protected]

* igt@kms_busy@basic-flip-pipe-a:
- fi-kbl-x1275: [DMESG-WARN][17] ([fdo#103558] / [fdo#105602] / [fdo#105763]) -> [DMESG-WARN][18] ([fdo#103558] / [fdo#105602]) +9 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-kbl-x1275/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-kbl-x1275/igt@[email protected]

* igt@kms_busy@basic-flip-pipe-b:
- fi-kbl-x1275: [DMESG-WARN][19] ([fdo#103558] / [fdo#105602]) -> [DMESG-WARN][20] ([fdo#103558] / [fdo#105602] / [fdo#105763]) +6 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5316/fi-kbl-x1275/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/fi-kbl-x1275/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
[fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593
[fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747
[fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147
[fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298
[fdo#112405]: https://bugs.freedesktop.org/show_bug.cgi?id=112405

Participating hosts (51 -> 46)
------------------------------

Additional (1): fi-cfl-guc
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5316 -> IGTPW_3784

CI-20190529: 20190529
CI_DRM_7440: 7b08e6efdddfcde8ea60a96d5a818af032b52b4d @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3784: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/index.html
IGT_5316: f38b398103fea0423b7bf133bbe5868fde99623c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

+igt@gem_dumb_buffer@create-clear
+igt@gem_dumb_buffer@create-invalid-nonaligned
+igt@gem_dumb_buffer@create-valid-dumb
+igt@gem_dumb_buffer@create-valid-nonaligned
+igt@gem_dumb_buffer@invalid-bpp
+igt@gem_dumb_buffer@map-invalid-size
+igt@gem_dumb_buffer@map-valid

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3784/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev