summaryrefslogtreecommitdiff
path: root/tests/setup_devd_test
blob: c7ce246bb8765222e6d1ad826e07aace32b577dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env atf-sh

. $(atf_get_srcdir)/test_env.sh
init_tests \
	setup_devd_usage \
	setup_devd_mdev \
	setup_devd_mdevd \
	setup_devd_udev

setup_devd_usage_body() {
	test_usage setup-devd
}

setup_devd_mdev_body() {
	init_env
	rc-service mdev start
	atf_check -s exit:0 \
		-o empty \
		-e empty \
		setup-devd mdev
}

setup_devd_mdevd_body() {
	init_env
	rc-service mdev start
	atf_check -s exit:0 \
		-o match:"apk add.*mdevd" \
		-o match:"Starting mdevd" \
		-e empty \
		setup-devd mdevd
}

setup_devd_udev_body() {
	init_env
	rc-service mdev start
	atf_check -s exit:0 \
		-o match:"apk add.*eudev" \
		-o match:"Starting udev" \
		-o match:"Starting udev-trigger" \
		-o match:"Starting udev-settle" \
		-o match:"Starting udev-postmount" \
		-e empty \
		setup-devd udev
}