Link Here
|
1 |
--- tests/time-max-rss.sh.orig 2023-09-14 02:47:32 UTC |
2 |
+++ tests/time-max-rss.sh |
3 |
@@ -32,13 +32,13 @@ time-aux || framework_failure_ "time-aux is missing/no |
4 |
env time -o mem-baseline -f "%M" time-aux \ |
5 |
|| framework_failure_ "failed to run time/time-aux (baseline max-rss)" |
6 |
|
7 |
-# Allocate 5MB of RAM |
8 |
-env time -o mem-5MB -f "%M" time-aux -m 5M \ |
9 |
- || framework_failure_ "failed to run time/time-aux (5M max-rss)" |
10 |
+# Allocate 400MB of RAM |
11 |
+env time -o mem-400MB -f "%M" time-aux -m 400M \ |
12 |
+ || framework_failure_ "failed to run time/time-aux (400M max-rss)" |
13 |
|
14 |
# Calculate the difference |
15 |
b=$(cat mem-baseline) || framework_failure_ "failed to read mem-baseline" |
16 |
-c=$(cat mem-5MB) || framework_failure_ "failed to read mem-5MB" |
17 |
+c=$(cat mem-400MB) || framework_failure_ "failed to read mem-400MB" |
18 |
d=$(( c - b )) |
19 |
|
20 |
# On some systems (e.g. OpenSolaris) getrusage(2) returns zero in ru_maxrss. |
21 |
@@ -48,13 +48,13 @@ test "$b" -eq "0" && test "$c" -eq 0 \ |
22 |
|
23 |
# There could be alot of variation between each invocation, |
24 |
# accept a reasonable range |
25 |
-if test "$d" -ge 5000 && test "$d" -le 6000 ; then |
26 |
- : # acceptable values: 5000-6000 KB |
27 |
+if test "$d" -ge 400000 && test "$d" -le 500000 ; then |
28 |
+ : # acceptable values: 400000-500000 KB |
29 |
else |
30 |
cat<<EOF>&2 |
31 |
-time(1) failed to detect 5MB allcoation. |
32 |
+time(1) failed to detect 400MB allcoation. |
33 |
mem-baseline(kb): $b |
34 |
- mem-5MB(kb): $c |
35 |
+ mem-400MB(kb): $c |
36 |
delta(kb): $d |
37 |
EOF |
38 |
fail=1 |