Hello,

A while ago I mentioned my plan to switch over more test servers to use "any port" instead of using pre-determined fixed port numbers.

The mqttd test server was the first one working like this and with that, I landed some infrastructure to handle and support this concept.

I'm now taking the next step with switching over 'sws' to this dynamic approach [1] (sws is our test server for HTTP and Gopher). When doing this, I was reminded that we have a set of tests that actually refuse to run if not running on the default port numbers. When we go fully dynamic they will virtually never again run on the default numbers so this is really bad.

The reason they don't work with dynamic port numbers, is (primarily) that they have port numbers in the <data> section and since our test servers read the data from there there's no variable substitution available.

# The fix!

Within my PR, I'm having the runtests script do a full variable substitution run on the test input file and save a preprocessed version of the test case in a temporary file and make sure that all the test servers use the preprocessed one for the tests.

All of a sudden we get a much more powerful testing ability and this without having to complicate the test servers any further. The minor complication that this still adds is of course for test case authors, but I don't think it is very high price.

# Land?

Once everything looks good in my PR I intend to land this and then work on moving over more servers to this any-port concept.

[1] = https://github.com/curl/curl/pull/5247


--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                  | Private help, bug fixes, support, ports, new features
                  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to