40 Commits

Author SHA1 Message Date
Dave Wallace
03dd90adfe VCL: add TLS opt to socket_test.sh
- add TLS transport opt to socket_test.sh
- resolve clash in vcl_test* args with
  socket_test.sh opts

Change-Id: I952d5b64942664bc3af1098f67445e0f4b93ab32
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-03-25 19:34:50 -04:00
juraj.linkes
f18eb86c32 Rename VPP_TEST_FAILED_DIR to FAILED_DIR
15999 renamed VPP_TEST_FAILED_DIR, but not in all files. Fix this in the
one remaining file.

Change-Id: I159cdc86bfd5dd33af74256830873a8d081f1a73
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2018-12-06 21:32:01 +00:00
Dave Wallace
6ccff02def VCL: Fix socket_test.sh to build test apps.
- Replace autoconf base test app build detection
  with appropriate cmake based incantation.
- Use the dpdk_devbind.py that is in the VPP tree.

Change-Id: I4cdc11d159e2413d6bdb9c5ffcf1ed2d787b1cc5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-11-07 00:00:42 +00:00
Yalei Wang
904a850899 Fix the path error inside vcl socket_test.sh
Change-Id: I5bcfbd436839e7a6dd82dc57cdb3b7fb6200a69c
Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-10-01 13:48:41 +00:00
Damjan Marion
4a6cb83d33 rename vpp-dpdk-dev to vpp-ext-deps
We need to have new tenants in the development package.
This is first of series of patches which will allow us to have multiple
external libs and tools packaged for developer's convenience.

Change-Id: I884bd75fba96005bbf8cea92774682b2228e0e22
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-20 14:30:54 +02:00
Damjan Marion
79dcbc74cd Always use 'lib' instead of 'lib64'
It is packaging responsibility to put libs in the right place.
Use of lib64 resulted in huge amount of files with hardcoded lib64.
This patch simplifies things...

Change-Id: Iab0dea0583e480907732c5d2379eb951a00fa9e6
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-12 16:38:59 +00:00
Florin Coras
ab2f6dbf9f session: support multiple worker binds
Allows app workers to listen on the same session endpoint. Incoming
connects are spread across the workers in a round-robin fashion

Change-Id: Ib5f5817230d9abc6127a85cdbdcad70d980c0f7f
Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-09-06 08:35:51 +00:00
Damjan Marion
855e26868f Switch to cmake
Change-Id: I982b69390c55b5ffbd744f355efc0aaf425b360c
Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-09-02 11:24:12 +02:00
Dave Wallace
de91006803 VCL: add IPv6 to socket_test.sh and make test
Change-Id: If3827828062a46f1cce43642535333f677f06e62
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-26 21:56:16 +00:00
Dave Wallace
1c5ddbb22b socket_test.sh: Don't hard code debug image with gdb.
Change-Id: Idd6c175b9102c74621c027136ab4550821a23ecc
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-14 13:34:32 +00:00
Dave Wallace
fbbb07c33e VCL: Add full hoststack test option to socket_test.sh
Change-Id: I3e5e179daa9d6f1c46adb85b05dd810bdd312054
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-03-08 19:08:55 +00:00
Dave Wallace
3ee1fe1608 LDP: Refactor epoll_ctl wrapper.
- Add AF_UNIX transaction to sock_test_client/server
  echo test to verify mixed epoll ldp implementation.
- Misc cleanup / refactoring of ldp code.
- Fix LDP_DEBUG in test/socket_test.sh

Change-Id: Ib524c824728f109007d8c4d07d74603b6c687902
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-24 18:11:16 +00:00
Dave Wallace
b5a86eed8b VCL: config api prefix using env var.
- Configure vpp api prefix using VCL_API_PREFIX
  environment variable.
- Prepend api prefix to vpp api filename when
  connecting to vpp.
- Fix stale vcl_cfg ptr after heap allocation.
- Cleanup misleading warning messages wrt.
  reading the vcl config file.

Change-Id: I908c9b567ff4f6f0c21ae43a4627a1a3202a3290
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-02-19 14:57:39 +00:00
Dave Wallace
048b1d6ab7 LD_PRELOAD: stateless LDP
- Refactor LDP to be stateless.
- Use upper bit of fd to identify
  tag as VCL session.
- Clean up debug output.
- Add VCOM config env vars for
  app name and sid bit.
- Add VCL get/set attributes
- Add VCL poll implementation.

Change-Id: I4603ae88254c460a024fdb79fe91c6d1ef9bc7b9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2018-01-17 22:26:17 +00:00
Dave Wallace
ee45d41a10 VCL: improve debug output
- Refactor debug output to include vpp handle associated
  with session id where appropriate.
- Fix vcom_connect return value on error.
- Refactor vcom_socket_epoll_pwait().
- Fix sock_test_server/client connect failure handling.

Change-Id: I2649596aa4b8a77d9bd876409a76810cb2785797
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-25 03:36:10 -05:00
Dave Wallace
4878cbe276 VCL: close-on-empty state transition refactoring.
- Refactor session disconnect/close state
  transitions. Only remove session state
  when app calls close().  Add HUP/reset
  feedback by returning ECONNRESET.
- Update debug messages.
- Use VCL_LOCK_AND_GET_SESSION macro more
  extensively

Change-Id: I23d372834b901a6726e6d6c1061df73ad967882f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-21 23:16:50 +00:00
Dave Wallace
498b3a56c9 VCL: Set debug output level from env var
Change-Id: Ia99047715ed652eca1aea1e4144e407f9608d59e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-09 22:16:52 +00:00
Dave Wallace
5917939256 VCL-LDPRELOAD: enable accept4() wrapper
Change-Id: I56567953fb8329315393047913e30fc7f2242bdb
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-07 08:40:57 +00:00
Dave Wallace
e695cb4dbd VCL_LDPRELOAD: mixed libc/vcl epoll fd's
Change-Id: Ibc82781ddef5ea0517220b9054db3d53ec348c6c
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-06 00:58:20 +00:00
Dave Wallace
774169bd95 VCL: application proxy configuration
- Add support to configure VCL to set
  application proxy transport types
  and app_is_proxy flag via vcl
  config file or env vars.
- Clean up debug output.
- Rename session_scope -> app_scope.

Change-Id: I6e35f3cdd84daf0112133af8f33acd0152f87ca3
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-11-02 19:01:03 +00:00
Dave Wallace
8af2054b78 VCL: add session namespace support.
Change-Id: I04f1b63e66260d99c0dd180b0295a55a9b750df7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-26 15:01:50 +00:00
Dave Wallace
4f6c3a9a13 VCL: Fix vcl test scripts to check vcl.am instead of uri.am
Change-Id: I34ab79ddf0a612be1f2a4223e46811516e5b317e
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-25 19:12:57 +00:00
Dave Wallace
5c7cf1cc53 VCL-LDPRELOAD: statically link vppcom into libvcl-ldpreload.so
- Move VCL & VCL-LDPRELOAD source into src/vcl
- Statically link vppcom into libvcl-ldpreload.so

Change-Id: I778300b37e8b06640d9dbc01caf297edf7a6edb7
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-24 18:25:31 +00:00
Dave Wallace
68a40c868d VCL: refactor VCL_LDPRELOAD env vars.
- Update vcl-ldpreload references to use $WS_ROOT.

Change-Id: I8e79f7c5e330eda6548a2baf84613b0a4d360811
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-17 16:09:23 +00:00
Dave Wallace
f7f809c298 VCL: add epoll_* functions.
Change-Id: Ife27795ea96919c116fb6ff33d106663b54df72d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-10-06 12:25:10 +00:00
Dave Wallace
25dc16715e make test: archive failed test data with build logs.
- Fix invocation of compress_failed.sh
- Fix compress_failed to copy compressed results
  files to $WORKSPACE/archives and return failure
  exit code.

Failed test case data will be copied to logs.fd.io
and found in the archives/<make test data dir>-FAILED
directory in the build log link in the
vpp-verify-master-ubuntu1604 jenkins job page.

For example:
https://logs.fd.io/production/vex-yul-rot-jenkins-1/vpp-verify-master-ubuntu1604/7353/archives/

Change-Id: Ife9a0737115e69c0a8441e3bb0133af1528d909b
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-30 01:53:26 -04:00
Dave Wallace
3d67449de5 Refactor multi-host socket_test.sh for bare-metal.
Change-Id: I4fcde6652e0c66315a453250c6e02cd32176833d
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-25 22:07:52 +00:00
Klement Sekera
8f2a4eafea Add new C API
Change-Id: I717ce3cd7c867c155de149ec56623269d26d0ff7
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-09-19 12:23:44 +00:00
Dave Wallace
1948161b65 Add multi-vm Vagrantfile for vcl-test.
- Existing Vagrantfile is symbolic link to the
  default Vagrantfile.
- In order to run the multi-host vcl test,
  change Vagrantfile -> Vagrantfile.vcl_test
- Fix socket_test.sh & vppcom bugs.

Change-Id: I965b7f799135c86e989c08bf6c5909677ef38dea
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-17 00:30:20 +00:00
Dave Wallace
3079a64e19 Fix socket_test.sh vagrant based multi-host tests.
Change-Id: I8ef75a0c702098030c6814c127d3443820122327
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-09-08 05:42:13 +00:00
Keith Burns (alagalah)
9e482bb9bc Improvements to socket_test.sh script
Change-Id: I10c59dc32edb7336a56722b1de8cca1d0ae31c60
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
2017-08-31 01:41:05 +00:00
Klement Sekera
8712ada6c3 make test: fix broken passing of return value
Change-Id: I2cb83caaf55ca9a29c06d71c6d20f8273ec062b3
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-18 10:34:39 +00:00
Dave Wallace
30fb4a2f43 Fix socket_test.sh to run iperf3 in docker.
Change-Id: I47018fee4283b7b257f16e21b82bf7e497a7d985
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-17 16:30:11 -04:00
Klement Sekera
f413bef135 make test: collect symlinks to failed tests
Compress files in temporary directories of failed tests and symlink
the directories under /tmp/vpp-failed-unittests location - preparation
for jenkins archivation. Automatically cleanup the directory at start
of test run.

The compression is performed only when environment variable
COMPRESS_FAILED_TEST_LOGS is set to one of "yes", "y", "1".
This is set in verify target, but left unset by default, so when
invoking make test by hand, files won't be compressed.

Change-Id: I84c8f1c6aa79aa9c0b753357022b1f195f17a283
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-17 14:44:05 +00:00
Dave Wallace
d69f4f416d Fix VCL LD_PRELOAD lib location in socket_test.sh
- Use VCL_LDPRELOAD_LIB_DIR env. var if set.
- Default to /usr/local/lib where it will be installed.
- Change library name to libvcl_ldpreload.so.0.0.0

Change-Id: I4fc30b581c8406c5895f875d859aa44bb9ef19b5
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-14 23:50:05 +00:00
Klement Sekera
db4e84cf2f make test: properly handle ctrl-c
Change-Id: Iab88886ebc1582626813777ea45ce97fc8e36443
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-14 15:21:43 +00:00
Dave Wallace
543852a46c Add VPP Communications Library (VCL)
- VCL library
- client/server test application
- test script (make test integration tbd)
- gdb command file templates
- vppcom test config file

Change-Id: I21eab7aa09b4e5dc3412acf5c2eab07415c2fc0f
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-11 02:50:51 +00:00
Klement Sekera
94384e4d3a make test: kill all remaining subprocesses on exit
This change introduces a wrapper script which kills all processes in
the same process group as itself (with the exception of the script).
Using this script to run the unit tests should prevent stale processes
left behind in some cases (e.g. when test framework crashes).

Change-Id: If3b9201c06b87fa6be095721436893207d09b5e4
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-08-07 14:53:17 +00:00
Klement Sekera
a657e4e7c9 make test: tweak helper scripts
Change-Id: Iee6016757e45c832e8868f0bdcfd4192dd3380c8
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-04-03 13:58:28 +00:00
Klement Sekera
799e26d5bd make test: add scripts for easy test looping
Allows easy running of test(s) in a loop with configurable
action (e.g. git pull) run between test runs and possible
email notification on failure.

Usage:

test-loop.sh [-p <pre-exec-cmd>] [-m <email>] -- <make test options>

Example:

Run 'make test-debug' in a loop until a failure is encountered,
upon which an email is fired to ksekera@cisco.com. In between test
runs, update the workspace using via 'git pull' and if anything changed,
perform 'git clean' before running another 'make test-debug':

test/scripts/test-loop.sh -p test/scripts/git_pull_or_clean.sh \
-m ksekera@cisco.com -- test-debug

Change-Id: I114321c6c152d2c7e181e915fc8c51aab1ff3693
Signed-off-by: Klement Sekera <ksekera@cisco.com>
2017-04-02 08:03:57 +00:00