aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-07-18 16:19:26 +0200
committerBjörn-Egil Dahlberg <[email protected]>2013-07-18 16:38:58 +0200
commit9e9b49c25096a4813283aae1566c2f3356cd5624 (patch)
treeaf94009c85002d1f242a217303481c8ae7cf9906 /lib/os_mon/test
parent16a21b95103ca20df2cd61cc5f0d32de72c28480 (diff)
downloadotp-9e9b49c25096a4813283aae1566c2f3356cd5624.tar.gz
otp-9e9b49c25096a4813283aae1566c2f3356cd5624.tar.bz2
otp-9e9b49c25096a4813283aae1566c2f3356cd5624.zip
os_mon: Relax disksup_SUITE api test
Diffstat (limited to 'lib/os_mon/test')
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl29
1 files changed, 19 insertions, 10 deletions
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index c1ff2c6afc..b5f3e6872b 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -78,19 +78,28 @@ end_per_group(_GroupName, Config) ->
Config.
-api(suite) ->
- [];
-api(doc) ->
- ["Test of API functions"];
+api(suite) -> [];
+api(doc) -> ["Test of API functions"];
api(Config) when is_list(Config) ->
%% get_disk_data()
- ?line [{Id, KByte, Capacity}|_] = disksup:get_disk_data(),
- ?line true = io_lib:printable_list(Id),
- ?line true = is_integer(KByte),
- ?line true = is_integer(Capacity),
- ?line true = KByte>0,
- ?line true = Capacity>0,
+ Data = disksup:get_disk_data(),
+ case lists:keysearch("/ldisk", 1, Data) of
+ {value,{Id,KByte,Capacity}} ->
+ true = io_lib:printable_list(Id),
+ true = is_integer(KByte),
+ true = is_integer(Capacity),
+ true = Capacity>0,
+ true = KByte>0;
+ _ ->
+ [{Id, KByte, Capacity}|_] = Data,
+ true = io_lib:printable_list(Id),
+ true = is_integer(KByte),
+ true = is_integer(Capacity),
+ % can be zero
+ % true = Capacity>0,
+ true = KByte>0
+ end,
%% get_check_interval()
?line 1800000 = disksup:get_check_interval(),