Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
96db7e40
Commit
96db7e40
authored
Aug 19, 2003
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
New file: Test parsing a broken aux-item file as a result of SIGWINCH.
parent
6e549028
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server/testsuite/lyskomd.0/46.exp
+111
-0
111 additions, 0 deletions
src/server/testsuite/lyskomd.0/46.exp
with
111 additions
and
0 deletions
src/server/testsuite/lyskomd.0/46.exp
0 → 100644
+
111
−
0
View file @
96db7e40
# 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 report bugs at http://bugzilla.lysator.liu.se/.
# Test parsing a broken aux-item file as a result of SIGWINCH.
set auxfile "lyskomd.0/aux-items-46.conf"
system "cp $aux_item_default_conf_file $auxfile"
lyskomd_start "$auxfile"
# Log in as admin, and enable.
client_start 5
send "A[holl "five"]\n"
simple_expect "LysKOM" "connected"
send "1000 80 0 { }\n"
simple_expect "=1000"
send "1001 0 5 [holl "gazonk"]\n"
simple_expect "=1001"
send "1002 42 255\n"
simple_expect "=1002"
send "1003 96\n"
simple_expect "=1003 40 { 10104 10103 10102 10101 10100 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 }"
# Create a broken aux-item file. A mistake can happen so easily...
system "cp $srcdir/lyskomd.0/aux-items-bad.conf $auxfile"
system "kill -WINCH $lyskomd_pid"
talk_to lyskomd
# FIXME (bug 1094): the error message from yyerror() isn't sent via
# kom_log, so there is no leading timestamp on this line. So we
# cannot use extracting_expect.
set test "syntax error diagnosed"
expect {
-re "^/$any*/src/server/testsuite/lyskomd\\.0/aux-items-46\\.conf: ($any_num): parse error, unexpected ID$nl" {
set lineno "$expect_out(1,string)"
pass "$test"
}
timeout {fail "$test (timeout)"}
eof {fail "$test (eof)"; wait}
full_buffer {fail "$test (full_buffer)"}
}
unset test
setup_xfail "*-*-*" "Bug 1093"
set test "line numbers are reset"
if {$lineno < 20} {
pass "$test"
} else {
fail "$test (got insangely large line number $lineno)"
}
unset test
simple_expect "Errors reading aux-item definition file"
set dying 0
set test "Doing something predictable when reading bad aux-item file"
expect {
-re "^${line_leader}Signal WINCH received. aux definitions reloaded.$nl" {
pass "$test (server surviving)"
}
-re "^${line_leader}Previous message is fatal\\. Will dump core now\\.$nl" {
pass "$test (server aborting)"
set dying 1
}
}
unset test
set reason 5
setup_xfail "*-*-*" "Bug 1095"
set test "server survives broken aux-item file"
if {$dying} {
set reason "restart_kom"
fail "$test (server dies)"
} else {
pass "$test"
}
unset test
if {$reason == 5} {
send "1002 96\n"
simple_expect "=1002 0 { }"
# Shut down.
send "1041 44 0\n"
simple_expect "=1041"
}
lyskomd_death "" "$reason"
client_death 5
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment