summaryrefslogtreecommitdiff
path: root/tests/cram/test_ubus.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cram/test_ubus.t')
-rw-r--r--tests/cram/test_ubus.t58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/cram/test_ubus.t b/tests/cram/test_ubus.t
new file mode 100644
index 0000000..e4ba87f
--- /dev/null
+++ b/tests/cram/test_ubus.t
@@ -0,0 +1,58 @@
+set environment for convenience:
+
+ $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
+ $ alias ubus='valgrind --quiet --leak-check=full ubus'
+
+check usage:
+
+ $ ubus
+ Usage: ubus [<options>] <command> [arguments...]
+ Options:
+ -s <socket>:\t\tSet the unix domain socket to connect to (esc)
+ -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
+ -S:\t\t\tUse simplified output (for scripts) (esc)
+ -v:\t\t\tMore verbose output (esc)
+ -m <type>:\t\t(for monitor): include a specific message type (esc)
+ \t\t\t(can be used more than once) (esc)
+ -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
+
+ Commands:
+ - list [<path>]\t\t\tList objects (esc)
+ - call <path> <method> [<message>]\tCall an object method (esc)
+ - listen [<path>...]\t\t\tListen for events (esc)
+ - send <type> [<message>]\t\tSend an event (esc)
+ - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
+ - monitor\t\t\t\tMonitor ubus traffic (esc)
+
+ [1]
+
+ $ ubus-san
+ Usage: ubus-san [<options>] <command> [arguments...]
+ Options:
+ -s <socket>:\t\tSet the unix domain socket to connect to (esc)
+ -t <timeout>:\t\tSet the timeout (in seconds) for a command to complete (esc)
+ -S:\t\t\tUse simplified output (for scripts) (esc)
+ -v:\t\t\tMore verbose output (esc)
+ -m <type>:\t\t(for monitor): include a specific message type (esc)
+ \t\t\t(can be used more than once) (esc)
+ -M <r|t>\t\t(for monitor): only capture received or transmitted traffic (esc)
+
+ Commands:
+ - list [<path>]\t\t\tList objects (esc)
+ - call <path> <method> [<message>]\tCall an object method (esc)
+ - listen [<path>...]\t\t\tListen for events (esc)
+ - send <type> [<message>]\t\tSend an event (esc)
+ - wait_for <object> [<object>...]\tWait for multiple objects to appear on ubus (esc)
+ - monitor\t\t\t\tMonitor ubus traffic (esc)
+
+ [1]
+
+check monitor command:
+
+ $ ubus monitor
+ Failed to connect to ubus
+ [255]
+
+ $ ubus-san monitor
+ Failed to connect to ubus
+ [255]