Commit Graph

21 Commits

Author SHA1 Message Date
Willy Tarreau
f490f30ed8 REGTEST: add a test for connections to a "dispatch" address
The test includes both TCP and HTTP modes.
2018-11-23 08:36:06 +01:00
Joseph Herlant
ec4abdec09 CLEANUP: fix typos in reg-tests
Fix typos in comments and error messages of reg-tests. Note that this
has not been qualified as minor as it is used for testing purposes, not
end-users.
2018-11-18 22:23:15 +01:00
Willy Tarreau
9c27ea0a6a REGTEST: fix scripts 1 and 3 to accept development version
These scripts were checking that the program's name was exactly "haproxy"
which clearly is not workable during development.
2018-11-16 15:54:23 +01:00
Willy Tarreau
f95838ca2d REGTEST: make the IP+port logging test more reliable
On my machine, test log/b00000.vtc fails ~9/10 times. Apparently, the
connection is often marked as reset before the timeout strikes, so the
log shows "CD" flags instead of "cD". This fix does two things :
  1) shorten the client timeout to 1 millisecond instead of 5
  2) accept both "cD" and "CD" as valid termination states since the
     purpose is to validate the source address and port, and not the
     status itself.
2018-10-28 19:19:48 +01:00
PiBa-NL
d3ff20f0ae REGTEST/MINOR: compatibility: use unix@ instead of abns@ sockets
Changes the /reg-tests/connection/b00000.vtc test to use unix@ instead of abns@ sockets.
This to allow the test to complete on other operating systems like FreeBSD that do not have 'namespaces'.
2018-10-04 04:18:47 +02:00
Frédéric Lécaille
5afb3cfbcc BUG/MINOR: server: Crash when setting FQDN via CLI.
This patch ensures that a DNS resolution may be launched before
setting a server FQDN via the CLI. Especially, it checks that
resolvers was set.

A LEVEL 4 reg testing file is provided.

Thanks to Lukas Tribus for having reported this issue.

Must be backported to 1.8.
2018-09-12 07:41:41 +02:00
Frédéric Lécaille
233afc70ba REGTEST/MINOR: lua: Add reg testing files for 70d318c. 2018-09-04 17:36:56 +02:00
Frédéric Lécaille
dd51e53367 REGTEST/MINOR: Add a reg testing file for 3e60b11.
Thank you to Daniel for having worked on this one.
2018-08-31 13:42:56 +02:00
Frédéric Lécaille
54f2bcf22b BUG/MAJOR: thread: lua: Wrong SSL context initialization.
When calling ->prepare_srv() callback for SSL server which
depends on global "nbthread" value, this latter was not already parsed,
so equal to 1 default value. This lead to bad memory accesses.

Thank you to Pieter (PiBa-NL) for having reported this issue and
for having provided a very helpful reg testing file to reproduce
this issue (reg-test/lua/b00002.*).

Must be backported to 1.8.
2018-08-30 10:06:45 +02:00
Patrick Hemmer
e3faf02581 BUG/MEDIUM: lua: reset lua transaction between http requests
Previously LUA code would maintain the transaction state between http
requests, resulting in things like txn:get_priv() retrieving data from
a previous request. This addresses the issue by ensuring the LUA state
is reset between requests.

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2018-08-25 07:51:02 +02:00
Frédéric Lécaille
afbfa2a23f REGTEST/MINOR: Add a reg testing file for b406b87 commit. 2018-08-24 16:53:27 +02:00
Frédéric Lécaille
b083c8316b REGEST/MINOR: Add reg testing files.
Reg testing files for a LUA bug fixed by commit 83ed5d5 ("BUG/MINOR:
lua: Bad HTTP client request duration.")
2018-08-24 14:50:30 +02:00
Frédéric Lécaille
9931634e71 REGTEST/MINOR: Add a new class of regression testing files.
Add LEVEL #4 regression testing files which is dedicated to
VTC files in relation with bugs they help to reproduce.
At the date of this commit, all VTC files are LEVEL 4 VTC files.
2018-08-23 15:47:10 +02:00
Frédéric Lécaille
fe5463ebf2 REGTEST/MINOR: Missing mandatory "ignore_unknown_macro".
Since bbc34e2 varnish commit (for varnishtest), a new "cli"
macro is automatically created for each VTC script to dialog with
the CLI. Consequently, as this macro is unknown from higher level
code for varnishtest, it makes the scripts fail if we
we do not ask varnishtest to disregard the unknown macros.
To prevent this, from now on, for each VTC file for haproxy we MUST add
"feature ignore_unknown_macro" line to do so. This is mandatory
2018-08-23 15:47:07 +02:00
Frédéric Lécaille
faf4aac742 REGTEST/MINOR: Unexpected curl URL globling.
With certain curl versions URLs which contain brackets may be interpreted
by the "URL globbing parser". This patch ensures that such brackets
are escaped.

Thank you to Ilya Shipitsin for having reported this issue.
2018-07-13 11:00:32 +02:00
Frédéric Lécaille
49076c3b71 REGTEST/MINOR: Wrong URI syntax.
Ilya Shipitsin reported that with some curl versions this reg test
may fail due to a wrong URI syntax with ::1 ipv6 local address in
this varnishtest script. This patch fixes this syntax issue and
replaces the iteration of "procees" commands by a "shell" command
to start curl processes (must be faster).

Thanks to Ilya Shipitsin for having reported this VTC file bug.
2018-07-12 17:52:27 +02:00
Tim Duesterhus
65189c17c6 BUG/MAJOR: stick_table: Complete incomplete SEGV fix
This commit completes the incomplete segmentation fault fix
in commit ac1f3ed64b.

Likewise it must be backported to haproxy 1.8.
2018-06-26 20:29:36 +02:00
Frédéric Lécaille
6983be32f7 REGTEST/MINOR: Wrong URI in a reg test for SSL/TLS.
Fix typos where http:// URIs were used in place of https://.
2018-06-25 22:04:27 +02:00
Frédéric Lécaille
9b53b4cd1f MINOR: reg-tests: Add a few regression testing files. 2018-06-20 10:03:24 +02:00
Frédéric Lécaille
4891e4055e MINOR: reg-tests: Add reg-tests/README file.
Add reg-tests/README file about how to compile and use varnishtest, and
how to produce patches to add regression testing files to HAProxy sources.

Also update CONTRIBUTING file to encourage the contributors to write
regression testing files.
2018-06-19 15:46:09 +02:00
Frédéric Lécaille
153b2b68bf MINOR: tests: First regression testing file.
Add a makefile target 'reg-tests' to run all regression testing file
found in 'reg-tests' directory.
Add reg-tests/lua/h00000.vtc first regression testing file for a LUA
fixed by f874a83 commit.
2018-06-19 10:14:59 +02:00