Skip to content

3.1r1: 9.5.1's TCP network tests - #51

Merged
jadamcrain merged 1 commit into
mainfrom
section-9-tcp
Oct 14, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
section-9-tcp

Conversation

@jadamcrain

@jadamcrain jadamcrain commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Implements 3.1r1's 9.5.1 TCP tests: Port 20000, Port Other Than 20000, Specific IP Address and Wildcard IP Address. This is the first part of section 9; the UDP tests (9.5.1.5, 9.5.1.6, 9.5.2 to 9.5.4) follow.

Every network test is gated by configuration: it runs only where its network.* options say the device and the test bench can do what it tests, and is skipped otherwise. That includes Port 20000, which 3.1r1 requires of every TCP device.

Harness

  • The driver can connect from a given local address and port (TestDriver.connect). It can also probe a connection the device shouldn't accept (TestDriver.probe):
    • the probe passes if the device refuses the connection, doesn't accept it within the response timeout, or accepts it and closes it without answering REQUEST LINK STATUS;
    • it fails if the device keeps the connection open.
  • A procedure can now have cleanup steps. The runner runs them however the procedure ends, including after a failure or an interruption. The network tests use them to restore the device's network. If a cleanup step fails, a procedure that otherwise passed fails.
  • If the test bench can't use a local address (LocalBindException), the run aborts as a harness failure. The device isn't failed for it.
  • Packet capture now filters on the device's address instead of its port, so it captures the network tests' other ports too.

Plugin. Three new IntegrationPlugin methods. Their defaults throw, and DefaultIntegrationPlugin prompts for them:

  • configureNetwork(NetworkSetup) takes the whole setup: transport, port and allowed masters, plus the UDP destinations the later tests use, so the API won't change for them;
  • restoreNetwork puts back the device's usual network setup;
  • verifyDisconnectNoticed checks that the device noticed the master closing its connection.

Options. A new network group:

  • network.master.address is the address of this host the tests connect from;
  • capability flags: network.tcp, .tcp.configurablePort, .tcp.specificAddress, .tcp.wildcard and .tcp.anyAddress;
  • the wildcard test's range and addresses.

The configuration check requires these, for the network tests that will run, and requires the wildcard test's addresses to be distinct.

The 2.7 -describe output is unchanged.

Port 20000, Port Other Than 20000, Specific IP Address and Wildcard IP
Address. Each runs only where its network.* options say the device and the
test bench can do what it tests, and is skipped otherwise, including the
Port 20000 test that 3.1r1 requires of every TCP device.

- The driver connects from a given local address and port, and probes a
  connection the device shouldn't accept: refused, not accepted within the
  response timeout, or accepted and closed without answering REQUEST LINK
  STATUS pass; one the device keeps open fails.
- Plugin actions configureNetwork (the whole setup: transport, port,
  allowed masters, and the UDP destinations later tests use),
  restoreNetwork and verifyDisconnectNoticed, with defaults that throw;
  DefaultIntegrationPlugin prompts for them.
- A procedure can have cleanup steps, which the runner runs however the
  procedure ends; the network tests restore the device's network there. A
  cleanup that fails fails a procedure that otherwise passed.
- A local address the bench can't use (LocalBindException) aborts the run
  as a harness failure instead of failing the device.
- The configuration check requires an address of this host, and the
  wildcard test's addresses and range, for the network tests that run.
- Packet capture filters on the device's address rather than its port.
@jadamcrain
jadamcrain merged commit 7d560a9 into main Oct 14, 2026
9 of 10 checks passed
@jadamcrain
jadamcrain deleted the section-9-tcp branch October 14, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant