Commit 7944d547 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

New file: Test the parsing of "timeval" entries in the configuration

file.
parent 7d01eab9
# Test suite for lyskomd.
# Copyright (C) 2003 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
# Test the parsing of "timeval" entries in the configuration file.
lyskomd_start
client_start 0
talk_to client 0
send "A0H\n"
simple_expect "LysKOM"
if {$debug_calls == 0} {
unsupported "enable value testing with configure --with-debug-calls"
} else {
send "1 1006\n"
talk_to lyskomd
simple_expect "Configuration timeval dump"
simple_expect "Name: Garb busy postponement"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 0"
simple_expect " Microseconds: 20000"
simple_expect "Name: Garb timeout"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 0"
simple_expect " Microseconds: 100000"
simple_expect "Name: Sync timeout"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 0"
simple_expect " Microseconds: 0"
simple_expect "Name: Garb interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 86400"
simple_expect " Microseconds: 0"
simple_expect "Name: Sync interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 300"
simple_expect " Microseconds: 0"
simple_expect "Name: Sync retry interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 60"
simple_expect " Microseconds: 0"
simple_expect "End of timeval dump"
talk_to client 0
simple_expect "=1"
}
system "kill -HUP $lyskomd_pid"
client_death 0
lyskomd_death "" signal
lyskomd_start "" "Garb busy postponement: 1 microfortnight
Garb timeout: 1us
Sync timeout: 10 us
Garb interval: 4
Sync interval: 4 days
Sync retry interval: 2.25 second"
client_start 0
talk_to client 0
send "A0H\n"
simple_expect "LysKOM"
if {$debug_calls} {
send "1 1006\n"
talk_to lyskomd
simple_expect "Configuration timeval dump"
simple_expect "Name: Garb busy postponement"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 1"
simple_expect " Microseconds: 209600"
simple_expect "Name: Garb timeout"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 0"
simple_expect " Microseconds: 1"
simple_expect "Name: Sync timeout"
simple_expect " Default suffix: milliseconds"
simple_expect " Seconds: 0"
simple_expect " Microseconds: 10"
simple_expect "Name: Garb interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 240"
simple_expect " Microseconds: 0"
simple_expect "Name: Sync interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 345600"
simple_expect " Microseconds: 0"
simple_expect "Name: Sync retry interval"
simple_expect " Default suffix: minutes"
simple_expect " Seconds: 2"
simple_expect " Microseconds: 250000"
simple_expect "End of timeval dump"
talk_to client 0
simple_expect "=1"
}
system "kill -HUP $lyskomd_pid"
client_death 0
lyskomd_death "" signal
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment