[Intel-gfx] [PATCH i-g-t] tests/gem_flink_basic: Add documentation for subtests
Vinay Belgaumkar
vinay.belgaumkar at intel.com
Tue Aug 29 21:25:19 UTC 2017
Added the missing IGT_TEST_DESCRIPTION and some subtest
descriptions.
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
---
tests/gem_flink_basic.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/tests/gem_flink_basic.c b/tests/gem_flink_basic.c
index 26ae7d6..8761e0d 100644
--- a/tests/gem_flink_basic.c
+++ b/tests/gem_flink_basic.c
@@ -36,6 +36,8 @@
#include <sys/ioctl.h>
#include "drm.h"
+IGT_TEST_DESCRIPTION("Tests for flink - a way to export a gem object by name");
+
static void
test_flink(int fd)
{
@@ -155,14 +157,48 @@ igt_main
igt_fixture
fd = drm_open_driver(DRIVER_INTEL);
+ /* basic:
+ This subtest creates a gem object, and then creates
+ a flink. It tests that we can gain access to the gem
+ object using the flink name.
+
+ Test fails if flink creation/open fails.
+ **/
igt_subtest("basic")
test_flink(fd);
+
+ /* double-flink:
+ This test checks if it is possible to create 2 flinks
+ for the same gem object.
+
+ Test fails if 2 flink objects cannot be created.
+ **/
igt_subtest("double-flink")
test_double_flink(fd);
+
+ /* bad-flink:
+ Use an invalid flink handle.
+
+ DRM_IOCTL_GEM_FLINK ioctl call should return failure.
+ **/
igt_subtest("bad-flink")
test_bad_flink(fd);
+
+ /* bad-open:
+ Try to use an invalid flink name.
+
+ DRM_IOCTL_GEM_FLINK ioctl call should return failure.
+ **/
igt_subtest("bad-open")
test_bad_open(fd);
+
+ /* flink-lifetime:
+ Check if a flink name can be used even after the drm
+ fd used to create it is closed.
+
+ Flink name should remain valid until the gem object
+ it points to has not been freed.
+ **/
igt_subtest("flink-lifetime")
test_flink_lifetime(fd);
}
--
1.9.1
More information about the Intel-gfx
mailing list