|
From: Avery P. <ape...@ni...> - 2003-12-01 17:48:39
|
On Mon, Dec 01, 2003 at 02:10:38PM +0000, Nicholas Nethercote wrote: > On Sun, 30 Nov 2003, Avery Pennarun wrote: > > In this particular case, I want to suppress scary-looking output (ie. > > anything from valgrind) because it happens in the middle of my unit > > tests, and scary-looking output from my unit tests should constitute a > > bug, not a bonus valgrind feature :) > > Are you using -q? In that case, I think you do not want Valgrind to not > leak-check fork() children, but to just be quieter, and only print a > message if there is a genuine leak. Is that right? Hmm, I feel a bit silly that I didn't think of using -q. Now I tried it, and it still doesn't quite work the way I want: in fact, I don't think I want "quietness" so much, because I like having the valgrind banner at the top and bottom reminding me that I am, in fact, running valgrind. I agree with you about the different kinds of memory leaks. In this case, I guess I *do* want to hear about "really lost" memory, but not about "still accessible non-freed" memory... in the subprocess. In the main process, I want to hear about both, and it seems that using '-q' gets rid of the memory final summary altogether, even if there are leaks. (If I add --leak-check=yes, then I get both the parent and subtasks' summaries.) Hmm, I'm not sure what I want. Maybe I want a summary even if -q is enabled, but *only* if errors were detected. And then a way to auto-enable -q in a subtask but not in my main task? Have fun, Avery |