local.mk.sample: add a hint for TMPDIR
[rainbows.git] / t / t0012-spurious-wakeups-quiet.sh
blob23557b7cf94e9be75c6db1208a4960821055c140
1 #!/bin/sh
2 nr=${nr-4}
3 . ./test-lib.sh
5 # ApacheBench (ab) is commonly installed in the sbin paths in Debian-based
6 # systems...
7 AB="$(which ab 2>/dev/null || :)"
8 if test -z "$AB"
9 then
10 AB=$(PATH=/usr/local/sbin:/usr/sbin:$PATH which ab 2>/dev/null || :)
13 if test -z "$AB"
14 then
15 t_info "skipping $T since 'ab' could not be found"
16 exit 0
19 t_plan 4 "quiet spurious wakeups for $model"
21 t_begin "setup and start" && {
22 rainbows_setup $model
23 echo "preload_app true" >> $unicorn_config
24 echo "worker_processes $nr" >> $unicorn_config
25 rainbows -D env.ru -c $unicorn_config -E none
26 rainbows_wait_start
29 t_begin "spam the server with requests" && {
30 $AB -c1 -n100 http://$listen/
33 t_begin "killing succeeds" && {
34 kill -QUIT $rainbows_pid
37 t_begin "check stderr" && {
38 check_stderr
41 t_done