715 Commits

Author SHA1 Message Date
Adrian Villin
514098ee82 hs-test: various improvements
- fixed timed out/panicked tests not copying logs to CI archives
- fixed log formatting
- renamed SuiteTimeout to TestTimeout
- fixed ginkgo node leak on test timeout -> added AssertChannelClosed
- updated docs

Type: test

Change-Id: Ia71d765bd61576230a4cfd26d4b14fd1be1692c7
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-15 16:49:40 +00:00
Matus Fabian
15106becc5 http: Content-Length value parsing improvement
Type: improvement

Change-Id: Ida8ca43b5fed41fc0b13a2dde97e7e35c55283c9
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-14 19:26:45 +00:00
Matus Fabian
6885d5f9eb hs-test: http_static wrk tests
Type: test

Change-Id: I87cddb88f2a62e79d66832827134ddaa95740839
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-14 17:05:49 +00:00
Adrian Villin
2acdf1e629 hs-test: added dry run mode
- DRYRUN=true will set up most containers. Some need to be started
  manually (curl, nginx...). The framework will create a vpp-config
  file with interface configs that will get executed on VPP startup.
- set Ginkgo to use -v instead of -vv when running a single test
- s.Log() now supports formatting
- added 'useEnvVars' parameter to container.Exec

Type: test

Change-Id: Id1da7947a1448ee4b74b86cc4f243442256a5ba8
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-10 15:50:15 +00:00
Adrian Villin
f151640bb1 hs-test: support running multiple specific tests
- make test TEST=[test1],[test2] runs those two tests in random order

Type: test

Change-Id: I1a1af7c99ef7867ca94cec4175605f428dcd58fd
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-09 11:03:35 +02:00
Matus Fabian
a3efc38e15 hs-test: force test failure when vpp core present
Type: test

Change-Id: I874ee185a51dda9b620f3b783e466b8e88600d18
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-07 17:27:26 +00:00
Florin Coras
89969288d3 hs-test: fix core_pattern volume mounts
If system is configured to use something like apport, avoid mounting.

Type: fix

Change-Id: I6af900bd334acba974c9c4ae30c3b2ce26d1f49b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2024-10-04 05:40:15 +00:00
Matus Fabian
fa5defdc2d hs-test: prom consecutive connections test
Type: test
Change-Id: Ide4571dd8ac9bcb64fcd5ba408b6d1f99d34185f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-10-03 19:25:21 +00:00
Adrian Villin
46ab0b22bb hs-test: added nginx multi-thread tests
- added Dockerfile.envoy
- removed nginx vcl.conf file as it's created by
  the framework now

Type: test

Change-Id: I5f2be015c864c8d2aa938a22b1abece64989999b
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-03 19:23:49 +00:00
Adrian Villin
7bae9b0e82 hs-test: use nginx 1.26.2 for NginxHttp3Test
- test is no longer marked as extended
- no building required -> removed nginx build scripts

Type: test

Change-Id: I1814b1e4b7e514f81797efa3b5c1e818d2fe4cda
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-10-03 04:56:10 +00:00
Adrian Villin
5a4c7a9ce4 hs-test: replaced gofmt with goimports
- goimports properly formats imports

Type: test

Change-Id: I78c162dd552fd3ee3d59955d7ea215af30601425
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-28 02:11:59 +00:00
Matus Fabian
05f7137389 hs-test: proxy testing improvements
- nginx and curl timeouts are extended if debug flag is set
- added write-out for curl (outputs extra info after transfer is done)

Type: test

Change-Id: I3f6c336a14cd00b9ae8669d2fa26e00709162100
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-20 16:06:17 +00:00
Matus Fabian
147585e7f6 hs-test: debugging utility methods
Type: test

Change-Id: I0c7e8424e53f1ad1896cd8439027e6081ccfeb28
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-20 10:44:08 +02:00
Adrian Villin
3ecd6840af hs-test: containerize iperf tests
Type: test

Change-Id: I2c0bb76d96ccadd5ecfd6a04565420855043699e
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-09-18 18:09:44 +00:00
Aritra Basu
70d2a08e7e vcl: add http support to vcl_test_protos
Type: improvement

Change-Id: Ibb493f1d7713d0e10b8bd1d5ff17b89967b53b8a
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
2024-09-17 15:59:00 +00:00
Matus Fabian
5b175eca2d hs-test: upload via proxy tests
Type: test
Change-Id: Id6b4e2348735081c827f814a814c976b601432ec
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-10 16:35:23 +00:00
Matus Fabian
9bb0762357 http: large POST handling
Type: improvement
Change-Id: I28b8e8ccbff6f97e669b0048011b187decbfc892
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-09-08 22:41:27 +00:00
Matus Fabian
56cefc89e2 http: http_state_wait_app_reply improvement
set http status according to whether app also sent the body

