So the testbench was setup after some of these initial parsers were already in place for some time. So new tests will have to be added for this.
To run tests you just need --enable-testbench while configuring. I usually do --enable-valgrind --enable-testbench --enable-debug --enable-regex. make check should run tests as usual. About initialization, its more to prevent some trouble in future, as more things are added to that parser. Not necessary as it stands now (it'll give someone a crash when they do early return before the allocation). Free is required in string-to as well, thanks for pointing it out. On Tue, Jun 2, 2015 at 10:34 AM, Chris Schafer <[email protected]> wrote: > I wrote string-to and completely believe it should be optimized. I am not > great with C, I just needed the function at the time. > On Mon, Jun 1, 2015 at 9:00 PM David Lang <[email protected]> wrote: > >> On Tue, 2 Jun 2015, singh.janmejay wrote: >> >> > Also, you probably want to add some tests. >> >> I couldn;t find any existing tests for these parsers, and couldn't figure >> out >> how to run the testbench from liblognorm. What did I miss? >> >> David Lang >> >> >> > On Tue, Jun 2, 2015 at 2:56 AM, David Lang <[email protected]> wrote: >> >> On Fri, 29 May 2015, David Lang wrote: >> >> >> >> attached is a patch that lets you specify multiple characters for >> char-to >> >> and char-sep, any one of the characters will work, so with the example >> above >> >> >> >> rule=:%foo:tokenize:&:char-sep:& % c >> >> >> >> # echo 'a&b c' |./lognormalizer -r del -e json >> >> >> >> you get >> >> >> >> { "foo": [ "a", "b" ] } >> >> >> _______________________________________________ >> 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. -- Regards, Janmejay http://codehunk.wordpress.com _______________________________________________ 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.

