Commit ea4c88e8 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5949 suppress valgrind on the first (crashing) execution of...

refs #5949 suppress valgrind on the first (crashing) execution of recovery_fileops_unit.tdb, for some reason raise(SIGKILL) hangs valgrind in that test

git-svn-id: file:///svn/toku/tokudb@52783 c7de825b-a66e-492c-adef-691d508d4ae1
parent 315386fa
...@@ -124,7 +124,7 @@ do_args(int argc, char * const argv[]) { ...@@ -124,7 +124,7 @@ do_args(int argc, char * const argv[]) {
} }
char c; char c;
while ((c = getopt(argc, argv, "vqhcrO:A:B:C:D:E:F:G:H:I:")) != -1) { while ((c = getopt(argc, argv, "vqhcrO:A:B:C:D:E:F:G:H:I:X:")) != -1) {
switch(c) { switch(c) {
case 'v': case 'v':
verbose++; verbose++;
...@@ -174,6 +174,13 @@ do_args(int argc, char * const argv[]) { ...@@ -174,6 +174,13 @@ do_args(int argc, char * const argv[]) {
usage(); usage();
choices[c - 'A'] = num; choices[c - 'A'] = num;
break; break;
case 'X':
if (strcmp(optarg, "novalgrind") == 0) {
// provide a way for the shell script runner to pass an
// arg that suppresses valgrind on this child process
break;
}
// otherwise, fall through to an error
default: default:
usage(); usage();
break; break;
......
...@@ -8,7 +8,7 @@ errorfile=$1; shift ...@@ -8,7 +8,7 @@ errorfile=$1; shift
abortcode=$1; shift abortcode=$1; shift
set +e set +e
$bin -c $@ 2> $errorfile $bin -X novalgrind -c $@ 2> $errorfile
test $? -eq $abortcode || { cat $errorfile; echo Error: no crash in $errorfile; exit 1; } test $? -eq $abortcode || { cat $errorfile; echo Error: no crash in $errorfile; exit 1; }
set -e set -e
grep -q 'HAPPY CRASH' $errorfile || { cat $errorfile; echo Error: incorrect crash in $errorfile; exit 1; } grep -q 'HAPPY CRASH' $errorfile || { cat $errorfile; echo Error: incorrect crash in $errorfile; exit 1; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment