777 Commits
Author SHA1 Message Date
Mattias Walström 5c811d7fc7 test: ntp: client_stratum_selection: Update autogenerated test spec 2026-01-08 14:50:17 +01:00
Mattias Walström f482a2bfe9 test: spec: rip_multihop: Add missing autogenerated file 2026-01-08 14:50:16 +01:00
Mattias Walström bd92e603d0 test: spec: ospf_debug: Add missing autogenerated files 2026-01-08 14:50:15 +01:00
Mattias Walström 5a96b64718 infamy: iface.py: Add functions to get interface oper status 2026-01-08 14:50:15 +01:00
Joachim Wiberg 113b43ecae test: minor cleanup, whitespace only
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:28 +01:00
Joachim Wiberg 39b9c7a065 test: add new tests for NTP
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 12:28:28 +01:00
Joachim Wiberg 64a04f5a1d test/infamy: allow until() to return the result of the function
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-04 10:40:38 +01:00
Joachim Wiberg 2b08258492 test/infamy: improve feedback on netconf/restconf error a bit
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-03 22:13:25 +01:00
Joachim Wiberg efe4903d9c confd: initial support for NTP server
Fixes #904

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-03 22:13:24 +01:00
Mattias Walström dd5c4919d6 nsenter: Allow to run outside container
If running outside container find the netns inside the container, then
enter that netns.

lazzer@tollan ~/src/github.com/kernelkit/infix3 (add-wireguard)$ sudo ./test/nsenter d2b
(netns:d2b) #
2026-01-03 01:00:43 +01:00
Mattias Walström b75d6af84e test: Update statd test data 2026-01-02 22:32:59 +01:00
Joachim Wiberg 25a7050c23 test: fix container resource-limit value
The constaint was supposed to be 50% of one CPU core, or 500 millicores
as per Kubernetes nomenclature.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:32 +01:00
Joachim Wiberg e0ea554b7b statd: update SimpleTable with flexible columns and fix spacing
This patch adds support for flexible columns.  When a column is marked
as flexible it means it can be stretched when printing the table to an
optional minimal table width.  Multiple columns can be marked and when
this occurs the padding is applied equally to all columns.

Also, make sure to only add 2 char padding between columns, not always
at the end, or we will require larger terminal than necessary.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-01-02 20:09:30 +01:00
Mattias WalströmandGitHub fce59ef93c Merge pull request #1327 from kernelkit/container-limits
Container limits
2025-12-25 21:55:43 +01:00
Tobias WaldekranzandGitHub a42b4240f7 Merge pull request #1299 from kernelkit/statd-add-service-stat
Add service runtime statistics and table formatting framework
2025-12-23 10:20:08 +01:00
Joachim Wiberg fb338ad285 test: fix regression in misc/support_collect
The support script now requires sudo.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 17:01:53 +01:00
Richard Alpe faebf7015c cli: use dynamic column widths in simple table
- Remove fixed lengths from Column class
- Add dynamic width calculation to SimpleTable
- Update service table to use new batched printing

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-18 10:52:34 +01:00
Joachim Wiberg 3a9d3246dc test: extend container basic to verify resource limits
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:41 +01:00
Joachim Wiberg ad79f6685b test: allow silencing curl connection failures on retry
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-18 07:26:40 +01:00
Richard Alpe 72ffbf6254 test: update unit data with service statistics
Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-17 15:34:13 +01:00
Tobias Waldekranz 553d659eac test/case/hardware/watchdog: Add test
Verify that if the system encounters a hard lockup, i.e., interrupts
are no longer being serviced, then the system's watchdog will
correctly reboot it.
2025-12-16 09:34:00 +01:00
Tobias Waldekranz 0298dc3c1a test: ssh: Wait for target SSH server to launch, by default
By default, ensure that the target device accepts TCP connections on
the specified port before returning the device object. This aligns the
SSH implementation with {NET,REST}CONF.

This solves the issue where tests that use SSH commands early in their
execution would sometimes fail as the remote server had not started up
yet.
2025-12-16 09:33:51 +01:00
Richard Alpe cb9aeea351 statd: compress journal snapshots with gzip
Store historical snapshots as compressed .json.gz files to reduce disk
usage. The operational.json file remains uncompressed for easy access.

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-15 11:07:45 +01:00
Richard Alpe c767a6f9a0 statd: add operational data journal with retention policy
Dump operational datastore to timestamped JSON snapshots every 5 minutes
(in /var/lib/statd/). The operational.json symlink always points to the
latest snapshot.

Implement hierarchical retention policy that keeps the first snapshot of
each time period (hour/day/week/month/year), providing fine-grained recent
history while preventing unbounded disk usage.

This will allow us to plot / track how the system state evolves as
well as give us somewhat fine-grained info in the case of an event,
such as a crash.

Add unit test simulating months of snapshots to verify retention
behavior using a statd stub that only runs the retention code locally
(unit test)

