[mutter] monitor-unit-tests: initial crtcs in custom_lid_switch



commit 1c67260bd48a40c5d69c7609b8e25992dcb5734c
Author: Pekka Paalanen <pekka paalanen collabora com>
Date:   Tue Jan 29 14:27:25 2019 +0200

    monitor-unit-tests: initial crtcs in custom_lid_switch
    
    This test forgot to specify the existing CRTC routings in the setup. For the
    first output the default 0 was ok, now it is -1 to ensure that the code will
    assign it correctly. For the second output the default 0 was incorrect, because
    possible_crtcs does not include 0.  Now that CRTC is initialized to off
    instead, because the second output is hotplugged later and running a CRTC
    without an output does not make sense.
    
    This fix will keep this test passing when a future patch attempts to preserve
    existing CRTC routings. Assuming that any existing routing is valid, such
    routing will be kept. In this test case the existing routing was illegal, it
    should have been impossible, which then causes that future patch to fail the
    test by assigning the wrong CRTC.
    
    https://gitlab.gnome.org/GNOME/mutter/issues/373

 src/tests/monitor-unit-tests.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index a58d9e153..f47544b03 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -5291,6 +5291,7 @@ meta_test_monitor_custom_lid_switch_config (void)
       .n_modes = 1,
       .outputs = {
         {
+          .crtc = -1,
           .modes = { 0 },
           .n_modes = 1,
           .preferred_mode = 0,
@@ -5301,6 +5302,7 @@ meta_test_monitor_custom_lid_switch_config (void)
           .is_laptop_panel = TRUE
         },
         {
+          .crtc = -1,
           .modes = { 0 },
           .n_modes = 1,
           .preferred_mode = 0,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]