forked from rsyslog/librelp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rsyslog#144 from rgerhards/chk-errreporting
testbench: check functionality for pUsr handling
- Loading branch information
Showing
8 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
|
||
import socket | ||
import os | ||
|
||
port = int(os.environ['TESTPORT']) | ||
print "dummyclient info: opening and closing port " + str(port) + " without sending data" | ||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
s.connect(("127.0.0.1", port)) | ||
s.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
# checks if server handles connection request by clients which are immediately | ||
# closed (without sending data) validly. This also means an error message must | ||
# be emitted. This situation can frequently happen in Proxy configurations. | ||
# written 2018-11-20 by Rainer Gerhards, released under ASL 2.0 | ||
. ${srcdir:=$(pwd)}/test-framework.sh | ||
startup_receiver $OPT_VERBOSE &> $OUTFILE | ||
${srcdir}/dummyclient.py | ||
stop_receiver | ||
# TODO: we should word the error message clearer, then also change here | ||
check_output "server closed relp session" | ||
terminate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
. ${srcdir:=$(pwd)}/test-framework.sh | ||
./receive &>librelp.out.log | ||
cat librelp.out.log | ||
check_output "Port is missing" | ||
terminate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# check that failed connect to receiver is gracefully handled and error | ||
# message emitted. | ||
# written 2018-11-20 by Rainer Gerhards, released under ASL 2.0 | ||
. ${srcdir:=$(pwd)}/test-framework.sh | ||
./send -t 127.0.0.1 -p $TESTPORT -m "testmessage" $OPT_VERBOSE &> librelp.out.log | ||
|
||
check_output "error opening connection" | ||
terminate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters