Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>
---
 tests/Makefile.am       |  6 ++---
 tests/NAMING-CONVENTION |  2 ++
 tests/core_getclient.c  | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
 tests/core_getstats.c   | 50 ++++++++++++++++++++++++++++++++++++++++
 tests/core_getversion.c | 49 +++++++++++++++++++++++++++++++++++++++
 tests/getclient.c       | 61 -------------------------------------------------
 tests/getstats.c        | 50 ----------------------------------------
 tests/getversion.c      | 49 ---------------------------------------
 8 files changed, 165 insertions(+), 163 deletions(-)
 create mode 100644 tests/core_getclient.c
 create mode 100644 tests/core_getstats.c
 create mode 100644 tests/core_getversion.c
 delete mode 100644 tests/getclient.c
 delete mode 100644 tests/getstats.c
 delete mode 100644 tests/getversion.c

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 807a67c09a45..a9bd8b2a3d90 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -63,6 +63,9 @@ TESTS_progs_M = \
        $(NULL)
 
 TESTS_progs = \
+       core_getclient \
+       core_getstats \
+       core_getversion \
        drm_get_client_auth \
        drm_vma_limiter \
        drm_vma_limiter_cached \
@@ -116,9 +119,6 @@ TESTS_progs = \
        gen3_render_mixed_blits \
        gen3_render_tiledx_blits \
        gen3_render_tiledy_blits \
-       getclient \
-       getstats \
-       getversion \
        prime_udl \
        pm_rc6_residency \
        pm_rps \
diff --git a/tests/NAMING-CONVENTION b/tests/NAMING-CONVENTION
index f57033c0a6cc..f08e2828022a 100644
--- a/tests/NAMING-CONVENTION
+++ b/tests/NAMING-CONVENTION
@@ -7,6 +7,8 @@ naming scheme for tests and subtests.
 Test Prefixes
 -------------
 
+core_: Test for core drm ioctls and behaviour.
+
 kms_: Used for modesetting tests.
 
 drm_: Tests for libdrm behaviour, currently just testing the buffer cache
diff --git a/tests/core_getclient.c b/tests/core_getclient.c
new file mode 100644
index 000000000000..dcb7b326820d
--- /dev/null
+++ b/tests/core_getclient.c
@@ -0,0 +1,61 @@
+/*
+ * Copyright © 2007 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:
+ *    Eric Anholt <e...@anholt.net>
+ *
+ */
+
+#include <limits.h>
+#include <sys/ioctl.h>
+#include "drmtest.h"
+
+/**
+ * Checks DRM_IOCTL_GET_CLIENT.
+ */
+int main(int argc, char **argv)
+{
+       int fd, ret;
+       drm_client_t client;
+
+       fd = drm_open_any();
+
+       /* Look for client index 0.  This should exist whether we're operating
+        * on an otherwise unused drm device, or the X Server is running on
+        * the device.
+        */
+       client.idx = 0;
+       ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client);
+       igt_assert(ret == 0);
+
+       /* Look for some absurd client index and make sure it's invalid.
+        * The DRM drivers currently always return data, so the user has
+        * no real way to detect when the list has terminated.  That's bad,
+        * and this test is XFAIL as a result.
+        */
+       client.idx = 0x7fffffff;
+       ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client);
+       igt_assert(ret == -1 && errno == EINVAL);
+
+       close(fd);
+       return 0;
+}
diff --git a/tests/core_getstats.c b/tests/core_getstats.c
new file mode 100644
index 000000000000..7975257d74da
--- /dev/null
+++ b/tests/core_getstats.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright © 2007 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:
+ *    Eric Anholt <e...@anholt.net>
+ *
+ */
+
+#include <limits.h>
+#include <sys/ioctl.h>
+#include "drmtest.h"
+
+/**
+ * Checks DRM_IOCTL_GET_STATS.
+ *
+ * I don't care too much about the actual contents, just that the kernel
+ * doesn't crash.
+ */
+int main(int argc, char **argv)
+{
+       int fd, ret;
+       drm_stats_t stats;
+
+       fd = drm_open_any();
+
+       ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
+       igt_assert(ret == 0);
+
+       close(fd);
+       return 0;
+}
diff --git a/tests/core_getversion.c b/tests/core_getversion.c
new file mode 100644
index 000000000000..d6da2ad6e8a8
--- /dev/null
+++ b/tests/core_getversion.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright © 2007 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:
+ *    Eric Anholt <e...@anholt.net>
+ *
+ */
+
+#include <string.h>
+#include <sys/ioctl.h>
+#include "drmtest.h"
+
+/**
+ * Checks DRM_IOCTL_GET_VERSION and libdrm's drmGetVersion() interface to it.
+ */
+int main(int argc, char **argv)
+{
+       int fd;
+       drmVersionPtr v;
+
+       fd = drm_open_any();
+       v = drmGetVersion(fd);
+       igt_assert(strlen(v->name) != 0);
+       igt_assert(strlen(v->date) != 0);
+       igt_assert(strlen(v->desc) != 0);
+       igt_assert(v->version_major >= 1);
+       drmFree(v);
+       close(fd);
+       return 0;
+}
diff --git a/tests/getclient.c b/tests/getclient.c
deleted file mode 100644
index dcb7b326820d..000000000000
--- a/tests/getclient.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright © 2007 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:
- *    Eric Anholt <e...@anholt.net>
- *
- */
-
-#include <limits.h>
-#include <sys/ioctl.h>
-#include "drmtest.h"
-
-/**
- * Checks DRM_IOCTL_GET_CLIENT.
- */
-int main(int argc, char **argv)
-{
-       int fd, ret;
-       drm_client_t client;
-
-       fd = drm_open_any();
-
-       /* Look for client index 0.  This should exist whether we're operating
-        * on an otherwise unused drm device, or the X Server is running on
-        * the device.
-        */
-       client.idx = 0;
-       ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client);
-       igt_assert(ret == 0);
-
-       /* Look for some absurd client index and make sure it's invalid.
-        * The DRM drivers currently always return data, so the user has
-        * no real way to detect when the list has terminated.  That's bad,
-        * and this test is XFAIL as a result.
-        */
-       client.idx = 0x7fffffff;
-       ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client);
-       igt_assert(ret == -1 && errno == EINVAL);
-
-       close(fd);
-       return 0;
-}
diff --git a/tests/getstats.c b/tests/getstats.c
deleted file mode 100644
index 7975257d74da..000000000000
--- a/tests/getstats.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright © 2007 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:
- *    Eric Anholt <e...@anholt.net>
- *
- */
-
-#include <limits.h>
-#include <sys/ioctl.h>
-#include "drmtest.h"
-
-/**
- * Checks DRM_IOCTL_GET_STATS.
- *
- * I don't care too much about the actual contents, just that the kernel
- * doesn't crash.
- */
-int main(int argc, char **argv)
-{
-       int fd, ret;
-       drm_stats_t stats;
-
-       fd = drm_open_any();
-
-       ret = ioctl(fd, DRM_IOCTL_GET_STATS, &stats);
-       igt_assert(ret == 0);
-
-       close(fd);
-       return 0;
-}
diff --git a/tests/getversion.c b/tests/getversion.c
deleted file mode 100644
index d6da2ad6e8a8..000000000000
--- a/tests/getversion.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright © 2007 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:
- *    Eric Anholt <e...@anholt.net>
- *
- */
-
-#include <string.h>
-#include <sys/ioctl.h>
-#include "drmtest.h"
-
-/**
- * Checks DRM_IOCTL_GET_VERSION and libdrm's drmGetVersion() interface to it.
- */
-int main(int argc, char **argv)
-{
-       int fd;
-       drmVersionPtr v;
-
-       fd = drm_open_any();
-       v = drmGetVersion(fd);
-       igt_assert(strlen(v->name) != 0);
-       igt_assert(strlen(v->date) != 0);
-       igt_assert(strlen(v->desc) != 0);
-       igt_assert(v->version_major >= 1);
-       drmFree(v);
-       close(fd);
-       return 0;
-}
-- 
1.8.4.rc3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to