diff options
author | Sverker Eriksson <[email protected]> | 2017-12-12 16:32:51 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-12-12 16:32:51 +0100 |
commit | 003e5450924c4d8202e2013cac41eff58fa90584 (patch) | |
tree | 8ef15c96decae32c386685eea38b1be11e9658c9 /lib/kernel | |
parent | ec4c31031cce6db591d16f9da52c2a6cc4b90ad3 (diff) | |
download | otp-003e5450924c4d8202e2013cac41eff58fa90584.tar.gz otp-003e5450924c4d8202e2013cac41eff58fa90584.tar.bz2 otp-003e5450924c4d8202e2013cac41eff58fa90584.zip |
kernel: Try fix/skip prim_file_SUITE:large_write for valgrind
by limiting the memory usage.
Our valgrind test machine (pharazon) seems to get totally swamped
by this test case.
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/prim_file_SUITE.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl index 2f4330c217..e88d42788f 100644 --- a/lib/kernel/test/prim_file_SUITE.erl +++ b/lib/kernel/test/prim_file_SUITE.erl @@ -2108,12 +2108,25 @@ free_memory() -> {value, {buffered_memory, Buffed}} -> Buffed; false -> 0 end), - TotFree div (1024*1024) + usable_mem(TotFree) div (1024*1024) catch error : undef -> ct:fail({"os_mon not built"}) end. +usable_mem(Memory) -> + case test_server:is_valgrind() of + true -> + %% Valgrind uses extra memory for the V- and A-bits. + %% http://valgrind.org/docs/manual/mc-manual.html#mc-manual.value + %% Docs says it uses "compression to represent the V bits compactly" + %% but let's be conservative and cut usable memory in half. + Memory div 2; + false -> + Memory + end. + + %%%----------------------------------------------------------------- %%% Utilities rm_rf(Mod,Dir) -> |