> 71 + //(nbufs=3,fcomp=2,ncomp=1,fready=0,nready=1,fclient=1,nclient=1)
> <-- BUG starts here
> 72 + // Should be:
> 73 + //(nbufs=3,fcomp=0,ncomp=1,fready=0,nready=0,fclient=1,nclient=1)
> ...
> 77 + //(nbufs=3,fcomp=2,ncomp=1,fready=0,nready=2,fclient=2,nclient=0)
> 78 + // Should be:
> 79 + //(nbufs=3,fcomp=0,ncomp=1,fready=1,nready=1,fclient=2,nclient=0)
>
> These comments are too cryptic for me.
This is the output of operator<<, telling the internal state of SwitchingBundle.
>
> 81 + client_buffer = bundle.client_acquire(); // <- would lock here if in
> buggy state
>
> I'm not a fan of tests that fail by hanging.
Me neither, suggestions?
That's the external, "visible", symptom of this bug. The other option being checking the internal state of SwitchingBundle after each step to see if doing things correctly. But duflu doesn't like that.
I vote for internal state checks, as explained on a previous comment.
So, what do we do?
1 - test if it locks (current approach)
2 - check the internal state (doesn't hang when it fails as it detects the issue at earlier steps)
3 - Suggestions?
> 71 + //(nbufs= 3,fcomp= 2,ncomp= 1,fready= 0,nready= 1,fclient= 1,nclient= 1) 3,fcomp= 0,ncomp= 1,fready= 0,nready= 0,fclient= 1,nclient= 1) 3,fcomp= 2,ncomp= 1,fready= 0,nready= 2,fclient= 2,nclient= 0) 3,fcomp= 0,ncomp= 1,fready= 1,nready= 1,fclient= 2,nclient= 0)
> <-- BUG starts here
> 72 + // Should be:
> 73 + //(nbufs=
> ...
> 77 + //(nbufs=
> 78 + // Should be:
> 79 + //(nbufs=
>
> These comments are too cryptic for me.
This is the output of operator<<, telling the internal state of SwitchingBundle.
> client_ acquire( ); // <- would lock here if in
> 81 + client_buffer = bundle.
> buggy state
>
> I'm not a fan of tests that fail by hanging.
Me neither, suggestions?
That's the external, "visible", symptom of this bug. The other option being checking the internal state of SwitchingBundle after each step to see if doing things correctly. But duflu doesn't like that.
I vote for internal state checks, as explained on a previous comment.
So, what do we do?
1 - test if it locks (current approach)
2 - check the internal state (doesn't hang when it fails as it detects the issue at earlier steps)
3 - Suggestions?