summaryrefslogtreecommitdiff
path: root/t/t0003-writer-init-error-path.bash
blob: 1303ca46d71259d2e15c8414eb1b07cb9cab611c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

test_description='Check if alsa_init() failures are handled gracefully.

Older paraslash versions contained a bug which caused para_write and para_audiod
to abort if the alsa/oss device could not be opened. This test makes sure we
will not introduce the same bug again.'

. ${0%/*}/test-lib.bash

for i in alsa oss; do
	test_require_objects "${i}_write"
	missing_objects="$result"
	if [[ -n "$missing_objects" ]]; then
		test_skip "$i" "missing object(s): $missing_objects"
		continue
	fi
	test_expect_failure "$i" "
		head -c 100 /dev/zero | $PARA_WRITE -w '$i -d /dev/non_existent'
		"
done
test_done