<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] run-gtk-tests should use the driver environment for checking the accessibility bus"
   href="https://bugs.webkit.org/show_bug.cgi?id=161149">161149</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[GTK] run-gtk-tests should use the driver environment for checking the accessibility bus
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>clopez&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply&#64;webkitgtk.org, cgarcia&#64;igalia.com, lforschler&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>160736
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently run-gtk-tests waits for the accessibility bus on D-Bus to appear like this:

        # We need to wait until the SPI bus is launched before trying to start the SPI
        # registry, so we spin a main loop until the bus name appears on DBus.
        loop = GLib.MainLoop()
        Gio.bus_watch_name(Gio.BusType.SESSION, 'org.a11y.Bus', Gio.BusNameWatcherFlags.NONE,
                           lambda *args: loop.quit(), None)
        loop.run()


The problems are:

 1) It runs the check using the environment from the user rather than the environ that should be used for the tests. So the environment variables from the driver (after <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] run-gtk-tests should use webkitpy.port.gtk and webkitpy.port.xvfbdriver"
   href="show_bug.cgi?id=160736">bug 160736</a>) are not correctly set (like DISPLAY or WAYLAND_DISPLAY). This seems to be somehow relevant, because if the system don't has the environment variable DBUS_SESSION_BUS_ADDRESS defined, dbus is able to do the right thing if at least DISPLAY is set to the correct value. Otherwise it fails.

 2) It don't has a timeout. In case the accessibility bus don't appears, it hangs forever.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>