[Intel-gfx] [igt-dev] [PATCH i-g-t v2] tests/drm_buddy: Add drm buddy test cases

Arunpravin Paneer Selvam Arunpravin.PaneerSelvam at amd.com
Mon Apr 11 18:50:42 UTC 2022


Add a set of drm buddy test cases to validate the
drm/drm_buddy.c memory allocator.

v2: sorted in alphabetical order

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam at amd.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
---
 tests/drm_buddy.c | 14 ++++++++++++++
 tests/meson.build |  1 +
 2 files changed, 15 insertions(+)
 create mode 100644 tests/drm_buddy.c

diff --git a/tests/drm_buddy.c b/tests/drm_buddy.c
new file mode 100644
index 00000000..06876e0c
--- /dev/null
+++ b/tests/drm_buddy.c
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#include "igt.h"
+#include "igt_kmod.h"
+
+IGT_TEST_DESCRIPTION("Basic sanity check of DRM's buddy allocator (struct drm_buddy)");
+
+igt_main
+{
+	igt_kselftests("test-drm_buddy", NULL, NULL, NULL);
+}
diff --git a/tests/meson.build b/tests/meson.build
index b0eab3d6..7261e9aa 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -8,6 +8,7 @@ test_progs = [
 	'debugfs_test',
 	'dmabuf',
 	'device_reset',
+	'drm_buddy',
 	'drm_import_export',
 	'drm_mm',
 	'drm_read',
-- 
2.25.1



More information about the Intel-gfx mailing list