diff options
author | Rob Crittenden <rcritten@redhat.com> | 2015-03-04 17:36:29 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2015-03-16 13:47:41 -0400 |
commit | e79330365b0da99c57d22e18df5df0760712ad7f (patch) | |
tree | 11405e9ff04631a4bbf2b2bc3ec6bdb3c39b7229 /tests/helpers | |
parent | 0ed1c2f8e804400a0b9e94e191f03ec135338727 (diff) | |
download | ipsilon-e79330365b0da99c57d22e18df5df0760712ad7f.tar.gz ipsilon-e79330365b0da99c57d22e18df5df0760712ad7f.tar.xz ipsilon-e79330365b0da99c57d22e18df5df0760712ad7f.zip |
Set MALLOC_CHECK_ and MALLOC_PERTURB_ to catch memory problems
MALLOC_CHECK_ set to 3 should abort if a memory problem is found.
MALLOC_PERTURB_ should catch any usage of freed memory.
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-by: Nathan Kinder <nkinder@redhat.com>
Diffstat (limited to 'tests/helpers')
-rwxr-xr-x | tests/helpers/common.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/helpers/common.py b/tests/helpers/common.py index e316718..56ea9ff 100755 --- a/tests/helpers/common.py +++ b/tests/helpers/common.py @@ -24,6 +24,7 @@ import os import pwd import shutil import signal +import random from string import Template import subprocess @@ -126,6 +127,8 @@ class IpsilonTestBase(object): f.write(auth) def start_http_server(self, conf, env): + env['MALLOC_CHECK_'] = '3' + env['MALLOC_PERTURB_'] = str(random.randint(0, 32767) % 255 + 1) p = subprocess.Popen(['/usr/sbin/httpd', '-DFOREGROUND', '-f', conf], env=env, preexec_fn=os.setsid) self.processes.append(p) |