This patch is supposed to fix the following problem:
```
Start 234: unittest-seastar-errorator
216/258 Test #234: unittest-seastar-errorator ................Child aborted***Exception: 0.95 sec
WARNING: debug mode. Not for benchmarking or production
WARN 2022-01-11 10:01:32,973 [shard 0] seastar - Creation of perf_event based stall detector failed, falling back to posix timer: std::system_error (error system:13, perf_event_open() failed: Permission denied)
unittest-seastar-errorator: ../src/test/crimson/seastar_runner.h:45: int SeastarRunner::init(int, char **): Assertion `begin_signaled == true' failed.
Aborting.
Backtrace:
0xb3397a
0x1d19430
0x1d1905d
0x1b72332
0x1b9dd95
0x1c75fe9
0x1c76231
0x1c7605a
0x7f20b7aee3bf
/lib/x86_64-linux-gnu/libc.so.6+0x4618a
/lib/x86_64-linux-gnu/libc.so.6+0x25858
/lib/x86_64-linux-gnu/libc.so.6+0x25728
/lib/x86_64-linux-gnu/libc.so.6+0x36f35
0xc8bb88
0xc7ec71
/lib/x86_64-linux-gnu/libc.so.6+0x270b2
0xafc95d
```
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
auto ret = app.run(argc, argv, [this] {
on_end.reset(new seastar::readable_eventfd);
return seastar::now().then([this] {
+ begin_signaled = true;
auto r = ::eventfd_write(begin_fd.get(), APP_RUNNING);
assert(r == 0);
- begin_signaled = true;
return seastar::now();
}).then([this] {
return on_end->wait().then([](size_t){});
std::cerr << "Seastar app returns " << ret << std::endl;
}
if (!begin_signaled) {
- ::eventfd_write(begin_fd.get(), APP_NOT_RUN);
begin_signaled = true;
+ ::eventfd_write(begin_fd.get(), APP_NOT_RUN);
}
}