add fuzzer and cram based unit tests
[oweals/ubus.git] / tests / cram / test_ubus.t
1 set environment for convenience:
2
3   $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
4   $ alias ubus='valgrind --quiet --leak-check=full ubus'
5
6 check usage:
7
8   $ ubus
9   Usage: ubus [<options>] <command> [arguments...]
10   Options:
11    -s <socket>:\t\tSet the unix domain socket to connect to (esc)
12    -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
13    -S:\t\t\tUse simplified output (for scripts) (esc)
14    -v:\t\t\tMore verbose output (esc)
15    -m <type>:\t\t(for monitor): include a specific message type (esc)
16   \t\t\t(can be used more than once) (esc)
17    -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
18   
19   Commands:
20    - list [<path>]\t\t\tList objects (esc)
21    - call <path> <method> [<message>]\tCall an object method (esc)
22    - listen [<path>...]\t\t\tListen for events (esc)
23    - send <type> [<message>]\t\tSend an event (esc)
24    - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
25    - monitor\t\t\t\tMonitor ubus traffic (esc)
26   
27   [1]
28
29   $ ubus-san
30   Usage: ubus-san [<options>] <command> [arguments...]
31   Options:
32    -s <socket>:\t\tSet the unix domain socket to connect to (esc)
33    -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
34    -S:\t\t\tUse simplified output (for scripts) (esc)
35    -v:\t\t\tMore verbose output (esc)
36    -m <type>:\t\t(for monitor): include a specific message type (esc)
37   \t\t\t(can be used more than once) (esc)
38    -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
39   
40   Commands:
41    - list [<path>]\t\t\tList objects (esc)
42    - call <path> <method> [<message>]\tCall an object method (esc)
43    - listen [<path>...]\t\t\tListen for events (esc)
44    - send <type> [<message>]\t\tSend an event (esc)
45    - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
46    - monitor\t\t\t\tMonitor ubus traffic (esc)
47   
48   [1]
49
50 check monitor command:
51
52   $ ubus monitor
53   Failed to connect to ubus
54   [255]
55
56   $ ubus-san monitor
57   Failed to connect to ubus
58   [255]