Skip to content
Snippets Groups Projects
Verified Commit ef4b09f6 authored by Martin Matějek's avatar Martin Matějek
Browse files

wip: refactor test mocks

parent bc1a7d0f
Branches refactor-tests
No related merge requests found
Pipeline #64559 passed with stage
in 1 minute and 3 seconds
......@@ -5,5 +5,115 @@ list running processes
"
run () {
busybox ps w
output=$(cat << EOF
PID USER VSZ STAT COMMAND
1 root 1584 S /sbin/procd
2 root 0 SW [kthreadd]
4 root 0 IW< [kworker/0:0H]
6 root 0 IW< [mm_percpu_wq]
7 root 0 SW [ksoftirqd/0]
8 root 0 IW [rcu_sched]
9 root 0 IW [rcu_bh]
10 root 0 SW [migration/0]
11 root 0 SW [cpuhp/0]
12 root 0 SW [cpuhp/1]
13 root 0 SW [migration/1]
14 root 0 SW [ksoftirqd/1]
16 root 0 IW< [kworker/1:0H]
17 root 0 SW [kdevtmpfs]
18 root 0 IW< [netns]
220 root 0 SW [oom_reaper]
221 root 0 IW< [writeback]
223 root 0 SW [kcompactd0]
224 root 0 IW< [crypto]
225 root 0 IW< [kblockd]
235 root 0 IW< [ata_sff]
261 root 0 IW< [watchdogd]
410 root 0 SW [kswapd0]
498 root 0 IW< [pencrypt]
500 root 0 IW< [pdecrypt]
604 root 0 SW [spi0]
754 root 0 IW< [kworker/1:1H]
781 root 0 IW< [ipv6_addrconf]
782 root 0 IW< [dsa_ordered]
813 root 0 SW [irq/42-d0032004]
814 root 0 SW [irq/50-mv88e6xx]
815 root 0 SW [irq/67-mv88e6xx]
833 root 0 SW [irq/53-!soc!int]
837 root 0 SW [irq/54-!soc!int]
841 root 0 SW [irq/55-!soc!int]
845 root 0 SW [irq/56-!soc!int]
859 root 0 SW [irq/21-mmc0]
864 root 0 SW [irq/22-mmc1]
869 root 0 SW [irq/68-d00d8000]
871 root 0 SW [hwrng]
879 root 0 SW [mmcqd/1]
885 root 0 IW< [btrfs-worker]
887 root 0 IW< [btrfs-worker-hi]
888 root 0 IW< [btrfs-delalloc]
889 root 0 IW< [btrfs-flush_del]
890 root 0 IW< [btrfs-cache]
891 root 0 IW< [btrfs-submit]
892 root 0 IW< [btrfs-fixup]
893 root 0 IW< [btrfs-endio]
894 root 0 IW< [btrfs-endio-met]
895 root 0 IW< [btrfs-endio-met]
896 root 0 IW< [btrfs-endio-rai]
897 root 0 IW< [btrfs-endio-rep]
898 root 0 IW< [btrfs-rmw]
899 root 0 IW< [btrfs-endio-wri]
900 root 0 IW< [btrfs-freespace]
901 root 0 IW< [btrfs-delayed-m]
902 root 0 IW< [btrfs-readahead]
903 root 0 IW< [btrfs-qgroup-re]
904 root 0 IW< [btrfs-extent-re]
905 root 0 SW [btrfs-cleaner]
906 root 0 SW [btrfs-transacti]
907 root 0 IW< [kworker/0:1H]
912 root 0 SW [irq/69-gpio-key]
917 root 0 IW< [uas]
951 root 0 IW [kworker/0:3]
1139 root 1184 S /sbin/ubusd
1238 root 0 IW< [cfg80211]
1439 root 0 SW< [krfcommd]
2016 root 1308 S watchdog -T 30 -t 5 /dev/watchdog
2035 root 3532 S {8} /sbin/rpcd -s /var/run/ubus.sock -t 30
2190 root 1768 S /sbin/netifd
2284 root 1436 S /usr/sbin/odhcpd
2324 nobody 928 S /usr/sbin/atd -f
2640 root 4084 S /usr/sbin/sshd -D
3354 mosquitt 5040 S mosquitto -c /var/etc/fosquitto.generated.conf
3430 root 27052 S {foris-ws} /usr/bin/python3 /usr/bin/foris-ws -a ubus filesystem --host 127.0.0.1 --port 9080 mqtt --mqtt
3829 root 1308 S udhcpc -p /var/run/udhcpc-eth0.pid -s /lib/netifd/dhcp.script -f -t 0 -i eth0 -x hostname:turris -C -O 21
4259 root 5852 S /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
4341 dnsmasq 2780 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c.pid
4344 root 2704 S /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf.cfg01411c -k -x /var/run/dnsmasq/dnsmasq.cfg01411c.pid
4430 root 1432 S /usr/sbin/umdns
4477 root 1796 S /usr/sbin/crond -n -P -m off -s
4494 root 30536 S {dev-detect-daem} /usr/bin/python3 /usr/bin/dev-detect-daemon
4582 root 4684 S /usr/sbin/openvpn --syslog openvpn(server_turris) --status /var/run/openvpn.server_turris.status --cd /va
4789 root 55836 S python3 -m haas_proxy --pidfile=/var/run/haas-proxy.pid --nodaemon haas_proxy --log-level=warning --devic
5057 root 51572 S /usr/bin/kresd --noninteractive -c /tmp/kresd.config /tmp/kresd -a 0.0.0.0#53 -a ::#53
5184 root 35028 S {foris} /usr/bin/python3 /usr/bin/foris -s flup -a config -b mqtt --mqtt-host localhost --mqtt-port 11883
6174 root 43876 S {foris-controlle} /usr/bin/python3 /usr/bin/foris-controller -b openwrt -C /var/run/foris-controller-clie
6186 root 30528 S {foris-controlle} /usr/bin/python3 /usr/bin/foris-controller -b openwrt -C /var/run/foris-controller-clie
6188 root 30960 S {foris-controlle} /usr/bin/python3 /usr/bin/foris-controller -b openwrt -C /var/run/foris-controller-clie
6230 root 42704 S {foris-controlle} /usr/bin/python3 /usr/bin/foris-controller -b openwrt -C /var/run/foris-controller-clie
6256 root 1316 S /bin/ash --login
6971 root 12464 S /usr/sbin/syslog-ng --foreground
8731 root 0 IW< [kworker/u5:2]
9674 root 0 IW [kworker/0:0]
16342 root 0 IW [kworker/1:1]
16993 root 0 IW [kworker/u4:4]
17504 root 0 IW [kworker/1:2]
17886 root 0 IW [kworker/1:0]
17990 root 4112 R sshd: root@pts/0
18001 root 1316 S -ash
18028 root 1308 R busybox ps w
24993 root 0 IW [kworker/u4:1]
26528 root 0 IW< [kworker/u5:1]
30176 root 1308 S< /sbin/ntpd -n -N -S /usr/sbin/ntpd-hotplug -p 217.31.202.100 -p 195.113.144.201 -p 195.113.144.238 -p 200
EOF
)
echo "$output"
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment