Skip to content

Commit

Permalink
tests: Don't run py test_rlimit test on newer kernels
Browse files Browse the repository at this point in the history
Since commit d5299b67dd59 ("bpf: Memcg-based memory accounting for bpf
maps"), memory locked by bpf maps is no longer counted against rlimit.

Ubuntu 20.04's 5.11 kernel has this commit, so we should skip this test
there. When we add future distros to github actions it may be necessary
to modify the version check here.
  • Loading branch information
davemarchevsky committed Nov 17, 2021
1 parent 74d235f commit e16aca0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/python/test_rlimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
from __future__ import print_function
from bcc import BPF
from unittest import main, skipUnless, TestCase
from utils import kernel_version_ge
import distutils.version
import os, resource

@skipUnless(not kernel_version_ge(5, 11), "Since d5299b67dd59 \"bpf: Memcg-based memory accounting for bpf maps\""\
",map mem has been counted against memcg, not rlimit")
class TestRlimitMemlock(TestCase):
def testRlimitMemlock(self):
text = """
Expand Down

0 comments on commit e16aca0

Please sign in to comment.