Signed-off-by: Richard Alpe <richard@bit42.se>
2025-12-09 16:16:53 +01:00
Joachim WibergandGitHub 2d35f15242 Merge pull request #1306 from kernelkit/rip 2025-12-06 20:44:58 +01:00
Joachim Wiberg c89c1f689b support: diagnostic debug for flaky test
This patch adds diagnostic data and additional logging to catch the root
cause for issue #1303:

  - Exactly when and why cleanup is called
  - Whether the cd /tmp command succeeds
  - The actual tar exit code (not just 255 from SSH)
  - Whether cleanup happens before tar completes (race condition)
  - The full collection.log showing the sequence of events

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-05 14:40:02 +01:00
Joachim Wiberg 8c52ffc4ca test: update unit test data for new ip forwarding
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-05 11:12:04 +01:00
Joachim Wiberg 0a491ffff5 test: add new tests for RIP
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-05 11:12:03 +01:00
Joachim WibergandGitHub ec0ed82b71 Merge pull request #1267 from kernelkit/post-post-image
Move to a post post-image world

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-03 20:32:36 +01:00
Tobias Waldekranz aee053c94b board/common: Move QEMU disk creation to separate make target 2025-12-03 16:46:04 +01:00
Joachim Wiberg c0646d1a66 test: new test to verify ospf debug logging
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 17:06:13 +01:00
Joachim Wiberg d6721742c4 test: new test, verify support data collection
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:00 +01:00
Joachim Wiberg d1f053b41c test: minor, update test specifications
Sync with latest updates, including test path changes.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-02 14:11:00 +01:00
Joachim Wiberg 72445004c8 test: add missing test specs
Add missing test specs for new dhcpv6 tests.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-27 19:37:23 +01:00
Joachim Wiberg 209faa70b6 test: attempt to stabilize syslog hostname filtering
- Refactor to use a common function for all messages
- Use until() to retry check_log()

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-26 19:28:48 +01:00
Joachim Wiberg b40c605ac5 test/case: simplify and add load-bearing sleep(2)
This (new) test sometimes fail on HW, so let's hold off a while before
sending our log messages.  Ths should allow the DUTs to settle.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:24 +01:00
Joachim Wiberg 1bbd80d8c7 test: drop leading ietf/infix prefix from directories
Let's drop the leading IETF or Infix prefixes from tests.  Initially the
idea was to mimnic the YANG models, but it's difficult to navigate and
does not provide any real benefit to developers or end-users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:23 +01:00
Joachim Wiberg 93333ca3b2 test: add new tests to test specification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:38 +01:00
Joachim Wiberg 956f2b620d test: new syslog test to verify property based filtering
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:38 +01:00
Joachim Wiberg efb3d88e35 test: new syslog test to verify filtering by hostname
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 14:05:37 +01:00
Joachim Wiberg f71755d8ca test: new syslog tests to verify regexp and comparison ops
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:06 +01:00
Joachim Wiberg a048a312c7 test: review syslog remote test, coding style
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:05 +01:00
Joachim Wiberg a99f231984 test: review syslog-basic, improve test description
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 12:00:05 +01:00
Joachim Wiberg 74351c51c1 test: add new tests to test specification
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:44 +01:00
Joachim Wiberg df1df83229 test: new test, dhcp hostname priority test
Verify deterministic hostname management via /etc/hostname.d/, rules:

 1. Configured hostname takes precedence over default
 2. DHCP hostname takes precedence over configured
 3. Hostname reverts when DHCP lease ends

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg 0d44b44bac test: redirect python cache to /tmp to fix cleanup issues
Set PYTHONPYCACHEDIR=/tmp/__pycache__ in test/env to avoid permission issues
during git cleanup operations.  When tests run in Docker containers as root,
__pycache__ directories and .pyc files end up owned by root, preventing the
CI user from cleaning them up.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg 6b467b99a8 test/infamy: allow more fine-grained control of macvlans
This change exposes the macvlan mode to tests, unlocking support for running
certain types of tests on systems with only a single Ethernet port.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:43 +01:00
Joachim Wiberg e241b14c2a test/infamy: pep-8, minor whitespace
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 10:45:42 +01:00
Joachim Wiberg c91fc1f38b test: add dhcpv6 client tests
- Basic DHCPv6 client, request a lease and verify Linux installs a
   default route from the Router Advertisements (option not included
   in DHCPv6), hence the 'enable-ra' option to dnsmasq.  Also verify
   DNS resolution over IPv6, including the resolvconf dance
 - Prefix delegation, verifies that the client can actually request
   and receives a prefix from a DHCPv6 server.  We don't do anything
   with it today though

Two new DHCP server implementations, the basic test relies on dnsmasq
and the prefix delegation test requires an ISC based dhcp server with
server side support for ipv6 prefix delegation.  We could reuse the
latter for both tests, but this way we get compatibility testing.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 18:11:32 +01:00
Joachim Wiberg 987dd40e1f test/infamy: support ipv6 addresses in iface.address_exist()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-18 13:28:17 +01:00