- Apr 01, 2021
-
-
Florian Fischer authored
Move io and lib related tests into io/ and lib/. Our test dictionaries not must have a 'source' key with an array created with files(). This ensures we use always correct paths regardless of the actual directory we are currently in. Until https://github.com/mesonbuild/meson/issues/8608 is not solved we have to separately specify the tests name in a 'name' key.
-
- Mar 24, 2021
-
-
Florian Schmaus authored
Stack unwinding via ligbcc does not (yet) work correctly within EMPER. As result, the unwinding often causes a segfault shadowing the actual cause.
-
- Mar 16, 2021
-
-
Florian Schmaus authored
-
- Mar 03, 2021
-
-
Florian Schmaus authored
-
- Feb 20, 2021
-
-
Florian Fischer authored
-
- Feb 05, 2021
-
-
Florian Fischer authored
Futures can have a registered Callback of type std::function<void(const uint32_t&)> which gets called in a new Fiber with the result of the IO Request. Note the first completion will cause the execution of a callback and partial completion support must be implemented manually in the callback. Callbacks are stored in a heap allocated std::function on registration and are freed by the new Fiber after the callback returned; The Future with a registered Callback is not referenced in any way in the IO subsystem and therefore can be dropped after being submitted. This also means that a Future with a registered callback will not be signaled by the IO subsystem on completion. If signaling is desired one must implement it manually in the registered callback.
-
Florian Fischer authored
The gtest wrap can be updated with the meson wrap command
-
Florian Schmaus authored
-
- Feb 03, 2021
-
-
Florian Schmaus authored
-
- Jan 29, 2021
-
-
Florian Fischer authored
To skip test if emper::IO is false the new io test runner in tests/test-runner is introduced which checks emper::IO and skips the test otherwise executes our normal testMain function. Fixes #10.
-
- Jan 26, 2021
-
-
Florian Fischer authored
Empers IO design is based on a proactor pattern where each worker can issue IO requests through its exclusive IoContext object which wraps an io_uring instance. IO completions are reaped at 4 places: 1. After a submit to collect inline completions 2. Before dispatching a new Fiber 3. When no new IO can be submitted because the completion queue is full 4. And by a global completer thread which gets notified about completions on worker IoContexts through registered eventfds All IO requests are modeled as Future objects which can be either instantiated and submitted manually, retrieved by POSIX-like non-blocking or implicitly used by posix-like blocking functions. User facing API is exported in the following headers: * emper/io.hpp (POSIX-like) * emper.h (POSIX-like) * emper/io/Future.hpp Catching short write/reads/sends and resubmitting the request without unblocking the Fiber is supported. Using AlarmFuture objects Fibers have a emper-native way to sleep for a given time. IO request timeouts with TimeoutWrapper class. Request Cancellation is supported with Future::cancel() or the CancelWrapper() Future class. A proactor design demands that buffers are committed to the kernel as long as the request is active. To guaranty memory safety Futures get canceled in their Destructor which will only return after the committed memory is free to use. Linking Futures to chains is supported using the Future::SetDependency() method. Future are submitted when their last Future gets submitted. A linked Request will start if the previous has finished. Error or partial completions will cancel the not started tail of a chain. TODO: Handle possible situations where the CQ of the global completer is full and no more sqe can be submitted to the SQ.
-
- Jan 14, 2021
-
-
Florian Schmaus authored
-
- Jan 11, 2021
-
-
Florian Schmaus authored
We see SimpleActorTest timing out a lot in our CI when LAWS is used, and from the logs it appears likely that this is a valid timeout (versus the test just being stuck). Let us increase the test timeout and see if it helps. Or if it is a "real" timeout.
-
Florian Schmaus authored
We see SimpleActorTest timing out a lot in our CI, and from the logs it appears likely that this is a valid timeout (versus the test just being stuck). Let us increase the test timeout and see if it helps.
-
- Dec 17, 2020
-
-
Florian Fischer authored
A spurious wake-up can be produced by the new UnblockOnMainActorTest which triggers the assert(!mpscQueue.empty()) in UnboundedBlockingMpscQueue::get. Those spurious wake-ups are possible because the push and wake-up pair in UnboundedBlockingMpscQueue::put are not atomic. The following sequence diagram demonstrates a spurious wake-up: T1 T2 Q . . { } put(e) . { } push 54-57 . {e} . get() {e} . consume e { } . . { } . get() { } . block { } unblock . { } . . { } . wakeup { } . . { } X assert(!queue.Empty()) To deal with spurious wake-ups we recheck the wake-up condition (a non empty queue) and block again if we find it empty. We assume spurious wake-ups are rare because it was difficult to reproduce them even with a dedicated Test (the new UnblockOnMainActorTest) therefore we declare the empty queue branch as unlikely. Fixes #4.
-
- Dec 09, 2020
-
-
Florian Schmaus authored
-
- Dec 07, 2020
-
-
Florian Schmaus authored
-
- Dec 01, 2020
-
-
Florian Schmaus authored
This reverts commit b33ac93c. Now that logging is done independently from NDEBUG, we can re-enable "undef NDEBUG for test executables". The rationale that we want to undefine NDEBUG for test executable is that we want, even in release builds, asserts in tests enabled. Note that this also applies to asserts in the emper core library, if those are in *headers*.
-
- Nov 30, 2020
-
-
Florian Fischer authored
Disable the userpace-rcu support by default. Our used userspace-rcu flavor memb is rather new and not available in liburcu version 0.10 available in debian buster. This change switches from using DCE and "if constexpr" to the C preprocessor so the library is only needed when the userspace-rcu support is actually enabled.
-
- Nov 20, 2020
-
-
Florian Fischer authored
-
Florian Fischer authored
-
Florian Fischer authored
The explicit -UNDEBUG was introduced in the CMake to meson migration (62900cd1) but as far as I can tell it was not present in the CMake tests definition. It makes tests less reliable because it enables only some debug messages but not all. For example if emper is build with NDEBUG a test using a Semaphore will output debug messages from the Semaphore but not from the Runtime.
-
- Nov 19, 2020
-
-
Florian Fischer authored
Introduce a new Actor test using BinaryPrivateSemaphores and an Actor. Multiple fibers are created which create a BPS on the stack, submit it to the actor and wait on the semaphore. The Actor simply signals each semaphore it receives.
-
- Nov 17, 2020
-
-
Florian Fischer authored
The SimpleURCUTest creates a lock-less hash table and inserts values from separate fibers and verifies the correct insertion.
-
- Nov 16, 2020
-
-
Florian Schmaus authored
-
Florian Schmaus authored
This allows to run indiviual tests using the meson runner, e.g. meson --repeat 100 SimpleActorTest
-
Florian Schmaus authored
-
Florian Schmaus authored
Otherwise meson will use a random value.
-
- Nov 10, 2020
-
-
Florian Schmaus authored
This test fails for yet unknown reasons.
-
- Oct 27, 2020
-
-
Florian Fischer authored
-
- Jul 31, 2020
-
-
Florian Schmaus authored
-