- 25 Apr, 2012 5 commits
-
-
Pekka Paalanen authored
Some system C libraries do not have MSG_CMSG_CLOEXEC. This flag would automatically set O_CLOEXEC flag on any received file descriptors. Provide a fallback that does it manually. If setting CLOEXEC fails, the file descriptor is closed immediately, which will lead to failures but avoid leaks. However, setting CLOEXEC is not really expected to fail occasionally. Add tests for the wrapper. The setup is copied from connection-test.c. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Some system C libraries do not have F_DUPFD_CLOEXEC. Provide a fallback. Add tests for the new wl_os_dupfd_cloexec() wrapper. Add per-wrapper call counters in os_wrappers-test.c. Makes it easier to determine the minimum required number of wrapped calls. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
If it's not already defined, and we are on Linux, #define it. This gets rid of a load of #ifdefs. This should also allow to use it when the kernel supports it, but the libc does not define it. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
If socket() fails, it will return failure code. No need to reset errno beforehand. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
- 22 Apr, 2012 4 commits
-
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
- 20 Apr, 2012 7 commits
-
-
Kristian Høgsberg authored
Casey did surface.enter/leave.
-
Casey Dahlin authored
These events let us track when a surface enters or leaves the scanout region of an output. This way if a surface moves to another output and that output is on a different card, we can suggest the toolkit reallocate its buffers appropriately. Signed-off-by:
Casey Dahlin <cdahlin@redhat.com>
-
Pekka Paalanen authored
Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Some system C libraries do not offer SOCK_CLOEXEC flag. Add a new header for OS compatibility wrappers. Wrap socket() calls into wl_os_socket_cloexec() which makes sure the O_CLOEXEC flag gets set on the file descriptor. On systems having SOCK_CLOEXEC this uses the old socket() call, and falls back if it fails due to the flag (kernel not supporting it). wayland-os.h is private and not exported. Add close-on-exec tests for both normal and forced fallback paths. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Add facility for testing how (many) file descriptors survive an exec. This allows implementing O_CLOEXEC tests. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Detect file descriptor leaks in tests. Add a sanity test to verify that we catch the leaks. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
- 19 Apr, 2012 8 commits
-
-
Scott Moreau authored
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
Pekka Paalanen authored
Test the testing framework itself, so that it catches the errors we expect it to. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Add a new macro FAIL_TEST that can be used to define tests that are supposed to fail. To distinguish the supposed outcome of a test, add a field to 'struct test'. However, simply adding a field to 'struct test' will make all tests past the first one in an executable to be garbage. Apparently, the variables of type 'struct test' have different alignment when put into a special section than otherwise, and the compiler will get the skip from one 'struct test' to the next wrong. Explicitly specify the alingment of 'struct test' to be 16 bytes, which is what it seems to be in the special section on x86_64. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Fix a typo, add a comment, change the print format, and add a variable that will ease implementing tests that are expected to fail. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
Pekka Paalanen authored
Makes all test targets have the same common make dependencies. Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
- 17 Apr, 2012 1 commit
-
-
Pekka Paalanen authored
connection.c:530: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' /connection.c:560: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'unsigned int' Signed-off-by:
Pekka Paalanen <ppaalanen@gmail.com>
-
- 13 Apr, 2012 7 commits
-
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
And reject setting a selection that's older than our current selection.
-
Kristian Høgsberg authored
Otherwise we'll see a spurious leave event when we start the next dnd.
-
Kristian Høgsberg authored
We compile the test cases with -fvisibility=hidden which makes our malloc/free wrappers fail to override system malloc/free.
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
-
- 12 Apr, 2012 4 commits
-
-
Neil Roberts authored
This adds a public header so that applications can get the Wayland version number at compile time. This can be used to make applications that support compiling against multiple versions of Wayland. There is a separate installed header called cogl-version.h which gets included by both wayland-client.h and wayland-server.h The canonical place for the version number is the configure.ac script which splits it into three separate m4 defines for the major, minor and micro version. These are copied into the generated wayland-version.h header using AC_SUBST. There is also a string form of the complete version number. The version number is now also automatically copied into the two .pc files. Because the major, minor and micro parts are required it is no longer possible to leave the version number as 'master' when building from git. Most projects seem to immediately bump the git repo to a fake version number (usually odd) after making a release so that there is always a relative number that can be used for comparison. This patch sets the git version to 0.99.0 under the assumption that the next release will be 1.0.0.
-
Kristian Høgsberg authored
-
Kristian Høgsberg authored
This is mostly renaming and consolidating the listener_list pattern into something more concise and reusable.
-
Kristian Høgsberg authored
The wayland protocol, as X, uses timestamps to match up certain requests with input events. The problem is that sometimes we need to send out an event that doesn't have a corresponding timestamped input event. For example, the pointer focus surface goes away and new surface needs to receive a pointer enter event. These events are normally timestamped with the evdev event timestamp, but in this case, we don't have a evdev timestamp. So we have to go to gettimeofday (or clock_gettime()) and then we don't know if it's coming from the same time source etc. However for all these cases we don't need a real time timestamp, we just need a serial number that encodes the order of events inside the server. So we introduce a serial number mechanism that we can use to order events. We still need real-time timestamps for actual input device events (motion, buttons, keys, touch), to be able to reason about double-click speed and movement speed so events that correspond to user input carry both a serial number and a timestamp. The serial number also give us a mechanism to key together events that are "logically the same" such as a unicode event and a keycode event, or a motion event and a relative event from a raw device.
-
- 11 Apr, 2012 1 commit
-
-
Jørgen Lind authored
-
- 06 Apr, 2012 1 commit
-
-
Benjamin Franzke authored
-
- 03 Apr, 2012 2 commits
-
-
Kristian Høgsberg authored
There's a big cost to setting up and tearing down a mmap and faulting in the pages to back it. For cases where we're continuously reallocating shm wl_buffers (resizing a surface, typically) it is a big performance improvement to be able to reuse a mmap area. This change makes the shm buffer allocation a two step process: first allocate a wl_shm_pool, then allocate a buffer from the pool. The wl_shm_pool encapsulate the shared memory pool, and lets clients allocate wl_buffers backed by chunks of that memory. Buffers are allocated at an offset into the pool, so it's possible to create multiple buffers from one pool, for example for icons or cursor images.
-
Alex Wu authored
Add the safe version for wl_list_for_each_reverse
-