Skip to content

Commit

Permalink
test: Bump up locked memory in lockmem tests further
Browse files Browse the repository at this point in the history
In a previous commit --
672c453 "test: Bump up locked memory in lockmem tests"
-- the lockmem tests bumped up the locked-memory limit for cases where
DTrace is expected to load successfully.  That patch helped the tests
pass under wider conditions, but further increases are warranted.

Increase the lockmem limit for cases expecting successful loads.
Specifically, use 256G, as runtest.sh does for "ulimit -l".

Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Nov 9, 2022
1 parent 7ff38c7 commit a813850
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/unittest/misc/tst.lockmem-cmdline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
# @@nosort

dtrace=$1

for val in 1 262144 unlimited; do
for val in 1 268435456 unlimited; do
ulimit -l $val

$dtrace -qn 'BEGIN { @ = avg(1234); exit(0); }'
Expand Down
3 changes: 3 additions & 0 deletions test/unittest/misc/tst.lockmem-envvar.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

1234
0

1234
0
-- @@stderr --
dtrace: could not enable tracing: failed to create BPF map 'state':
The kernel locked-memory limit is possibly too low. Set a
Expand Down
3 changes: 2 additions & 1 deletion test/unittest/misc/tst.lockmem-envvar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
# @@nosort

dtrace=$1

ulimit -l 1

for val in 16 1K 262144K 256M unlimited; do
for val in 16 1K 268435456K 262144M 256G unlimited; do
DTRACE_OPT_LOCKMEM=$val $dtrace -qn 'BEGIN { @ = avg(1234); exit(0); }'
echo $?
done
Expand Down
3 changes: 3 additions & 0 deletions test/unittest/misc/tst.lockmem-pragma.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

1234
0

1234
0
-- @@stderr --
dtrace: could not enable tracing: failed to create BPF map 'state':
The kernel locked-memory limit is possibly too low. Set a
Expand Down
3 changes: 2 additions & 1 deletion test/unittest/misc/tst.lockmem-pragma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
# @@nosort

dtrace=$1

ulimit -l 1

for val in 16 1K 262144K 256M unlimited; do
for val in 16 1K 268435456K 262144M 256G unlimited; do
$dtrace -qs /dev/stdin << EOF
#pragma D option lockmem=$val
Expand Down
3 changes: 3 additions & 0 deletions test/unittest/misc/tst.lockmem-x.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

1234
0

1234
0
-- @@stderr --
dtrace: could not enable tracing: failed to create BPF map 'state':
The kernel locked-memory limit is possibly too low. Set a
Expand Down
3 changes: 2 additions & 1 deletion test/unittest/misc/tst.lockmem-x.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
#
# @@nosort

dtrace=$1

ulimit -l 1

for val in 16 1K 262144K 256M unlimited; do
for val in 16 1K 268435456K 262144M 256G unlimited; do
$dtrace -xlockmem=$val -qn 'BEGIN { @ = avg(1234); exit(0); }'
echo $?
done
Expand Down

0 comments on commit a813850

Please sign in to comment.