tests: util: Fixup util_open() parameter order
PATCH 1/1 tests: util: Fixup util_open() parameter order
From: Thierry Reding <[email protected]>
util_open() takes a device parameter, followed by a module parameter. The existing tests used the drmOpen() function, which uses a different ordering of the parameters, and the old ordering was accidentally kept during the conversion.
---
Evidently I didn't properly test this. Things do work in most cases with the current code because of the auto-detection, but there will be cases where it fails.
tests/modetest/modetest.c | 2 +- tests/proptest/proptest.c | 2 +- tests/vbltest/vbltest.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
tests/modetest/modetest.c +1 -1
@@ -1603,7 +1603,7 @@ int main(int argc, char **argv)if (!args) encoders = connectors = crtcs = planes = framebuffers =1 ; - dev.fd =util_open (module, device); + dev.fd =util_open (device, module);if (dev.fd <0 )return -1 ;
tests/proptest/proptest.c +1 -1
@@ -295,7 +295,7 @@ int main(int argc, char *argv[]) args = argc - optind; - fd =util_open (module, device); + fd =util_open (device, module);if (fd <0 )return 1 ;
tests/vbltest/vbltest.c +1 -1
@@ -120,7 +120,7 @@ int main(int argc, char **argv) } } - fd =util_open (module, device); + fd =util_open (device, module);if (fd <0 )return 1 ;
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Thierry Reding
From: Thierry Reding <[email protected]>
util_open()takes a device parameter, followed by a module parameter. The existing tests used thedrmOpen()function, which uses a different ordering of the parameters, and the old ordering was accidentally kept during the conversion.
Quoted 6 lines
Signed-off-by Thierry Reding <[email protected]>---
Evidently I didn't properly test this. Things do work in most cases with the current code because of the auto-detection, but there will be cases where it fails.
Having the module name identical to the device name also helps ;-) But seriously - nicely spotted. I'll going through the list and I'll push this out shortly.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel