Skip to contentSkip to conversation

tests: Add blob-property test

PATCH In review Daniel Stone 3 participants 5 messages Sep 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 tests: Add blob-property test

Exercises the new blob-creation ioctl, testing lifetimes and behaviour of user-created blobs, as well as exercising all the invariant conditions we guarantee from modes exposed as blob properties.

v2: Renamed to core_prop_blob, skip test if blob not available.
v3: No changes.

---
 tests/.gitignore       |   1 +
 tests/Makefile.sources |   1 +
 tests/core_prop_blob.c | 237 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 239 insertions(+)
 create mode 100644 tests/core_prop_blob.c
tests/.gitignore +1 -0
index dc8bb53..beda511 100644
@@ -3,6 +3,7 @@ core_get_client_auth
 core_getclient
 core_getstats
 core_getversion
+core_prop_blob
 drm_auth
 drm_import_export
 drm_read
tests/Makefile.sources +1 -0
index 2e2e088..0f0e481 100644
@@ -76,6 +76,7 @@ TESTS_progs_M = \
 	kms_pipe_b_c_ivb \
 	kms_pipe_crc_basic \
 	kms_plane \
+	kms_prop_blob \
 	kms_psr_sink_crc \
 	kms_render \
 	kms_rotation_crc \
tests/core_prop_blob.c new file +237 -0

237 lines not on this page · raw message

Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Hi,

Quoted 6 lines · Daniel Stone

Exercises the new blob-creation ioctl, testing lifetimes and behaviour of user-created blobs, as well as exercising all the invariant conditions we guarantee from modes exposed as blob properties.

v2: Renamed to core_prop_blob, skip test if blob not available.
v3: No changes.

Sorry for spamming this; apparently either myself or fd.o are having some mail issues.

In the meantime, the basic atomic tests can be found at:
https://git.collabora.com/cgit/user/daniels/intel-gpu-tools.git/commit/?h=wip/atomic-blob&id=11bf34a2a

Sorry about the noise!

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 6 lines · Daniel Stone

Hi,

Quoted 3 lines · Daniel Stone

Exercises the new blob-creation ioctl, testing lifetimes and behaviour of user-created blobs, as well as exercising all the invariant conditions we guarantee from modes exposed as blob properties.

Would be good to skip on older kernels that don't have this feature. The required libdrm version also needs updating (or adding local defines of the new ioctl).

The use of igt_assert_eq/neq rather than plain igt_assert would produce some better error messages by printing the expected and actual values, but it looks like the meaning of the return values being tested isn't consistent (i.e. sometimes errno values, sometimes not).

Quoted 9 lines
Quoted 3 lines

v2: Renamed to core_prop_blob, skip test if blob not available.
v3: No changes.

Sorry for spamming this; apparently either myself or fd.o are having some mail issues.

In the meantime, the basic atomic tests can be found at:
https://git.collabora.com/cgit/user/daniels/intel-gpu-tools.git/commit/?h=wip/atomic-blob&id=11bf34a2a

I guess that was going to be patch 2/2?

Quoted 9 lines

Sorry about the noise!

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Hi Thomas,

Quoted 7 lines · Thomas Wood
Quoted 4 lines · Daniel Stone
Quoted 3 lines · Daniel Stone

Exercises the new blob-creation ioctl, testing lifetimes and behaviour of user-created blobs, as well as exercising all the invariant conditions we guarantee from modes exposed as blob properties.

Would be good to skip on older kernels that don't have this feature.

That should already happen, but I'll double-check, if I can dig up a suitably old kernel.

Quoted 2 lines

The required libdrm version also needs updating (or adding local defines of the new ioctl).

Yes, good catch.

Quoted 4 lines

The use of igt_assert_eq/neq rather than plain igt_assert would produce some better error messages by printing the expected and actual values, but it looks like the meaning of the return values being tested isn't consistent (i.e. sometimes errno values, sometimes not).

OK, thanks - I'll go back and check these out. Is there a preferred style, or is it just consistency?

Quoted 7 lines
Quoted 5 lines

Sorry for spamming this; apparently either myself or fd.o are having some mail issues.

In the meantime, the basic atomic tests can be found at:
https://git.collabora.com/cgit/user/daniels/intel-gpu-tools.git/commit/?h=wip/atomic-blob&id=11bf34a2a

I guess that was going to be patch 2/2?

Still is, hopefully. :)

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 5 lines · Daniel Stone

Hi Thomas,

Quoted 2 lines · Thomas Wood
Quoted 1 line · Daniel Stone

On 10 September 2015 at 06:57, Daniel Stone <[email protected]> wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines

Exercises the new blob-creation ioctl, testing lifetimes and behaviour of user-created blobs, as well as exercising all the invariant conditions we guarantee from modes exposed as blob properties.

Would be good to skip on older kernels that don't have this feature.

That should already happen, but I'll double-check, if I can dig up a suitably old kernel.

Although there is an igt_require on the create_prop return value, do_ioctl will fail the test if the ioctl call failed. There is also an additional call to igt_require on the same value in test_core, which should probably be an igt_assert.

Also, should test_basic be a subtest of its own, rather than part of the test fixture?

Quoted 6 lines
Quoted 3 lines

The required libdrm version also needs updating (or adding local defines of the new ioctl).

Yes, good catch.

Quoted 7 lines
Quoted 4 lines

The use of igt_assert_eq/neq rather than plain igt_assert would produce some better error messages by printing the expected and actual values, but it looks like the meaning of the return values being tested isn't consistent (i.e. sometimes errno values, sometimes not).

OK, thanks - I'll go back and check these out. Is there a preferred style, or is it just consistency?

igt_assert_eq/neq will print the expected value and the actual value being tested, which is only useful if the meaning of the value is consistent (e.g. an errno value). This is simply to help identify any obvious problems quicker without having to re-run the application with a debugger attached.

Quoted 9 lines
Quoted 8 lines
Quoted 6 lines

Sorry for spamming this; apparently either myself or fd.o are having some mail issues.

In the meantime, the basic atomic tests can be found at:
https://git.collabora.com/cgit/user/daniels/intel-gpu-tools.git/commit/?h=wip/atomic-blob&id=11bf34a2a

I guess that was going to be patch 2/2?

Quoted 8 lines

Still is, hopefully. :)

Cheers,
Daniel
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx