mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +00:00
initctl: the status views over D-Bus
The summary table, the per-service detail, JSON and the quiet and ident forms all read state Finit already publishes, so they read it from the bus like everything else rather than through a second path that has to be kept in step. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
ebc0ef62e6
commit
6310d9e760
16 files changed
+1271
-315
No files matched your search
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# libink: introspection XML well-formedness.
|
||||
#
|
||||
# Covers compound type signatures in generated introspection XML:
|
||||
# Cond1.Dump declares out_sig "a(ss)", which must appear as a single
|
||||
# <arg>, not one <arg> per signature character.
|
||||
|
||||
set -eu
|
||||
|
||||
TEST_DIR=$(dirname "$0")
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/setup.sh"
|
||||
# shellcheck source=/dev/null
|
||||
. "$TEST_DIR/lib/dbus-setup.sh"
|
||||
|
||||
say "Introspect on /org/finit/cond"
|
||||
xml=$(texec "$CLIENT" introspect "$BUS" /org/finit/cond)
|
||||
|
||||
say "Cond1.Dump advertises a single a(ss) out arg"
|
||||
case "$xml" in
|
||||
*'<arg type="a(ss)" direction="out"/>'*) assert "a(ss) intact" 0 -eq 0 ;;
|
||||
*) fail "a(ss) not found as a single arg" ;;
|
||||
esac
|
||||
|
||||
say "No per-character type fragments in the XML"
|
||||
case "$xml" in
|
||||
*'type="("'* | *'type=")"'* | *'type="{"'* | *'type="}"'* | *'type="a"'*)
|
||||
fail "per-character <arg> fragment leaked" ;;
|
||||
*) assert "no bracket/array fragments" 0 -eq 0 ;;
|
||||
esac
|
||||
Reference in new issue
Block a user