On 17/05/13 07:07 AM, Daniel P. Berrange wrote:
If you want punishment, why not go for extra punishment?

MALLOC_PERTURB_=$(($RANDOM % 255 + 1))

That could lead to non-reproducable failures though. I think it is better
to use a fixed value so that you're more likely to be able to reproduce
the issue every time you run the tests.

Rather than setting MALLOC_PERTURB_=1 unconditionally in the Makefile
though, it ought to honour any existing MALLOC_PERTURB_ env variable
the user has set. That could let automated test harness run repeatedly
with random MALLOC_PERTURB_, while still giving a deterministic value
for developers by default.

Indeed. I've never thought about it, thanks for sharing the insight.

Reply via email to