[mutter/benzea/ignore-monitor-connector: 1251/1253] tests/monitor-unit-tests: Disambiguate external monitor in lid switch test




commit 0c6422c5c1747b2d2979ed827b548368adca0559
Author: Benjamin Berg <bberg redhat com>
Date:   Wed Feb 12 13:43:46 2020 +0100

    tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
    
    The external and internal monitor in the lid switch test had the
    identical EDID information. This is at odds with the change to ignore
    the connector if possible, as each of the monitors can be present
    independently.
    
    Avoid the problem by updating the test and setting a different serial
    number in the EDID data of the external monitor.
    
    https://gitlab.gnome.org/GNOME/mutter/issues/932

 src/tests/monitor-configs/lid-switch.xml | 4 ++--
 src/tests/monitor-unit-tests.c           | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/tests/monitor-configs/lid-switch.xml b/src/tests/monitor-configs/lid-switch.xml
index fe51446602..95d629e9bb 100644
--- a/src/tests/monitor-configs/lid-switch.xml
+++ b/src/tests/monitor-configs/lid-switch.xml
@@ -30,7 +30,7 @@
          <connector>DP-1</connector>
          <vendor>MetaProduct's Inc.</vendor>
          <product>MetaMonitor</product>
-         <serial>0x123456</serial>
+         <serial>0x654321</serial>
        </monitorspec>
        <mode>
          <width>1024</width>
@@ -54,7 +54,7 @@
          <connector>DP-1</connector>
          <vendor>MetaProduct's Inc.</vendor>
          <product>MetaMonitor</product>
-         <serial>0x123456</serial>
+         <serial>0x654321</serial>
        </monitorspec>
        <mode>
          <width>1024</width>
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index 6cce739971..76317d83a3 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -4855,6 +4855,7 @@ meta_test_monitor_custom_lid_switch_config (void)
           .crtc = -1,
           .modes = { 0 },
           .n_modes = 1,
+          .serial = "0x654321",
           .preferred_mode = 0,
           .possible_crtcs = { 1 },
           .n_possible_crtcs = 1,
@@ -4963,6 +4964,7 @@ meta_test_monitor_custom_lid_switch_config (void)
   check_monitor_test_clients_state ();
 
   /* External monitor connected */
+  g_debug ("External monitor connected");
 
   test_case.setup.n_outputs = 2;
   test_case.expect.n_monitors = 2;
@@ -4985,6 +4987,7 @@ meta_test_monitor_custom_lid_switch_config (void)
   check_monitor_test_clients_state ();
 
   /* Lid was closed */
+  g_debug ("Closing lid");
 
   test_case.expect.crtcs[0].current_mode = -1;
   test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_90;
@@ -5005,6 +5008,7 @@ meta_test_monitor_custom_lid_switch_config (void)
   check_monitor_test_clients_state ();
 
   /* Lid was opened */
+  g_debug ("Opening lid");
 
   test_case.expect.crtcs[0].current_mode = 0;
   test_case.expect.crtcs[0].transform = META_MONITOR_TRANSFORM_NORMAL;


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