[PATCH libinput 05/10] quirks: use an empty dmi modalias string for the test suite

Peter Hutterer peter.hutterer at who-t.net
Mon May 28 08:08:31 UTC 2018

We don't want any of the test devices to match the local machine's DMI
modalias. This was a major drawback in the previous test suite, hacking the
dmi modalias string was nontrivial but a wrong string could cause false
positives or negatives.

The quirks system is internal, so rather than having some fancy API we just
hook it off the environment variable that the test suite always sets. Hacky,
but a lot easier than the other options.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
 src/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/quirks.c b/src/quirks.c
index f23ec894..d94da3a7 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -334,6 +334,9 @@ init_dmi(void)
 	char *copy = NULL;
 	const char *syspath = "/sys/devices/virtual/dmi/id";
+		return safe_strdup("dmi:");
 	udev = udev_new();
 	if (!udev)
 		return NULL;

More information about the wayland-devel mailing list