diff mbox series

[meta-arago,master,2/2] libdrm: Remove ltp-ddt test harness workaround

Message ID 20261105203726.1306888-2-afd@ti.com
State New
Headers show
Series [meta-arago,master,1/2] libdrm: Remove patch adding extra OMAP BO flags | expand

Commit Message

Andrew Davis Nov. 5, 2026, 8:37 p.m. UTC
Modetest exits on stdin input. ltp-ddt sends data to stdin when a test
is run, so a workaround was added to modetest. Instead the test harness
should be fixed. If it has not been or cannot be fixed, then this patch
should be worked upstream and carried in meta-ti-test until then, not
here in the distro layer.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 .../recipes-graphics/drm/libdrm-arago.inc     |  7 --
 ...dd-option-to-run-a-test-indefinitely.patch | 77 -------------------
 .../recipes-graphics/drm/libdrm_%.bbappend    |  4 -
 3 files changed, 88 deletions(-)
 delete mode 100644 meta-arago-distro/recipes-graphics/drm/libdrm-arago.inc
 delete mode 100644 meta-arago-distro/recipes-graphics/drm/libdrm/0001-Add-option-to-run-a-test-indefinitely.patch
 delete mode 100644 meta-arago-distro/recipes-graphics/drm/libdrm_%.bbappend

Comments

Randolph Sapp Nov. 5, 2026, 9:05 p.m. UTC | #1
On Thu Nov 5, 2026 at 2:37 PM CST, Andrew Davis wrote:
> Modetest exits on stdin input. ltp-ddt sends data to stdin when a test
> is run, so a workaround was added to modetest. Instead the test harness
> should be fixed. If it has not been or cannot be fixed, then this patch
> should be worked upstream and carried in meta-ti-test until then, not
> here in the distro layer.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---

Yep. I actually showed someone recently how this can be worked around using pipe
expiration with bash lists.

Reviewed-by: Randolph Sapp <rs@ti.com>
diff mbox series

Patch

diff --git a/meta-arago-distro/recipes-graphics/drm/libdrm-arago.inc b/meta-arago-distro/recipes-graphics/drm/libdrm-arago.inc
deleted file mode 100644
index 6703fd1d..00000000
--- a/meta-arago-distro/recipes-graphics/drm/libdrm-arago.inc
+++ /dev/null
@@ -1,7 +0,0 @@ 
-FILESEXTRAPATHS:prepend := "${THISDIR}/libdrm:"
-
-SRC_URI += " \
-file://0001-Add-option-to-run-a-test-indefinitely.patch \
-"
-
-PR:append = ".arago4"
diff --git a/meta-arago-distro/recipes-graphics/drm/libdrm/0001-Add-option-to-run-a-test-indefinitely.patch b/meta-arago-distro/recipes-graphics/drm/libdrm/0001-Add-option-to-run-a-test-indefinitely.patch
deleted file mode 100644
index 5b051361..00000000
--- a/meta-arago-distro/recipes-graphics/drm/libdrm/0001-Add-option-to-run-a-test-indefinitely.patch
+++ /dev/null
@@ -1,77 +0,0 @@ 
-From 115aa882abeb6db92c7588f3fb0953593fa2f634 Mon Sep 17 00:00:00 2001
-From: Alejandro Hernandez <ajhernandez@ti.com>
-Date: Tue, 3 Mar 2020 09:52:06 -0500
-Subject: [PATCH] Add option to run a test indefinitely
-
-This patch adds option -t to the modetest cli. When this option is
-speficied modetest will not stop on stdin input. This patch
-allows using modetest within ltp-ddt, before this patch modetest
-was not able to run in ltp-ddt because ltp-ddt sends data to stdin
-when a test is run
-
-Upstream-Status: Pending
-
-Signed-off-by: Alejandro Hernandez <ajhernandez@ti.com>
-Signed-off-by: Denys Dmytriyenko <denis@denix.org>
----
- tests/modetest/modetest.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
-index d9e761e..687f7a4 100644
---- a/tests/modetest/modetest.c
-+++ b/tests/modetest/modetest.c
-@@ -1888,7 +1888,7 @@ static void clear_cursors(struct device *dev)
- 		bo_destroy(dev->mode.cursor_bo);
- }
- 
--static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned int count)
-+static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned int count, int dont_stop)
- {
- 	unsigned int other_fb_id;
- 	struct bo *other_bo;
-@@ -1946,7 +1946,7 @@ static void test_page_flip(struct device *dev, struct pipe_arg *pipes, unsigned
- 		fd_set fds;
- 
- 		FD_ZERO(&fds);
--		FD_SET(0, &fds);
-+		if (!dont_stop) FD_SET(0, &fds);
- 		FD_SET(dev->fd, &fds);
- 		ret = select(dev->fd + 1, &fds, NULL, NULL, &timeout);
- 
-@@ -2194,7 +2194,7 @@ static void usage(char *name)
- 	exit(0);
- }
- 
--static char optstr[] = "acdD:efF:M:P:ps:Cvrw:o:S:";
-+static char optstr[] = "acdD:efF:M:P:ps:Cvrw:o:S:t";
- 
- int main(int argc, char **argv)
- {
-@@ -2208,6 +2208,7 @@ int main(int argc, char **argv)
- 	char *module = NULL;
- 	unsigned int i;
- 	unsigned int count = 0, plane_count = 0;
-+	int dont_stop = 0;
- 	unsigned int prop_count = 0;
- 	struct pipe_arg *pipe_args = NULL;
- 	struct plane_arg *plane_args = NULL;
-@@ -2314,6 +2315,9 @@ int main(int argc, char **argv)
- 
- 			prop_count++;
- 			break;
-+		case 't':
-+			dont_stop = 1;
-+			break;
- 		default:
- 			usage(argv[0]);
- 			break;
-@@ -2464,7 +2468,7 @@ int main(int argc, char **argv)
- 				set_cursors(&dev, pipe_args, count);
- 
- 			if (test_vsync)
--				test_page_flip(&dev, pipe_args, count);
-+				test_page_flip(&dev, pipe_args, count, dont_stop);
- 
- 			if (drop_master)
- 				drmDropMaster(dev.fd);
diff --git a/meta-arago-distro/recipes-graphics/drm/libdrm_%.bbappend b/meta-arago-distro/recipes-graphics/drm/libdrm_%.bbappend
deleted file mode 100644
index 7a9bed64..00000000
--- a/meta-arago-distro/recipes-graphics/drm/libdrm_%.bbappend
+++ /dev/null
@@ -1,4 +0,0 @@ 
-LIBDRM_ARAGO = ""
-LIBDRM_ARAGO:arago = "libdrm-arago.inc"
-
-require ${LIBDRM_ARAGO}