Update
CI / GCC 16 / C++26 / werror (push) Failing after 3m9s
CI / GCC 16 / C++26 / sanitizers (push) Failing after 10m15s
CI / GCC 16 / C++26 / default (push) Failing after 13m1s

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-20 01:18:53 +03:00
1 parent 8583a479dd
commit 3851aeb703
42 files changed
+6948 -759

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#include <Void/System/SignalWatcher.hpp>
#include <Void/Testing/Assert.hpp>
#include <Void/Testing/Test.hpp>
#include <chrono>
#include <csignal>
Void::Testing::Test signal_watcher_polls_and_receives_blocked_signal()
{
#ifdef __linux__
auto watcher = Void::Process::SignalWatcher::create({SIGUSR1});
Void::Testing::require(watcher.has_value());
auto empty = watcher->poll();
Void::Testing::require(empty.has_value());
Void::Testing::expect(!empty->has_value());
Void::Testing::require(::raise(SIGUSR1) == 0);
auto received = watcher->wait(std::chrono::milliseconds{100});
Void::Testing::require(received.has_value());
Void::Testing::require(received->has_value());
Void::Testing::expect_eq(**received, SIGUSR1);
#endif
}