Skip to content

test(oci-cfg): expand unit tests for oci cfg builder mounts, env and security rules - #1923

Open
elephone-184 wants to merge 2 commits into
OpenAtom-Linyaps:masterfrom
elephone-184:pr-9-oci-cfg
Open

test(oci-cfg): expand unit tests for oci cfg builder mounts, env and security rules#1923
elephone-184 wants to merge 2 commits into
OpenAtom-Linyaps:masterfrom
elephone-184:pr-9-oci-cfg

Conversation

@elephone-184

Copy link
Copy Markdown

Summary

Expands unit test coverage for linglong::oci-cfg-generators subsystem (>525 lines added):

  • ContainerCfgBuilder: environment variable deduplication, map ingestion, and explicit overwrite semantics.
  • ContainerCfgBuilder: multi-range subuid/subgid mappings across user namespaces.
  • ContainerCfgBuilder: ordering integrity and bind options for user-supplied extra mounts.
  • ContainerCfgBuilder: timezone environment propagation and DNS resolv.conf bind mounting.
  • ContainerCfgBuilder: overlay mode root filesystem readonly configuration.
  • ContainerCfgBuilder: security capabilities bounding, permitted, and effective sets.
  • ContainerCfgBuilder: kernel /proc, /sys, and dangerous path masking and readonly protection.
  • ContainerCfgBuilder: X11/Wayland display sockets, Pipewire, and AtSpi accessibility endpoints.

Test Plan

  • Verified against OCI runtime specification v1.0.1 data types.
  • Code conforms to C++17 standards and GoogleTest conventions.
  • Registered in ll-tests CMake configuration.

…security rules

Add unit tests covering:
- ContainerCfgBuilder environment variable overwriting, preservation, and maps
- UID/GID mapping with multiple subuid/subgid ranges
- Extra mounts insertion and preservation of bind mount options
- Timezone and DNS resolv.conf mounting mechanisms
- OverlayFS mode root readonly flags and configuration
- Annotation propagation for app ID, Wayland sockets, and PID
- Media and accessibility socket mounts (Pipewire, AtSpi)
- Security capabilities bounding and effective sets
- Masked paths and readonly kernel / sys paths security protection
@deepin-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: elephone-184

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown
Collaborator

Hi @elephone-184. Thanks for your PR.

I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@elephone-184

Copy link
Copy Markdown
Author

pre-commit.ci autofix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants