Commit f2281308 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Merge branch 'cancel-future-test-add-assert-msg' into 'master'

add assert message in future callback

See merge request i4/manycore/emper!369
parents 5537bde5 67418925
......@@ -5,6 +5,7 @@
#include <cerrno> // for ECANCELED, ETIME
#include <cstdint> // for uint64_t, int32_t
#include <memory>
#include <ostream>
#include "Common.hpp"
#include "CountingPrivateSemaphore.hpp"
......@@ -26,7 +27,9 @@ uint64_t write_buf = 42;
static void cancelSubmittedCallback() {
ReadFuture readFuture(efd, &read_buf, sizeof(read_buf), 0);
readFuture.setCallback([](int32_t res) { ASSERT(res == -ECANCELED) });
readFuture.setCallback([](int32_t res) {
ASSERT_MSG(res == -ECANCELED, "Expected res == -ECANCELED, got " << res);
});
readFuture.submit();
int32_t res = readFuture.cancel();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment