Commit graph

27 commits

Author SHA1 Message Date
Felix Walter
ff3b1a6bd1
Merge branch 'update/docker-images'
See !181
2024-08-09 14:59:55 +02:00
Felix Walter
6a230709ce test/ion_interoperability: Adapt BIBE test for ION changes
There have been recent changes in ION's BIBE implementation [1], which
necessitate adapting the configuration files. As a result, they do not
work with IONe anymore, which uses the old syntax. Thus, we will only
support BIBE interoperability with ION mainline and remove the
corresponding test. Nevertheless, some comments have been added to make
it work with IONe.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-24 17:59:11 +02:00
Felix Walter
87be9749af Re-integrate v0.13.0 routing code as "integrated default BDM"
This makes µD3TN behave the same as v0.13.0 when executed without an
additional commandline argument. A new commandline argument `-d` /
`--external-dispatch` is added, which enables the use of external BDMs.
The default forwarding implementation is now again provided using the
v0.13 code, extracted from e1621765a4 and
adapted to the new agent-based forwarding implementation.

Central changes to the old code include:

- A new "Routing Agent" that handles incoming configuration commands,
  FIB updates, and BDM dispatch requests.
- The use of the BDM authorization flag to authorize contact
  configuration commands.
- The Contact Manager now only triggers the creation and removal of
  links / FIB entries; bundle dispatch is triggered through the FIB and
  BDM callback functions of the Routing Agent.
- The fragmentation logic is adapted to store the original bundle along
  with an offset and length value, instead of pre-creating and storing
  the fragments.
- The bundle re-scheduling logic integrated into the Routing Agent is
  simplified and does not support changing the fragmentation parameters.
  A new function is added to the Router that searches for a new route
  for such fragments that were already scheduled at some point,
  considering them as un-fragmentable bundle with overridden fragment
  offset and length.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-15 00:46:14 +02:00
Felix Walter
d9da044a01 test: Give uD3TN some time to start before launching BDM
Otherwise it might crash in some rare cases because the socket is not yet
ready.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-07-04 16:03:31 +02:00
Maximilian Nitsch
3ba8281796 treewide: Use python-ud3tn-utils scripts instead of those from tools/
Changes all occurrences of the old script paths from tools/ to the
scripts installed by python-ud3tn-utils.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2024-07-01 10:10:56 +02:00
Felix Walter
63ea25e52a CI: Fix configuration for compat. BDM in integration tests
We must either allow accepting configuration from an external source or
use the AAPv2 method with authentication for the integration tests to
work. This uses one of both approaches in each of the tests, so both are
also validated to work.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-26 13:32:28 +02:00
Felix Walter
7f0c58fcd5 cla_bibe: Provide full CLA address to BP in all cases
The BIBE CLA address contains the lower-layer destination EID.
Previously we were reporting link changes for the `cla_sock_addr`,
leading to inconsistent FIB entries.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-21 10:36:30 +02:00
Felix Walter
df07327bef CI: Improve debug output in integration tests
- Make `timeout` verbose: pass `-v` so we see when the operation timed
  out.
- Check for clean exit only *after* printing the logs: We should be able
  to see the logs even if uD3TN crashes.
- Increase log verbosity.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-21 10:36:30 +02:00
Felix Walter
3a905cdbb6 CI: Enable compat. dispatcher in integration tests
This starts the compat. BDM so the tests can work again.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2024-06-21 10:36:30 +02:00
Felix Walter
35c2e77e81 CI, test: Ensure there are no collisions with AAPv2 sockets
This always specifies the AAPv2 socket path so we ensure that no two
instances of uD3TN listen on the same AAPv2 socket in tests.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-11-08 15:11:52 +01:00
Felix Walter
cc479de85a test/ion_interoperability: Add test for receiving data from uD3TN in ION
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 08:07:42 +02:00
Felix Walter
54813d95c8 test/ion_interoperability: Add test receiving ION bundles in uD3TN
ION by default sends bundles encoded with CBHE (BPv6). This tests that we
can receive them. Also for BPv7 it makes sense to test reception, of
course. :-)

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-12 08:07:42 +02:00
Felix Walter
181c94f0a8 CI: Use dedicated Docker image
This prevents installing deps in each run.

