aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-05-17 14:38:58 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-05-17 14:38:58 +0200
commit0545c22c9c07c55569e067c57ec184f018a54947 (patch)
treeaf22bc5f4488ae95ea49dbd256b4b1ba82ce43ab /lib
parent16faeb48b504238aaabd64b6f3c206d4be1a3172 (diff)
parent6b51a01cd6333c15a7abad8e9ee8ac3773f49965 (diff)
downloadotp-0545c22c9c07c55569e067c57ec184f018a54947.tar.gz
otp-0545c22c9c07c55569e067c57ec184f018a54947.tar.bz2
otp-0545c22c9c07c55569e067c57ec184f018a54947.zip
Merge branch 'jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601'
* jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601: Fix memsup:get_os_wordsize() on 64-bit Linux PPC os_mon: Test wordsize of memsup:get_os_wordsize/0 Fix memsup:get_os_wordsize() on 64-bit FreeBSD
Diffstat (limited to 'lib')
-rw-r--r--lib/os_mon/src/memsup.erl2
-rw-r--r--lib/os_mon/test/memsup_SUITE.erl14
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/os_mon/src/memsup.erl b/lib/os_mon/src/memsup.erl
index d9d3083540..4729d090f8 100644
--- a/lib/os_mon/src/memsup.erl
+++ b/lib/os_mon/src/memsup.erl
@@ -699,6 +699,8 @@ get_os_wordsize_with_uname() ->
case String of
"x86_64" -> 64;
"sparc64" -> 64;
+ "amd64" -> 64;
+ "ppc64" -> 64;
_ -> 32
end.
diff --git a/lib/os_mon/test/memsup_SUITE.erl b/lib/os_mon/test/memsup_SUITE.erl
index fcd1417693..e40ed574e7 100644
--- a/lib/os_mon/test/memsup_SUITE.erl
+++ b/lib/os_mon/test/memsup_SUITE.erl
@@ -100,10 +100,16 @@ api(Config) when is_list(Config) ->
%% get_os_wordsize()
ok = case memsup:get_os_wordsize() of
- 32 -> ok;
- 64 -> ok;
- unsupported_os -> ok;
- _ -> error
+ 32 ->
+ 32 = 8*erlang:system_info({wordsize,external}),
+ ok;
+ 64 ->
+ % No reliable test here
+ ok;
+ unsupported_os ->
+ ok;
+ _ ->
+ error
end,
%% get_check_interval()