www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dustmite always reduced to empty set after two iterations

reply =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
Once again I need to pick up Dustmite to track down a DMD and LDC 
ICE in release mode for my project. But I can't figure out how 
call Dustmite correctly:

When I build https://github.com/nordlow/phobos-next as

     /usr/bin/dub build --compiler=dmd --build=release

it prints

     Performing "release" build using dmd for x86_64.
     phobos-next 0.2.0+commit.1570.gec0578b0: building 
configuration "library"...

to stdout and

     Segmentation fault (core dumped)
     dmd failed with exit code 139.

to stderr, along with a (dub) exit status code 2.

My first idea is to make stderr "core dumped" the invariant. 
Therefore my first try becomes to redirect stderr to stdout (in 
bash) and grep for the pattern 'core dumped' as follows

     dustmite src "/usr/bin/dub build --root=.. --compiler=dmd 
--build=release 2>&1| grep 'core dumped'"

But this gets reduced to empty set as follows


...
Loading src/zio.d
None => Yes

============= Depth 0 =============
[ 0.0%] Remove [] => Yes
Done in 2 tests and 12 secs and 653 ms; reduced to empty set


I've also tried adding the flag

--no-redirect

but then I instead get


...
Loading src/zio.d
None => Segmentation fault (core dumped)
Yes

============= Depth 0 =============
[ 0.0%] Remove [] => Segmentation fault (core dumped)
Yes
Done in 2 tests and 11 secs and 122 ms; reduced to empty set


What am I doing wrong?
Oct 11 2017
next sibling parent Vladimir Panteleev <thecybershadow.lists gmail.com> writes:
On Wednesday, 11 October 2017 at 20:36:58 UTC, Nordlöw wrote:
 What am I doing wrong?
Invoking dub from dustmite probably isn't going to work well. Instead, try using dub's dustmite command: https://code.dlang.org/docs/commandline#dustmite
Oct 11 2017
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2017-10-11 22:36, Nordlöw wrote:

 My first idea is to make stderr "core dumped" the invariant. Therefore 
 my first try becomes to redirect stderr to stdout (in bash) and grep for 
 the pattern 'core dumped' as follows
IIRC, segmentation faults are printed by the shell and not the application. There you cannot grep on it because it's not the application that prints it. You would need to wrap it in a shell script or similar. Although, I'm not sure if that changes when you go through DUB. -- /Jacob Carlborg
Oct 11 2017