Type: improvement
Change-Id: Ia41603cc21b410ca6929ec3d3e7c4c6808305769
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-28 06:08:04 +00:00
Adrian Villin
d01a63abd4 hs-test: added a redis-benchmark test
- basically a copy of LdpIperf test
- small update of LdpIperf test
- new LDP suite

Type: test

Change-Id: I3f8653288c6fc6dfd6a061315e983c000974d3ff
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-27 19:05:36 +00:00
Matus Fabian
a647a83496 hs-test: http tests improvement
- added http specific asserts
- added helper functions to NoTopoSuite

Type: test
Change-Id: I0a7e77ed3ffd938aa3eaa37ed5432fbaab0dab64
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-26 18:03:31 +02:00
Matus Fabian
62b508b396 hs-test: failed summary fix
Remove failed-summary.log from the previous run, otherwise it might be
displayed if all tests pass.

Type: test
Change-Id: I435de37e298105ed5b92012fe4da3cda3a0670b6
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-26 11:59:16 +02:00
Matus Fabian
69123a3f67 http: status line parsing fix
Request line must only start with method name and server should
ignore at least one empty line (CRLF) received prior to the
request-line.

Type: fix
Change-Id: Ifebd992dc4c13df1a3fabfcdef9e7ee644150a21
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 17:59:46 +00:00
Matus Fabian
4306a3e8f4 hs-test: core dump improvement
- load vpp plugin libraries path in gdb
- if core dump deceted change message in summary and show bt

Type: test
Change-Id: If5d44d29703edd16c816efc9d29e6a7a1b20613a
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 15:52:54 +02:00
Matus Fabian
225e6f86a4 hs-test: assert improvement
Use ExpectWithOffset so Ginkgo's output point to the line in your test.

Type: test
Change-Id: Icb32c5be683f935a5e86f25c2ec5a6dfad2ec1ea
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-23 05:56:33 +00:00
Adrian Villin
399d44074b hs-test: fix incorrect exit status
- exit status was incorrect when tests didn't compile
- better summary formatting
- removed "full stack trace: null" from summary when a test times out

Type: test

Change-Id: Idd6b6bf3429fc8b704dd2345d257e9bdce1b82b7
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-22 11:53:13 +00:00
Matus Fabian
56f5bd9985 hs-test: fix after merge
Type: test
Change-Id: I2a1d35a9e7a6c8e8026388a0baacbc18310f0ba1
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 11:40:10 +00:00
Matus Fabian
7301abe9ba hs-test: nginx proxy/mirroring test cleanup
- test moved to proxy_test.go
- topology and suite updated to be vpp/envoy proxy compliant

Type: test
Change-Id: Iabee50b76bb8d96851f831c0b57d0e98dc4b3a5f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 07:08:20 +00:00
Adrian Villin
7e6606ab4e http_static: added last-modified header
Type: improvement

Change-Id: I492df92ef25f9c0cd57fc8980500b58bebaa94c6
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-22 06:09:43 +00:00
Matus Fabian
8792e5c5c5 hs-test: proxy testing improvement
- new container topologies and suites for VPP proxy and Envoy proxy
- removed build docker image since it can't be used with CI cache
  builder, container builders are designed to be stateless, they
  only preserve build-cache, but not images

Type: test
Change-Id: I93e4d079780d18d6aa3b5ce807adc4707b6f2d9b
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-22 03:25:19 +00:00
Adrian Villin
58cb6ba818 hs-test: fix vppinstance logs and disable trace
- fixed a bug where vppinstance logs would concatenate -> each test now
  has its own bind mount
- removed "--trace" flag to avoid skipped tests printing a full
  stack trace. They are now only printed in the summary.

Type: test

Change-Id: Ib7f4254717cc798e456b9fca6f81685c8153ee2d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-21 15:38:19 +00:00
Adrian Villin
4995d0da8c hs-test: generate core dump, fix docker logs in CI
Type: test

Change-Id: Ie1f66cdc061d3eccefc2ce58e977d88a33340038
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-21 15:38:19 +00:00
Adrian Villin
1fb7ae3440 vppinfra: fix format_clib_timebase_time
- make the format RFC9110 compliant

Type: fix

Change-Id: I4272562ca1082285a596ef866ab6c4f405c64bc5
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20 20:37:24 +00:00
Adrian Villin
86fa943725 http_static: make max-age configurable
Type: improvement

Change-Id: I629add6e3f4219d56610c3785013f69dbe847844
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-20 18:19:12 +00:00
Adrian Villin
3601b322a0 http: make Media Types RFC9110 compliant
- https://www.rfc-editor.org/rfc/rfc9110.html#name-media-type
  https://www.iana.org/assignments/media-types/media-types.xhtml

Type: improvement

Change-Id: I2624dc39a985ff3999aed6e1c833220b7049828d
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-08-19 14:47:25 +02:00
Matus Fabian
5546755d1a http: http_read_message improvement
Use svm_fifo_peek in http_read_message and advance rx fifo head by
amount of bytes send to app, since not always you won't or can't
send all bytes.

Type: improvement
Change-Id: I84348c9df5c77ba386c9738a754295bb9ea0f7ef
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-16 13:36:34 +02:00
Matus Fabian
d58177c50b http: authority-form target parsing/serializing
Type: improvement
Change-Id: Ifb90818a3526d3d4030a66b1ef7eebedfe97978f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-09 20:08:59 +00:00
Dave Wallace
cf9356d642 tests: update scapy to version 2.4.5
- Required for Ubuntu 24.04 LTS jobs
- temporarily disable TestIpsecEsp1 and
  TestIpsecAhAll tests until a patch can
  be added to fix them

Type: test

Change-Id: I1ae7b170117182c3252629bbbb770775e2c496c9
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2024-08-07 09:15:17 +00:00
Matus Fabian
d46e674abc http: client POST method
Type: improvement

Change-Id: Iaa70abcee02866f9a6426a6e8e4709eeba0e8114
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-06 16:01:02 +00:00
Matus Fabian
519983b44d misc: remove deprecated builtinurl plugin
Plugin code is incorporated in http_static plugin for longer time.

Type: refactor
Change-Id: Ib74adb2a79d3ee715bbc994d77bc7718faf7184f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-08-01 16:02:14 +02:00
Matus Fabian
a330856f73 hs-test: disable color output only in CI
Type: test
Change-Id: I2ca7c8e714996b1badb59253b9b856fc623ab0c3
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 16:02:13 +00:00
Matus Fabian
d464338c19 hs-test: save VPP logs with timestamps
Type: test

Change-Id: Ia76d23a8d57dfb5570eaf44a9fdb3eabeba01a4d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 16:01:24 +00:00
Matus Fabian
ba9ea13e26 http: client code improvement
Client app can sends request target, custom header and body to
HTTP layer. In response it receives all bytes as received from
transport, aditionally we provide offset and length of headers
and body.
In addtion client app is now able to receive response with all
status codes and Host header field is set in request at protocol
layer.

Type: improvement

Change-Id: I8c8e2c8f99cdf500126b7c2c722aebc254aa0d9f
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-29 14:21:12 +02:00
Adrian Villin
6a8f26c3ab hs-test: fix docker warning message
Type: test

Change-Id: I156b6d9e0759bc7d324ac7d618a195ee5803ca75
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-25 13:17:31 +02:00
Adrian Villin
007be4fa7f hs-test: check container state after startup
- tests will now fail if a container exits right after startup
- fixed MirroringTest (still broken with multiple workers)

Type: test

Change-Id: I47b51c2bcf53f535aa2d06c2f5b09a9559631117
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 23:41:04 +00:00
Adrian Villin
d9da4eeb79 hs-test: fix logs once again
- "/dev/null" and "tail: ..." messages should now be
  removed properly

Type: test

Change-Id: I4aa1f1a1cab17dab73f727e40c80a44d6e753bd5
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 21:16:21 +00:00
Adrian Villin
2a2c653169 hs-test: update envoy
- v1.21 -> 1.30

Type: test

Change-Id: Ib79a4addc0a93089c41c13abffc3e8f0af4c0d91
Signed-off-by: Adrian Villin <avillin@cisco.com>
2024-07-24 15:54:02 +00:00
Matus Fabian
c712de5a8e prom: mem leak test
Type: test
Change-Id: Ibca5680778c9e27eb7b1ddbdba52f870852452fe
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-24 15:38:46 +00:00
Matus Fabian
5c4c1b63b9 prom: concurrent connections fix
Type: fix

Change-Id: I57814edb735e9dac916f2e01de95ccfb739ce655
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 20:37:29 +00:00
Matus Fabian
d086a3650e http: state machine fix
When client sends second request without waiting for response of the
first request http_ts_rx_callback should drop request (pipelining is
not supported) instead of invoking return to state machine which can
lead to erroneous state, e.g. reading random data from server app
fifo.

Added simple http static server url handler for testing to simulate
long running request processing, for now hardcoded delay 5 seconds.

Type: fix

Change-Id: Ied9f7e2e4ee64c982f045c0f7f99a2dc5d7a2108
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 20:37:16 +00:00
Matus Fabian
8ca6ce6fe1 http: return more than data from server app
Server app could return headers in front of body/data buffer.
Offers apis for building and serialization of headers section.
HTTP layer now only add Date, Server and Content-Lengths headers,
rest is up to app. Well known header names are predefined.

Type: improvement

Change-Id: If778bdfc9acf6b0d11a48f0a745a3a56c96c2436
Signed-off-by: Matus Fabian <matfabia@cisco.com>
2024-07-23 15:22:34 +00:00