Discussion:
unit tests: /usr/bin/touch vs /bin/touch
Sergey
2018-09-13 12:26:53 UTC
Permalink
Hello.

I attempted to run unit tests and got error:

Suite: command
Test: run ...FAILED
1. cunit/unit.c:115 - CU_FAIL_FATAL("Code under test exited")

This is result of wrong path to touch in my distro in cunit/command.testc:

r = run_command("/usr/bin/touch", canary, NULL);

I attempted to to find which daemon (or utility) used the touch
but I not found it. Can I simply to change path in the command.testc?

btw. perhaps it makes sense to check the location of the touch
by configure?
--
Regards, Sergey
ellie timoney
2018-09-14 01:46:47 UTC
Permalink
Hi Sergey,
Post by Sergey
Hello.
Suite: command
Test: run ...FAILED
1. cunit/unit.c:115 - CU_FAIL_FATAL("Code under test exited")
r = run_command("/usr/bin/touch", canary, NULL);
I attempted to to find which daemon (or utility) used the touch
but I not found it. Can I simply to change path in the command.testc?
Yeah, you should just be able to change that line in the command.testc and then recompile.
Post by Sergey
btw. perhaps it makes sense to check the location of the touch
by configure?
That seems pretty reasonable. Can you manually fix it for now, and then let us know if you find any other mismatched paths like this? Then we can patch them all in one go. :)

Cheers,

ellie
Sergey
2018-09-15 09:48:04 UTC
Permalink
Post by ellie timoney
and then let us know if you find any other mismatched paths like this?
Then we can patch them all in one go. :)
I know about pcre. I wrote about it here:
https://lists.andrew.cmu.edu/pipermail/info-cyrus/2015-October/038549.html

Since it time I build Cyrus-IMAP with hack (in rpm's spec file):

sed "s|pcreposix\.h|pcre/pcreposix.h|g" -i configure.ac
sed 's|if test "$ac_cv_header_pcreposix_h" = "yes"|ac_cv_header_pcreposix_h="yes"; if test "$ac_cv_header_pcreposix_h" = "yes"|' -i configure.ac
%add_optflags -I%_includedir/pcre
sed "s|pcre\.h|pcre/pcre.h|" -i lib/util.h # include <pcre.h>
sed "s|pcreposix\.h|pcre/pcreposix.h|" -i lib/util.h # include <pcreposix.h>
sed "s|@ZLIB@|@ZLIB@ -lpcreposix|" -i perl/imap/Makefile.PL.in
sed "s|@ZLIB@|@ZLIB@ -lpcreposix|" -i perl/sieve/managesieve/Makefile.PL.in

"-I%_includedir/pcre" helped for some cases, but excluding lib/util.h
And I now not remember, why I added "-lpcreposix".
--
Regards,
Sergey
Loading...