# Exit status to return at the end. Set in case one of the tests fails.
EXIT_STATUS=0 # Per-test return value. Clear at the beginning of each test.
RET=0
check_err()
{
local err=$1
if [[ $RET -eq 0 && $err -ne 0 ]]; then
RET=$err fi
}
log_test()
{
local test_name=$1
if [[ $RET -ne 0 ]]; then
EXIT_STATUS=1
printf "TEST: %-60s [FAIL]\n""$test_name"
return 1 fi
printf "TEST: %-60s [ OK ]\n""$test_name"
return 0
}
tests_run()
{
local current_test
for current_test in ${TESTS:-$ALL_TESTS}; do
$current_test done
}
res=$(phc_ctl $DEV set 0 wait 120.5 get 2> /dev/null \
| awk '/clock time is/{print $5}' \
| awk -F. '{print $1}')
(( res == 120 ))
}
adjtime_do()
{
local res
res=$(phc_ctl $DEV set 0 adj 10 get 2> /dev/null \
| awk '/clock time is/{print $5}' \
| awk -F. '{print $1}')
(( res == 10 ))
}
adjfreq_do()
{
local res
# Set the clock to be 1% faster
res=$(phc_ctl $DEV freq 10000000 set 0 wait 100.5 get 2> /dev/null \
| awk '/clock time is/{print $5}' \
| awk -F. '{print $1}')
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.