Fixes: #16

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:54:50 +02:00
Felix Walter
0389435a6c CI: Add a Dockerfile for the other CI tests
This adds a Dockerfile containing everything needed in our other tests
(Clang, Python, Python dependencies, Netcat).

See also: #16

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:54:50 +02:00
Felix Walter
b6754ff841 test/ion_interoperability: Use new syntax to add ION egress plans
In newer versions of ION the `ionstart` utility may not execute the
`dtn2admin` program, so our egress plans were not loaded properly.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
951b4cf3c1 CI: Use ION Docker image in BIBE interoperability test
Note that this needs to extend the preparation script for build uD3TN in
case of the ION BIBE interop test with the proper compatibility flag.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
67133f8bdf test/ion_interoperability: Enable "watch" option of ION in dtn test
This way we see what happens with the bundle.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
4c33209557 CI: test/ion_interoperability: Add tests for the ipn: scheme
This makes the ion interop testing script flexible such that we can
specify the EID scheme to be used. Two additional CI tests are added for
the ipn scheme. Note that these use the newest version of ION while
there still seems to be incompatibility for dtn EIDs with these (see
issue #116).

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
ec2bcb901c CI: test/ion_interoperability: Use the Docker image
This makes the ION interoperability tests assume a prepared environment
(ION, uD3TN compiled, Python deps, ...) and, thus, only execute the test
run itself. The CI routines make use of the new Docker image.

Additionally a timeout for stopping ION is added (#120).

Fixes: #120
See also: #16

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
43ae0e59ef test: Add Dockerfiles and scripts for ION interoperability testing
This provides two new Dockerfiles for testing, one just containing ION
and one with an additional Python3 virtual environment for
interoperability testing.

Additionally, two scripts are provided:
* build_docker_images.sh: build images that can be pushed to the
  registry and then used by the CI toolchain
* prepare_for_test.sh: a script to be run inside a newly created Docker
  container based on the provided `ion-interop` image, to build uD3TN
  and add the Python modules from the uD3TN source tree efficiently

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 16:40:53 +02:00
Felix Walter
5748edf83d test/ion_interoperability: Reduce file descriptor limit before test
This artificially reduces the maximum number of open file descriptors to
make ION services start faster and address an issue with huge delays on
systems that have this limit set to 2^30-8 (observed in container
runtimes #121)

Fixes: #121

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-11 07:56:20 +02:00
Felix Walter
2fc9c6c03e aap_receive, tests: Print a line feed after every received bundle
This makes the testing logs prettier and may help in decoding the
responses received by aap_receive.py.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-10 14:37:11 +02:00
Felix Walter
1929c71053 test/ion_interoperability: Skip maybe-uninitialized warning
There are issues with newer toolchains and ION 4.0.0

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-10 14:37:11 +02:00
Felix Walter
8c4ce47724 CI: Remove stdbuf statements from tests
We do not need this anymore due to making logging line-buffered and it
collides with ASAN in some cases.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-10 14:37:11 +02:00
Felix Walter
cc4c79848b CI: Run unit and integration tests with sanitizers
This enables ASAN and UBSAN in our unit and integration tests.
Another integration test using the thread (data race) sanitizer is added
to detect such issues as well.

The tests are extended such that they wait for uD3TN (all instances if
we launch multiple ones) to terminate, to allow for exit checks of
sanitizers to run. For example, ASAN and the thread sanitizer make use
of this and we need to obtain the exit status code to tell whether the
CI job succeeded or not.

Note that memory leak detection is turned off in the unit tests as they
do not properly deallocate temporary variables, see: #104

aap_send and aap_receive are always invoked with `-v` to get more
information on what happens there in the tests.

Fixes: #55

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2023-05-10 14:24:31 +02:00
Georg Alexander Murzik
298431c68f Insert SPDX license expression comments into our .c, .h, .py, and .sh code
ud3tn is available under multiple licenses and we want to reflect this in
our source code. But which license information should appear first and how
can we manage this efficiently in the future? The Linux Kernel uses SPDX
expressions instead of boilerplate sections. This seems to be a great
approach, so we do the same here.

Signed-off-by: Georg Alexander Murzik <georg.murzik@d3tn.com>
2022-02-20 16:24:38 +01:00
Felix Walter
629590f29b Fix spelling: interopability -> interoperability
Signed-off-by: Felix Walter <felix.walter@d3tn.com>
2022-01-30 16:25:05 +01:00