test: add unit tests for system services

Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
Richard Alpe
2025-10-28 16:59:08 +01:00
parent cc86463233
commit b6d7e4f24e
3 changed files with 167 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
NAME STATUS PID DESCRIPTION
udevd running 1185 Device event daemon (udev)
dbus running 2248 D-Bus message bus daemon
confd running 3039 Configuration daemon
netopeer running 3548 NETCONF server
dnsmasq running 2249 DHCP/DNS proxy
tty:hvc0 running 3559 Getty on hvc0
iitod running 2340 LED daemon
klishd running 3560 CLI backend daemon
mdns-alias running 3617 mDNS alias advertiser
mstpd stopped - Spanning Tree daemon
rauc running 3564 Software update service
resolvconf done - Update DNS configuration
statd running 3472 Status daemon
staticd running 3653 Static routing daemon
syslogd running 2241 System log daemon
watchdogd running 2242 System watchdog daemon
zebra running 3587 Zebra routing daemon
mdns running 3616 Avahi mDNS-SD daemon
chronyd running 3618 Chrony NTP v3/v4 daemon
lldpd running 3633 LLDP daemon (IEEE 802.1ab)
nginx running 3635 Web server
rousette running 3636 RESTCONF server
sshd running 3641 OpenSSH daemon
+142
View File
@@ -80,6 +80,148 @@
]
}
},
"infix-system:services": {
"service": [
{
"description": "Device event daemon (udev)",
"name": "udevd",
"pid": 1185,
"status": "running"
},
{
"description": "D-Bus message bus daemon",
"name": "dbus",
"pid": 2248,
"status": "running"
},
{
"description": "Configuration daemon",
"name": "confd",
"pid": 3039,
"status": "running"
},
{
"description": "NETCONF server",
"name": "netopeer",
"pid": 3548,
"status": "running"
},
{
"description": "DHCP/DNS proxy",
"name": "dnsmasq",
"pid": 2249,
"status": "running"
},
{
"description": "Getty on hvc0",
"name": "tty:hvc0",
"pid": 3559,
"status": "running"
},
{
"description": "LED daemon",
"name": "iitod",
"pid": 2340,
"status": "running"
},
{
"description": "CLI backend daemon",
"name": "klishd",
"pid": 3560,
"status": "running"
},
{
"description": "mDNS alias advertiser ",
"name": "mdns-alias",
"pid": 3617,
"status": "running"
},
{
"description": "Spanning Tree daemon",
"name": "mstpd",
"pid": 0,
"status": "stopped"
},
{
"description": "Software update service",
"name": "rauc",
"pid": 3564,
"status": "running"
},
{
"description": "Update DNS configuration",
"name": "resolvconf",
"pid": 0,
"status": "done"
},
{
"description": "Status daemon",
"name": "statd",
"pid": 3472,
"status": "running"
},
{
"description": "Static routing daemon",
"name": "staticd",
"pid": 3653,
"status": "running"
},
{
"description": "System log daemon",
"name": "syslogd",
"pid": 2241,
"status": "running"
},
{
"description": "System watchdog daemon",
"name": "watchdogd",
"pid": 2242,
"status": "running"
},
{
"description": "Zebra routing daemon",
"name": "zebra",
"pid": 3587,
"status": "running"
},
{
"description": "Avahi mDNS-SD daemon",
"name": "mdns",
"pid": 3616,
"status": "running"
},
{
"description": "Chrony NTP v3/v4 daemon",
"name": "chronyd",
"pid": 3618,
"status": "running"
},
{
"description": "LLDP daemon (IEEE 802.1ab)",
"name": "lldpd",
"pid": 3633,
"status": "running"
},
{
"description": "Web server",
"name": "nginx",
"pid": 3635,
"status": "running"
},
{
"description": "RESTCONF server",
"name": "rousette",
"pid": 3636,
"status": "running"
},
{
"description": "OpenSSH daemon",
"name": "sshd",
"pid": 3641,
"status": "running"
}
]
},
"infix-system:software": {
"boot-order": [
"primary",
+1
View File
@@ -8,6 +8,7 @@ gen_iface=d3a
cli_commands="show-ntp"
cli_commands="$cli_commands show-software"
cli_commands="$cli_commands show-hardware"
cli_commands="$cli_commands show-services"
. $(readlink -f $(dirname $0)/../test.sh)
main "$@"