/
githubmirror
/
numactl
Обзор
Документация
Войти
/
githubmirror
/
numactl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/regress-io
47 строк
916 B
Filipe Brandenburger
test: make test scripts run from any location.
06 авг 2014, 02:49
06 авг 2014, 02:49
25c052a
Код
Авторство
О чём код?
#!/bin/bash # test IO affinity parsing # tests may fail depending on machine setup testdir=`dirname "$0"` : ${srcdir:=${testdir}/..} : ${builddir:=${srcdir}} export PATH=${builddir}:$PATH E=0 check() { echo testing $@ if "$@" ; then true else echo failed E=1 fi } fail() { echo testing failure of $@ if "$@" ; then echo failed E=1 else true fi } check "${builddir}/test/node-parse" file:. check "${builddir}/test/node-parse" ip:8.8.8.8 fail "${builddir}/test/node-parse" ip:127.0.0.1 IF=$(ip link ls | grep eth | cut -d: -f2 | head -1) check "${builddir}/test/node-parse" "netdev:$IF" fail "${builddir}/test/node-parse" netdev:lo DEV=$(df | awk '/\/$/ { print $1 }') check "${builddir}/test/node-parse" file:$DEV check "${builddir}/test/node-parse" block:$(basename $DEV) check "${builddir}/test/node-parse" pci:0:0.0 if [ "$E" = 0 ] ; then echo SUCCESS ; else echo FAILURE ; fi exit $E