On 03/07/2013 06:04 AM, djien wrote: > Thank you Eric for the explanation. Let me explain what i have done: > > step 1: the hello.c code > include <stdio.h> > > main( int argc, char *argv[] ) > { > printf( "Hello, world\n" ); > } Where's your return statement? You forgot one, so your C compiler assumed that you wanted the return value of printf() to become your return value of your program. You printed 13 bytes, so printf() returned 13, hence, your 'hello' exits with status 13, with your choice of compilers (not all compilers would do the same, though, because your program uses unspecified behavior). Fix your C program to avoid unspecified behavior if you want a reliable exit status from 'hello'. > /t17.at:11: hello > ++ hello > /t17.at:11: exit code was 13, expected 0 > 1. t17.at:9: 1. hello (t17.at:9): FAILED (t17.at:11) Your testsuite is telling you that 'hello' failed to meet the expectations you had in the testsuite of it exiting with status 0. > > step 9: modift t17.at > AT_CHECK([hello],[],[["Hello, world > "]]) This modification says that you want your 'hello' program to output double quotes as part of its literal output - but that's not what your C program did. > @@ -1,2 +1,2 @@ > -"Hello, world > -" > +Hello, world > + So now the testsuite is telling you that your 'hello' program produced different output than your expectation, > /t18.at:11: exit code was 13, expected 0 > 1. t18.at:9: FAILED (t18.at:11) in addition to still having the wrong exit status for your expectation. > > Please inform me where the error is. In your .c file, or in your testsuite expectations. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf