blob: 5037e1a2067e48b2848fab9e986edabb4d9702e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#pragma once
#include <camellia/syscalls.h>
#include <stdio.h>
#include <stdlib.h>
#define TMPFILEPATH "/tmp/.test_internal"
void run_test(void (*fn)());
void r_k_fdlimit(void);
void r_k_fs(void);
void r_k_misc(void);
void r_k_miscsyscall(void);
void r_k_path(void);
void r_k_threads(void);
void r_libc_esemaphore(void);
void r_libc_setjmp(void);
void r_libc_string(void);
void r_s_printf(void);
void r_s_ringbuf(void);
extern FILE *fail_trig;
int forkpipe(FILE **f, hid_t *h);
#define argify(str) str, sizeof(str) - 1
#define test_fail() do { \
fprintf(fail_trig, "%s():%u", __func__, __LINE__); \
fflush(fail_trig); \
exit(0); \
} while (0)
#define test_failf(fmt, ...) do { \
fprintf(fail_trig, "%s():%u " fmt, __func__, __LINE__, __VA_ARGS__); \
fflush(fail_trig); \
exit(0); \
} while (0)
#define test(cond) if (!(cond)) test_fail();
|