libqb/tests/resources.test
Jan Pokorný 8cc165a87b
tests: resources: check for proper names of leftover processes
Unfortunately, the change in test names introduced with commit e990681
hadn't been reflected (until now).

Also reformat shell syntax per more usual convention.
2016-10-07 21:14:07 +02:00

20 lines
318 B
Bash
Executable File

#!/bin/sh
RETURN=0
for d in /dev/shm /var/run; do
ls $d/qb-test* 2>/dev/null
if [ $? -eq 0 ]; then
echo
echo "Error: shared memory segments not closed/unlinked"
echo
RETURN=1
fi
done
ps aux | grep -v grep | grep -E 'lt-.*\.test'
if [ $? -eq 0 ]; then
echo "test program frozen"
RETURN=1
fi
exit $RETURN