1. 07 Apr, 2020 1 commit
  2. 18 Mar, 2020 3 commits
  3. 13 Mar, 2020 1 commit
    • Matt Turner's avatar
      meson: Add option to control building wayland-scanner · 618663c7
      Matt Turner authored
      Wayland requires a binary, wayland-scanner, to be run during the build
      process. For any configuration other than native builds (including
      cross compiling and even 32-bit x86 builds on an x86-64 build machine)
      Wayland's build process builds and uses its own wayland-scanner.
      For any builds using a cross file, wayland-scanner is built for the host
      machine and therefore cannot be executed during the build of the Wayland
      libraries. Instead builds using a cross file must execute the build
      machine's wayland-scanner (typically /usr/bin/wayland-scanner).
      As such, to build Wayland's libraries for a non-native ABI a package
      manager must build and install /usr/bin/wayland-scanner first. But then
      the build for the native ABI then rebuilds wayland-scanner itself and
      doesn't use the system's, and worse, wants to install its own, which
      conflicts with the /usr/bin/wayland-scanner already installed!
      So, add the -Dscanner=... option to control whether to install
      Signed-off-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
  4. 09 Mar, 2020 1 commit
    • Matt Turner's avatar
      meson: Require wayland-scanner of a matching version · 5ddb8dff
      Matt Turner authored
      We have always built libwayland with the scanner from the same build so
      that the generated code and installed headers are exactly up-to-date
      with the libwayland version. If libwayland was to use a scanner later
      than itself, the scanner might do things that are not available in the
      libwayland at hand, leading to a broken build or a broken library
      Signed-off-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
  5. 05 Mar, 2020 1 commit
  6. 24 Feb, 2020 1 commit
    • Tomek Bury's avatar
      util: fix compiler warning · ef40f82a
      Tomek Bury authored
      conversion to 'wl_fixed_t {aka int}' from 'int64_t {aka long int}'
      may alter its value [-Werror=conversion]
  7. 23 Feb, 2020 3 commits
  8. 15 Feb, 2020 1 commit
    • Jan Beich's avatar
      meson/tests: add missing dependencies on protocol headers · 0fc00fff
      Jan Beich authored
      In file included from ../tests/connection-test.c:43:
      In file included from ../tests/test-compositor.h:30:
      ../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found
       #include "wayland-client-protocol.h"
      In file included from ../tests/display-test.c:45:
      In file included from ../src/wayland-server.h:104:
      src/wayland-server-protocol.h:4454:2: error: unterminated /* comment
      In file included from ../tests/cpp-compile-test.cpp:2:
      In file included from src/wayland-server-protocol.h:8:
      In file included from ../src/wayland-server.h:104:
      src/wayland-server-protocol.h:3:2: error: unterminated conditional directive
      ../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h!
       #error including wayland-server-protocol.h did not include wayland-server.h!
      In file included from ../tests/headers-protocol-test.c:26:
      In file included from src/wayland-client-protocol.h:8:
      In file included from ../src/wayland-client.h:40:
      src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive
       #ifndef WL_SHM_FORMAT_ENUM
      In file included from ../tests/protocol-logger-test.c:34:
      In file included from ../src/wayland-client.h:40:
      src/wayland-client-protocol.h:2613:1: error: unterminated /* comment
      ../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface'
              res = wl_resource_create(client, &wl_seat_interface, 4, 0);
  9. 11 Feb, 2020 2 commits
  10. 04 Feb, 2020 2 commits
  11. 28 Jan, 2020 2 commits
    • Simon Ser's avatar
    • Simon Ser's avatar
      tests: fix memory leak in proxy-test · 96a8465e
      Simon Ser authored
      When running tests with ASan, proxy-test fails at the proxy_tag test:
          ==27843==ERROR: LeakSanitizer: detected memory leaks
          Direct leak of 32 byte(s) in 1 object(s) allocated from:
              #0 0x7f65a732dada in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:144
              #1 0x7f65a71cb3ea in wl_display_add_protocol_logger src/wayland-server.c:1813
              #2 0x557c640c0980 in proxy_tag tests/proxy-test.c:104
              #3 0x557c640c1159 in run_test tests/test-runner.c:153
              #4 0x557c640c1e2e in main tests/test-runner.c:337
              #5 0x7f65a6ea0ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
          SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
      Destroying the logger fixes the leak.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Fixes: 493ab79b ("proxy: Add API to tag proxy objects")
  12. 23 Jan, 2020 1 commit
    • Ihor Antonov's avatar
      os: fallback for unsupported posix_fallocate · 8e219964
      Ihor Antonov authored
      Some filesystems do not support fallocate and return EOPNOTSUPP.
      On musl-based distros libwayland-cursor exits abruptly which causes the
      application to crash. Unlike glibc, musl does not provide a fallback
      mechanism for handling unsupported fallocate. Instead, musl developers
      argue that application should handle the case of unsupported system
      This commit allows falback to ftruncate in case when EOPNOTSUPP
      was recieved.
      Signed-off-by: Ihor Antonov's avatarIhor Antonov <ihor@antonovs.family>
  13. 22 Jan, 2020 1 commit
  14. 21 Jan, 2020 6 commits
    • Simon Ser's avatar
    • Simon Ser's avatar
    • Manuel Stoeckl's avatar
      event-loop-test: Add test to verify timer ordering · 2f88814d
      Manuel Stoeckl authored
      The new test verifies that, for a set of timers and a short sequence
      of timer update calls, when the event loop is run the timer callbacks
      are run in the expected order.
      Signed-off-by: default avatarManuel Stoeckl <code@mstoeckl.com>
    • Manuel Stoeckl's avatar
      event-loop: Track timer event sources in userspace · 60a8d29a
      Manuel Stoeckl authored
      libwayland now uses only one file descriptor to keep track of all
      the timer event sources associated with an event loop. An array-based
      binary heap is used to determine which event source has the earliest
      (Previously, each timer event source had its own timerfd, making it easy
      for the a process using many timer event sources to run out of file
      Signed-off-by: default avatarManuel Stoeckl <code@mstoeckl.com>
    • Manuel Stoeckl's avatar
      event-loop-test: Confirm distant timers do not fire · 75d14834
      Manuel Stoeckl authored
      This change expands the `event_loop_timer` test to use two different
      timers with different timeouts; it now implicitly checks that e.g.
      both timers do not expire at the same time, and that the first timer
      expiring does not prevent the second from doing so. (While such failure
      modes are unlikely with timer event sources based on individual
      timerfds, they are possible when multiple timers share a common timerfd.)
      Signed-off-by: default avatarManuel Stoeckl <code@mstoeckl.com>
    • Manuel Stoeckl's avatar
      event-loop-test: Verify proper timer cancellation · a0d941e4
      Manuel Stoeckl authored
      The implementation of timer event sources based on timerfds ensured
      specific edge-case behavior with regards to removing and updating timers:
      Calls to `wl_event_loop_dispatch` will dispatch all timer event sources
      that have expired up to that point, with one exception. When multiple
      timer event sources are due to be dispatched in a single call of
      `wl_event_loop_dispatch`, calling wl_event_source_remove` from within a
      timer event source callback will prevent the removed event source's
      callback from being called. Note that disarming or updating one of the
      later timers that is due to be dispatched, from within a timer callback,
      will NOT prevent that timer's callback from being invoked by
      This commit adds a test that verifies the above behavior. (Because
      epoll_wait is not documented to return timerfds in chronological order,
      (although it does, in practice), the test code does not depend on the
      order in which timers are dispatched.)
      Signed-off-by: default avatarManuel Stoeckl <code@mstoeckl.com>
  15. 16 Jan, 2020 1 commit
  16. 15 Jan, 2020 4 commits
  17. 13 Jan, 2020 3 commits
  18. 10 Jan, 2020 4 commits
    • Emmanuele Bassi's avatar
      Add Meson build · 60acba6e
      Emmanuele Bassi authored
      Meson is a next generation build system, simpler than Autotools and also faster
      and more portable. Most importantly, it will make integrating ASan easier in
      The goal is to maintain feature parity of the Meson build with the
      Autotools build, until such time when we can drop the latter.
      Add a script which generates the desired Doxygen configuration for our various
      output formats and executes it using that configuration. This is not something
      Meson can or should do.
      Fixes: #80
      [daniels: Changed to bump version, use GitLab issues URL, remove header
                checks not used in any code, remove pre-pkg-config Expat
      	  support, added missing include paths to wayland-egl and
      	  cpp-compile-test, added GitLab CI.
      	  Bumped version, removed unnecessary pkg-config paths.]
      [daniels: Properly install into mandir/man3 via some gross
                paramaterisation, generate real stamp files.]
      - squashed patches
      - removed MAKEFLAGS from meson CI
      - remove unused PACKAGE* defines
      - fix up scanner dependency handling
      - instead of host_scanner option, build wayland-scanner twice when cross-compiling
      - changed .pc files to match more closely the autotools versions
      - reorder doxygen man sources to reduce diff to autotools
      - fix pkgconfig.generate syntax warnings (new in Meson)
      - bump meson version to 0.47 for configure_file(copy) and run_command(check)
      - move doc tool checks into doc/meson.build, needed in more places
      - make all doc tools mandatory if building docs
      - check dot and doxygen versions
      - add build files under doc/publican
      - reindent to match Weston Meson style
      - Remove install arg from configure_file
      - Don't build wayland-scanner twice during cross-build
      - Fix naming of the threads dependency
      - Store tests in dict
      - Add missing HAVE_* decls for functions
      - Remove unused cc_native variable
      - Make doxygen targets a dict
      - Make dot_gv a dict
      - Use dicts in man_pages
      - Make decls use dicts
      - Make generated_headers use dicts
      - Align Meson version number with autotool's
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
    • Pekka Paalanen's avatar
      scanner: include config.h from command line · 0d3044f2
      Pekka Paalanen authored
      Meson will need to build wayland-scanner twice with different config.h files,
      once for build and another for host machine. It will be easier to include the
      right config.h from compiler command line than playing with files.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
    • Emmanuele Bassi's avatar
      Support running tests from different build directories · a77f6bf6
      Emmanuele Bassi authored
      The tests that run exec-fd-leak-checker expect the binary to be located
      in the current directory. This is not always the case; for instance, the
      binaries could be built under `tests`, but be invoked under the
      top-level build directory.
      We can use an environment variable to control what's the location of the
      test binaries, and fall back to the current directory if the variable is
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    • Daniel Stone's avatar
      build/doc: Ensure destination dir exists despite VPATH · 8497144f
      Daniel Stone authored
      Make considers a variable called VPATH when trying to satisfy
      dependencies, e.g. for a target 'foo', it will consider the target
      extant if VPATH is '../../bar' and '../../bar/foo' exists.
      Part of the doc build, the '$(alldirs)' target, exists to create the
      target directories if they do not exist. For example, before generating
      xml/wayland-architecture.png, it will ensure the 'xml' target is
      considered up-to-date thanks to the target dependency.
      Creating $(srcdir)/doc/doxygen/xml thus means that the 'xml' dependency
      will be satisfied, so we'll never create the output directory, and the
      doc build will fail.
      Change the alldirs target list to be absolute paths, so VPATH will not
      be consulted and defeat the entire point of what we're trying to do.
      This fixes the Meson build, where we later create
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
  19. 04 Jan, 2020 1 commit
  20. 03 Jan, 2020 1 commit