Hi list,
I am posting a question here in the hope that some of the subscribers
may be able to lend me a helping hand.
Recently, I have begun to add a testbench to rsyslog. The idea is that
over time the project should have canned tests which are easy to run on
each version (as part of make distcheck at latest), increasing the
overall code quality.
"All" (so far two ;)) tests are located in the tests subdirectory. One
test fails if compiled in release mode, that is rscript-parse.c. I have
tracked down the failure cause and it is different struct member
alignment in the ctok_token_t structure. The alignment is different in
the rsyslog runtime and this test tool (I have compared the offsets
computed for pToken->tok and they are different). So far, so good. But I
do not find the cause of this misalignment. I checked the make output,
and as it looks both the runtime as well as the tool are compiled with
the same compiler options. Also, in debug mode it works OK, but in
release mode (--disable-debug) it fails.
I am sure the problem is something quite simple, but I have run out of
ideas of what it may be (or, more probable, I simply overlook
something).
Any help would be deeply appreciated.
Thanks,
Rainer
I am posting a question here in the hope that some of the subscribers
may be able to lend me a helping hand.
Recently, I have begun to add a testbench to rsyslog. The idea is that
over time the project should have canned tests which are easy to run on
each version (as part of make distcheck at latest), increasing the
overall code quality.
"All" (so far two ;)) tests are located in the tests subdirectory. One
test fails if compiled in release mode, that is rscript-parse.c. I have
tracked down the failure cause and it is different struct member
alignment in the ctok_token_t structure. The alignment is different in
the rsyslog runtime and this test tool (I have compared the offsets
computed for pToken->tok and they are different). So far, so good. But I
do not find the cause of this misalignment. I checked the make output,
and as it looks both the runtime as well as the tool are compiled with
the same compiler options. Also, in debug mode it works OK, but in
release mode (--disable-debug) it fails.
I am sure the problem is something quite simple, but I have run out of
ideas of what it may be (or, more probable, I simply overlook
something).
Any help would be deeply appreciated.
Thanks,
Rainer