Add helper function to set rlimit for tests

Add a helper function to check if the current device have sufficient
MEMLOCK rlimit for bpf related unit tests. If not, try to set it to a
proper size.

Bug: 119279144
Bug: 129246448
Test: libbpf_android_test
Change-Id: I5390f4d3b21436abff69a661d1c6e6a6749542ed
Merged-In: I5390f4d3b21436abff69a661d1c6e6a6749542ed
(Cherry-picked from commit 0a1a9a11d96d937e7563659f92edf04fafa766c9)
3 files changed
tree: 3eec639b277d14a24fc410787cb5842dba254fe4
  1. bpfloader/
  2. libbpf_android/
  3. progs/
  4. Android.bp
  5. MODULE_LICENSE_APACHE2
  6. NOTICE
  7. OWNERS
  8. PREUPLOAD.cfg