-
Notifications
You must be signed in to change notification settings - Fork 2
/
quark-test.8
86 lines (83 loc) · 1.73 KB
/
quark-test.8
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.Dd $Mdocdate$
.Dt QUARK-TEST 8
.Os
.Sh NAME
.Nm quark-test
.Nd quark's test utility
.Sh SYNOPSIS
.Nm quark-test
.Op Fl bkv
.Op Ar tests ...
.Nm quark-test
.Fl h
.Nm quark-test Fl l
.Nm quark-test Fl N
.Nm quark-test Fl V
.Sh DESCRIPTION
The
.Nm
program runs tests for
.Xr quark 7 .
It is designed as one big fat binary so that you can easily run it with quark's
custom
.Pa initramfs.gz .
Without any arguments,
.Nm
will run all tests in both KPROBE and EBPF as backend.
.Pp
Each test runs a separate sub-process in order to avoid address space
contaminaton between two tests.
The number of failed tests is the return value of
.Nm .
.Pp
The options are as follows:
.Bl -tag -width Dtb
.It Fl b
Run only EBPF tests.
.It Fl h
Display this manpage.
.It Fl k
Run only KPROBE tests.
.It Fl l
Prints all available tests on stdout.
.It Fl N
This is a nop flag, literally,
.Nm
will just exit with 0. Some tests must fork and exec things in order to collect
events, this keeps the binary self contained by forking and execing itself as we
don't have access to system utilities in
.Pa initramfs.gz .
.It Fl v
Increase
.Em quark_verbose ,
can be issued multiple times.
.It Fl V
Print version and exit.
.El
.Sh EXIT STATUS
.Nm
exits with the number of failed tests, or non-zero if
.Nm
itself fails.
.Sh EXAMPLES
.Bd -literal
$ quark-test -k
t_probe @ kprobe: ok
t_fork_exec_exit @ kprobe: ok
failed tests 0
$ quark-test t_fork_exec_exit
t_fork_exec_exit @ ebpf: ok
t_fork_exec_exit @ kprobe: ok
failed tests 0
.Ed
.Sh SEE ALSO
.Xr quark_event_dump 3 ,
.Xr quark_process_lookup 3 ,
.Xr quark_queue_block 3 ,
.Xr quark_queue_close 3 ,
.Xr quark_queue_get_epollfd 3 ,
.Xr quark_queue_get_event 3 ,
.Xr quark_queue_get_stats 3 ,
.Xr quark_queue_open 3 ,
.Xr quark-btf 8 ,
.Xr quark-mon 8