Conversation
- Apply IPv4 and IPv6 iptables rules concurrently to reduce startup latency. - Cache available external interfaces to avoid repeated I/O and parsing.
The final DobbySpecConfigTest build uses the real DobbyTemplate.cpp directly (with bundle/lib/include ordered before the mocks dir so the real header is found first). The stub file was created during an intermediate debugging step and was never needed in the final approach, but it was accidentally left on disk. file(GLOB TESTS *.cpp) in the CMakeLists was picking it up, causing a CI build failure because DobbyTemplateImpl is not defined when the real DobbyTemplate.h is in scope.
This reverts commit 90c154b.
…tiprocessing
multiprocessing.Process requires pickling its target function. Python
cannot pickle nested (local) functions, so on environments where the
multiprocessing start method is 'spawn' (or where pickling is otherwise
attempted) this raises:
_pickle.PicklingError: Can't pickle local object
read_asynchronous.<locals>.wait_for_string
The wait_for_string helper reads lines from a subprocess pipe until a
string is found -- this is I/O-bound work that needs no separate process.
Replace multiprocessing.Process with threading.Thread(daemon=True):
- No pickling required; the thread closure captures proc and
string_to_find directly from the enclosing scope.
- daemon=True ensures the thread is silently reaped if it is still
blocked on readline() when the timeout expires.
- The is_alive() / join(timeout) logic is unchanged.
swap_limit_tests.py was added in an earlier commit but was never wired into runner.py, so the swap-limit integration checks were silently skipped in CI. Add the import and register the module in supported_tests so it runs as part of the full L2 suite.
RDKEMW-16534: Make container swap limit configurable independently of memory limit
RDKEMW-16534: Make container swap limit configurable independently of memory limit
* crun failure * L2 Dobby Fix * Remove cov lock * remove lockguard * l2 failures
#440) * RDKEMW-16534: Set memory+swap to be unlimited if swap_limit is not set * RDKEMW-16534: Fix copilot review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* RDKEMW-12824: Propagate signal from DobbyInit to DobbyDaemon via 128+sig exit code * RDKEMW-12824: Propagate direct child signal death to DobbyDaemon * RDKEMW-12824: Fix copilot comments * RDKEMW-12824: Use NSIG instead of hard-coded 64 for signal range * RDKEMW-12824: Extract signal status synthesis into testable helper and add L1 tests * RDKEMW-12824: Log direct signal death when DobbyInit is killed by SIGKILL --------- Co-authored-by: B-Larsen <145688157+B-Larsen@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR syncs main with develop, bringing in updates across the Dobby daemon/init, OCI bundle generation, test runner robustness, and CI workflows. Key themes are improved CI stability (especially on cgroup v2 hosts), expanded memory/swap configuration support via Dobby specs, and better propagation/logging of signal-related container exits.
Changes:
- Add
swapLimitsupport to Dobby specs and OCI template generation (including new L1/L2 tests validating behavior). - Improve container-exit signal propagation (DobbyInit exits with
128+signum; DobbyDaemon synthesizesWIFSIGNALED-style status and logs signal details). - Harden L2 test infrastructure and CI workflows (bundle validation, D-Bus readiness wait, cgroup v2 compatibility steps, additional test suites).
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/L2_testing/test_runner/thunder_plugin.py | Sanitizes bundle config for broader compatibility; makes pause/resume tests platform-conditional; adds bundle validation handling. |
| tests/L2_testing/test_runner/test_utils.py | Adds bundle extraction validation and nested-config detection; adds daemon readiness probing; improves start retry/diagnostics. |
| tests/L2_testing/test_runner/swap_limit_tests.py | New L2 tests validating swap-limit behavior via container log output. |
| tests/L2_testing/test_runner/start_from_bundle.py | Adds bundle validation checks and a small delay to allow file logging to flush before validation. |
| tests/L2_testing/test_runner/runner.py | Adds swap-limit test group; avoids reading per-suite JSON when a suite has 0 tests. |
| tests/L2_testing/test_runner/pid_limit_tests.py | Improves PID limit validation by resolving cgroup paths across v1/v2/systemd layouts and via /proc/<pid>/cgroup. |
| tests/L2_testing/test_runner/network_tests.py | Uses common container launch helper; adds bundle validation failure handling. |
| tests/L2_testing/test_runner/memcr_tests.py | Adds PID parsing/waiting and makes PID checkpoint validation skippable when PID info is unavailable. |
| tests/L2_testing/test_runner/bundle/regenerate_bundles.py | New helper script to patch/repack L2 bundles for cgroup v2 compatibility. |
| tests/L2_testing/test_runner/bundle_generation.py | Switches to normalized JSON config comparison and verifies generated rootfs presence; adds bundle validation handling. |
| tests/L2_testing/test_runner/basic_sanity_tests.py | Replaces multiprocessing reader with select() timeout read; makes stop verification rely on process absence. |
| tests/L2_testing/test_runner/annotation_tests.py | Runs annotation test from a Dobby spec path and ensures the container is stopped after validation. |
| tests/L2_testing/dobby_specs/swap_limit.json | New Dobby spec for swap-limit override scenario. |
| tests/L2_testing/dobby_specs/swap_limit_default.json | New Dobby spec for default swap-limit behavior scenario. |
| tests/L1_testing/tests/DobbySpecConfigTest/DobbySpecConfigTest.cpp | New L1 unit tests for swapLimit parsing and template dictionary population. |
| tests/L1_testing/tests/DobbySpecConfigTest/DobbySpecConfigLinkStubs.cpp | Adds link stubs for uncalled symbols needed to compile DobbySpecConfig unit tests. |
| tests/L1_testing/tests/DobbySpecConfigTest/CMakeLists.txt | New CMake target to build/link the DobbySpecConfig unit tests. |
| tests/L1_testing/tests/DobbyManagerTest/DaemonDobbyManagerTest.cpp | Adds unit tests for DobbyManager::synthesizeContainerSignalStatus() across exit/signal edge cases. |
| tests/L1_testing/tests/CMakeLists.txt | Adds the new DobbySpecConfig L1 test directory. |
| tests/L1_testing/mocks/DobbyBundleMock.h | Extends bundle mock interface with getPersistence() and dirFd(). |
| tests/L1_testing/mocks/DobbyBundleMock.cpp | Implements forwarding wrappers for getPersistence() and dirFd() in the mock layer. |
| tests/L1_testing/mocks/DobbyBundle.h | Adds getPersistence() / dirFd() to the mock bundle interface and wrapper. |
| README.md | Documents Dobby spec top-level fields and adds memory/swap configuration example. |
| daemon/lib/source/include/DobbyManager.h | Exposes synthesizeContainerSignalStatus() as a public static helper. |
| daemon/lib/source/DobbyManager.cpp | Implements signal-status synthesis and adds clearer logging of signal-related container termination. |
| daemon/init/source/InitMain.cpp | Records received signals and exits with 128+signum to propagate signal death info to the parent. |
| client/tool/source/Main.cpp | Removes callback-side locking around promise fulfillment to avoid deadlock. |
| bundle/lib/source/templates/OciConfigJsonVM1.0.2-dobby.template | Switches memory swap field from MEM_LIMIT to MEM_SWAP. |
| bundle/lib/source/templates/OciConfigJson1.0.2-dobby.template | Switches memory swap field from MEM_LIMIT to MEM_SWAP. |
| bundle/lib/source/DobbySpecConfig.cpp | Adds swapLimit processing and a MEM_SWAP template variable with default -1 when absent. |
| bundle/lib/include/DobbySpecConfig.h | Declares the new processSwapLimit JSON processor. |
| .github/workflows/L2-tests.yml | Adds cgroup v2 compatibility steps (template patching, bundle regeneration, swap-limit test stubbing) and adjusts lcov error handling. |
| .github/workflows/L1-tests.yml | Formats matrix values, runs new DobbySpecConfig L1 test, and archives its results. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
madanagopalt
previously approved these changes
May 15, 2026
RDKEMW-17764: Update Dobby v3.18.0
madanagopalt
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Sync main branch with develop
Type of Change
Requires Bitbake Recipe changes?
meta-rdk-ext/recipes-containers/dobby/dobby.bb) must be modified to support the changes in this PR (beyond updatingSRC_REV)