- Sep 21, 2021
-
-
Florian Fischer authored
* Use more emper io functions * Split the separate test cases into two functions * Use C++ arrays where sensible
-
Florian Fischer authored
-
- Sep 16, 2021
-
-
Florian Fischer authored
The tests may fail when repeated because the listener may bind to fast to the tcp tuple again. This is fixed by using SO_REUSEPORT instead of SO_REUSEADDR. TIL: SO_REUSEADDR is about address wildcards and SO_REUSEPORT allows binding to the same tcp tuple. https://stackoverflow.com/questions/14388706/how-do-so-reuseaddr-and-so-reuseport-differ Add a generic way to specify socket options when creating a listen socket with tcp_listener.
-
- Sep 14, 2021
-
-
Florian Fischer authored
* remove fancy but broken static LinuxVersion object. This means each usage of a EMPER_LINUX_* macro results in a syscall. But I think this is worth it when the result is a sound program. Users of those macros should store the result of the comparison anyway. * fix that we skipped parsing the last part of a version string * add a test for LinuxVersion * IO_MUST_INVALIDATE_BROKEN_CHAIN can still be const
-
- Sep 13, 2021
-
-
Florian Fischer authored
This allows use to remove the current hack that the test are always build without NDEBUG regardless of the meson buildtype. Which is fact fixes the failing io tests in release builds. Because Future.hpp and Future.cpp see the same version of NDEBUG.
-
- Aug 19, 2021
-
-
Florian Fischer authored
-
- Aug 18, 2021
-
-
Florian Fischer authored
-
- Jul 29, 2021
-
-
Florian Fischer authored
-
- Jul 07, 2021
-
-
Florian Fischer authored
This allows the examination of stats which get printed in the Runtime destructor. Also remove useless stdlib includes (Why does iwyu not catch those?).
-
- Jul 06, 2021
-
-
Florian Fischer authored
Until kernel commit cf10960426515 io_uring submitted sqe until it encountered an invalid one. Now io_uring will catch the error on subimssion and will cancel all sqe's contained in the link prior to the invalid one.
-
- May 17, 2021
-
-
Florian Fischer authored
errno was never set on error and thus the DIE_MSG_ERRNO did not properly report what happened. Found during changing Future member types.
-
Florian Fischer authored
-
Florian Fischer authored
gcc 11.1 on my arch system complains that the calls to free does not match the allocator function new[].
-
- May 04, 2021
-
-
Florian Fischer authored
-
- Apr 13, 2021
-
-
Florian Fischer authored
* Improve warn message in Future::cancel() * Don't cancel a Future in the destructor if it was already cancelled or received * Restructure CancelFutureTest into single separate test cases With this I can not reproduce the weird CancelFutureTest behavior anymore neither SIGABRT nor the timeout.
-
Florian Schmaus authored
-
- 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
Allocate the Actor and the BPS on the heap as otherwise Fibers may access already destructed Actor data.
-
Florian Schmaus authored
This should, at least for the EXIT_SUCCESS case, fix #14.
-
Florian Schmaus authored
The test fixture will automatically assume that the test was successful if emperTest() returns.
-
Florian Schmaus authored
Resetting the Future on the last iteration may cause the assert that the Future was never awaited to trigger (which is in the Future's destructor).
-
Florian Schmaus authored
There was no reason that invokeTest() is part of the test-runner API.
-
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 23, 2021
-
-
Florian Fischer authored
Rename the macro used to build up the debug message, to better reflect its generality. It can be used anywhere to build a string with C++ stream formatting. std::string s = EMPER_BUILD_STR("foo = " << 1 " , bar = " << bar(42)); Since WDBG was the only log macro without a terminating newline, which was in fact broken according to flow, we can remove it and the new line handling code in the LOG macro.
-
- Mar 18, 2021
-
-
Florian Fischer authored
io_uring_submit does some inline error checking and consumes less cqes than prepared if an error is detected. Currently we just cancel the Futures, whose prepared sqes were not submitted. But this leaves already prepared sqes for those futures in the SQ of the io_uring which will be submitted the next time io_uring_submit is called. This results in a violation of the chain guaranty, that dependent operations are only executed if all dependencies were successful. Additionally this leads to double completions or memory corruption because the io_uring will produce cqes for already completed Futures. To prevent this from happening we track all sqes we prepared to invalidate and resubmit those which were not submitted because of a short submit. We invalidate sqes by preparing them as NOP instructions and set their user data to NULL. I took this approach instead of rewinding the ring or somethings like similar because it seemed safer for me not fiddle with io_uring internals and just be less efficient. Enable previously failing LinkFutureTest test cases.
-
Florian Fischer authored
Fix compilation error in LinkFutureTest where clsoe was used instead of closeAndWait.
-
- Mar 16, 2021
-
-
Florian Schmaus authored
-
Florian Fischer authored
Document the encountered failures in code comments.
-
Florian Fischer authored
This test resembles our EchoClient implementation using linked futures.
-
- Mar 13, 2021
-
-
Florian Fischer authored
-
- Mar 03, 2021
-
-
Florian Schmaus authored
-
- Feb 26, 2021
-
-
Florian Fischer authored
The emper header LockedUnboundedQueue.hpp could depend on different libraries according to the implementation. To link those dependencies with everything including LockedUnboundedQueue.hpp we propagate all emper_dependencies through emper_dep. And using emper_dep as a dependency seems anyway better than essentially writing down emper_dep manually each time. emper_dep essentially is: (link_with:emper, include_directories: emper_all_include)
-
- Feb 22, 2021
-
-
Florian Fischer authored
-
- Feb 20, 2021
-
-
Florian Fischer authored
-
- Feb 19, 2021
-
-
Florian Fischer authored
Using an AlarmFuture blocks the Fiber executing Actor::waitUntilIdle, freeing its current worker and thus preventing life-locks. Where all workers are sleeping except one. Which executes the Actor::waitUntilIdle Fiber causing a starvation of the actual Actor.
-
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
-