On Thu, Jul 18, 2013 at 6:27 PM, Radu Gheorghe <[email protected]>wrote:

> Hello,
>
> I've noticed a bug in chkseq (from the testbench), if you use duplicates.
> For example, this will work:
>
> # echo '1
> 2' > work
> # ./chkseq -f work -s 1 -e 2; echo $?
> 0
>
> But if I put duplicates, it doesn't:
>
> # echo '1
> 1
> 2
> 2' >work
> # ./chkseq -f work -s 1 -e 2 -d; echo $?
> info: had 1 duplicates (this is no error)
> end of processing, but NOT end of file!
> 1
>
>
mmhh...  I cannot reproduce precisely. I get:

$ ./chkseq -f work -s 1 -e 2 -d; echo $?
end of processing, but NOT end of file!
1



> It always detects the correct number of duplicates, but it doesn't reach
> EOF, which is strange to me. I've had a stab at fixing it, but I have no
> idea what's going on there (it's been a long time since I wrote 'hello
> world' in C. and that's as far as I went for now).
>
>
But I could see that there is a subtle bug if the duplicate is in the last
value that's inside the file. This terminates the loop, so when the EOF
check is done, the duplicate entry is detected and such no end of file. I
need to think how I can fix this cleanly.

What concerns me, however, is that I can't reproduce your exact case. I
tried with v7-stable and master branch.

Rainer


> I'm sure it's a bug that's easy to fix, but I can't figure it out. Can
> anyone point to the right direction?
>
> Best regards,
> Radu
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad
> of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you
> DON'T LIKE THAT.
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to