summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2014-02-22 13:46:42 -0800
committerAliaksey Kandratsenka <alk@tut.by>2014-02-22 13:46:42 -0800
commitbd9665ebbe1aca5e1ba993de4214e64ee8bbe43a (patch)
tree75f20f232b1a5958cf55c28f750c943b2a05ac41
parent6a000d6dd5968ac29f8fc43f7dfc736338e11781 (diff)
downloadgperftools-bd9665ebbe1aca5e1ba993de4214e64ee8bbe43a.tar.gz
issue-489: added tcmalloc test pass with chromium-style decommit
-rwxr-xr-xsrc/tests/tcmalloc_unittest.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/tests/tcmalloc_unittest.sh b/src/tests/tcmalloc_unittest.sh
index 7f806b5..60411f1 100755
--- a/src/tests/tcmalloc_unittest.sh
+++ b/src/tests/tcmalloc_unittest.sh
@@ -44,11 +44,7 @@ TMPDIR=/tmp/tcmalloc_unittest
rm -rf $TMPDIR || exit 2
mkdir $TMPDIR || exit 3
-# $1: value of tcmalloc_unittest env. var.
-run_check_transfer_num_obj() {
- [ -n "$1" ] && export TCMALLOC_TRANSFER_NUM_OBJ="$1"
-
- echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_TRANSFER_NUM_OBJ=$1 ... "
+run_unittest() {
if $TCMALLOC_UNITTEST > $TMPDIR/output 2>&1; then
echo "OK"
else
@@ -61,8 +57,20 @@ run_check_transfer_num_obj() {
fi
}
+# $1: value of tcmalloc_unittest env. var.
+run_check_transfer_num_obj() {
+ [ -n "$1" ] && export TCMALLOC_TRANSFER_NUM_OBJ="$1"
+
+ echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_TRANSFER_NUM_OBJ=$1 ... "
+ run_unittest
+}
+
run_check_transfer_num_obj ""
run_check_transfer_num_obj "40"
run_check_transfer_num_obj "4096"
+echo -n "Testing $TCMALLOC_UNITTEST with TCMALLOC_AGGRESSIVE_DECOMMIT=t ... "
+
+TCMALLOC_AGGRESSIVE_DECOMMIT=t run_unittest
+
echo "PASS"