24 #include <esdm-debug.h>
27 void etest_gen_buffer(
int dims, int64_t bounds[], uint64_t ** out_buff);
28 int etest_verify_buffer(
int dims, int64_t bounds[], uint64_t * buff);
29 void etest_memset_buffer(
int dims, int64_t bounds[], uint64_t * buff);
38 #define eassert_crash(call)
40 #define eassert_crash(call) do { \
41 printf("checking for expected crash...\n"); \
42 pid_t child = fork(); \
45 pid_t result = waitpid(child, &status, 0); \
46 eassert(result == child); \
47 eassert(WIFSIGNALED(status)); \
52 printf("... OK, child crashed successfully\n"); \
59 #define eassert_bailout(call) do { \
60 printf("checking for expected error...\n"); \
61 pid_t child = fork(); \
64 pid_t result = waitpid(child, &status, 0); \
65 eassert(result == child); \
66 eassert(WIFEXITED(status)); \
67 eassert(WEXITSTATUS(status)); \
72 printf("... OK, child exited with an error\n"); \