Go to index / Go to protocols

weston_test ↗

weston_test
weston_test

Version 1

weston internal testing

Internal testing facilities for the weston compositor.

It can't be stressed enough that these should never ever be used outside of running weston's tests. The weston-test.so module should never be installed.

These requests may allow clients to do very bad things.

weston_test
enum error {
    touch_up_with_coordinate = 0,
}
  • touch_up_with_coordinate — invalid coordinate
weston_test
request move_surface(
    surface: object<wl_surface>,
    x: int,
    y: int,
)
    weston_test
    request move_pointer(
        tv_sec_hi: uint,
        tv_sec_lo: uint,
        tv_nsec: uint,
        x: int,
        y: int,
    )
      weston_test
      request send_button(
          tv_sec_hi: uint,
          tv_sec_lo: uint,
          tv_nsec: uint,
          button: int,
          state: uint,
      )
        weston_test
        request send_axis(
            tv_sec_hi: uint,
            tv_sec_lo: uint,
            tv_nsec: uint,
            axis: uint,
            value: fixed,
        )
          weston_test
          request activate_surface(
              surface: nullable object<wl_surface>,
          )
            weston_test
            request send_key(
                tv_sec_hi: uint,
                tv_sec_lo: uint,
                tv_nsec: uint,
                key: uint,
                state: uint,
            )
              weston_test
              request device_release(
                  device: string,
              )
                weston_test
                request device_add(
                    device: string,
                )
                  weston_test
                  event pointer_position(
                      x: fixed,
                      y: fixed,
                  )
                    weston_test
                    request send_touch(
                        tv_sec_hi: uint,
                        tv_sec_lo: uint,
                        tv_nsec: uint,
                        touch_id: int,
                        x: fixed,
                        y: fixed,
                        touch_type: uint,
                    )
                      weston_test
                      enum breakpoint {
                          post_repaint = 0,
                          post_latch = 1,
                          immediate = 2,
                      }
                      • post_repaint — after output repaint (filter type: wl_output)
                      • post_latch — after output latch (filter type: wl_output)
                      • immediate — immediately
                      weston_test
                      request client_break(
                          breakpoint: uint<breakpoint>,
                          resource_id: uint,
                      )
                      • breakpoint — event type to wait for
                      • resource_id — optional Wayland resource ID to filter for (type-specific)

                      request compositor pause at a certain point

                      Request that the compositor pauses execution at a certain point. When execution is paused, the compositor will signal the shared semaphore to the client.

                      weston_test
                      weston_test_runner

                      Version 1

                      weston internal testing

                      This is a global singleton interface for Weston internal tests.

                      This interface allows a test client to trigger compositor-side test procedures. This is useful for cases, where the actual tests are in compositor plugins, but they also require the presence of a particular client.

                      This interface is implemented by the compositor plugins containing the testing code.

                      A test client starts a test with the "run" request. It must not send another "run" request until receiving the "finished" event. If the compositor-side test succeeds, the "finished" event is sent. If the compositor-side test fails, the compositor should send the protocol error "test_failed", but it may also exit with an error (e.g. SEGV).

                      Unknown test name will raise "unknown_test" protocol error.

                      weston_test_runner
                      enum error {
                          test_failed = 0,
                          unknown_test = 1,
                      }
                      • test_failed — compositor test failed
                      • unknown_test — unrecognized test name
                      weston_test_runner
                      request destroy()
                      Destructor
                        weston_test_runner
                        request run(
                            test_name: string,
                        )
                          weston_test_runner
                          event finished()