From abf54db490c00fcccaad928c08c40fd35731fd40 Mon Sep 17 00:00:00 2001 From: Ahmed Karic Date: Fri, 23 Aug 2024 10:19:06 +0200 Subject: [PATCH] doc: document introducing test-mode to infix tests --- doc/test-arch.md | 25 +++++++++++++++++++++++++ doc/testing.md | 11 +++++++++++ 2 files changed, 36 insertions(+) diff --git a/doc/test-arch.md b/doc/test-arch.md index ad0ff14c..8f3ca84b 100644 --- a/doc/test-arch.md +++ b/doc/test-arch.md @@ -241,6 +241,31 @@ could accept an arbitrary physical topology, run the STP algorithm on it offline, enable STP on all DUTs, and then verify that the resulting spanning tree matches the expected one. +Integration to Infix +-------------------- +To successfully run all Infix tests, the image must be built in +'test-mode'. This can be achieved by setting the DISK_IMAGE_TEST_MODE +parameter to true. Although this is the default setting, it’s advisable +to verify it by running: + + $ make menuconfig + (External Options --> -*- Disk image --> [*] Enable Test Mode) + +Building an image in 'test-mode' results in the creation of a 'test-mode' +file within the auxiliary (aux) partition of the Infix disk image +(/mnt/aux/test-mode). + +During the bootstrap phase, the system checks for the presence of this +test-mode flag (file). If the flag exists, a 'test-config.cfg' file is +generated. In the following step, the system loads the 'test-config' +instead of the standard startup-config (or factory-config). This +configuration is simple and safe, equivalent to the one used in 'Secure Mode' +(also known as 'failure-config'). + +Additionally, the configuration enables extra RPCs related to system +restart and configuration overrides, allowing tests to be run even on +systems where the factory configuration may potentially create L2 loops. + [9PM]: https://github.com/rical/9pm [Qeneth]: https://github.com/wkz/qeneth [TAP]: https://testanything.org/ diff --git a/doc/testing.md b/doc/testing.md index 7c940ce9..1a39ddab 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -25,6 +25,17 @@ for `x86_64`: $ make $ make test +It is important to mention that Infix build system by default creates +an image in 'test-mode'. The mode is set by DISK_IMAGE_TEST_MODE +parameter (default=true). To generate a standard image set the +DISK_IMAGE_TEST_MODE to 'false'. However, only the test mode ensures +that all Infix tests are executed properly. Prior to the set of commands +above, it is always good to check that DISK_IMAGE_TEST_MODE is properly +set by running: + + $ make menuconfig + (External Options --> -*- Disk image --> [*] Enable Test Mode) + ### Physical Devices To run the tests on a preexisting topology from the host's network