2008/3/19, Julio M. Merino Vidal <jmmv84 / gmail.com>:
[...]
Hello!
Thanks for your fast reply!
> > When I try to build ATF 0.4 under my ALT Linux and building fails:
> >
> > tests/atf/test_programs/h_cpp.cpp: In member function 'virtual void
> > atf_tc_env_list::body() const':
> > tests/atf/test_programs/h_cpp.cpp:254: warning: ignoring return value
> > of 'int system(const char*)', declared with attribute
> > warn_unused_result
> > [...]
> > tools/atf-run.cpp: In function 'void call_hook(const std::string&,
> > const std::string&)':
> > tools/atf-run.cpp:573: warning: ignoring return value of 'int
> > system(const char*)', declared with attribute warn_unused_result
>
> Do you have any idea about why you are getting this warning?
Yes. Because new glibc versions adds it (since 2.5.1 AFAIR)
> I have never seen it here in any of the platforms I test the code under.
It's because you BSD-user? ;-)
> Which version of GCC are you using, and under which platform?
[c0der@xxx ~]$ rpm -q glibc-core gcc4.1
glibc-core-2.5.1-alt3
gcc4.1-4.1.2-alt1
My machine is x86_64, but all system compiled for i586. I think it
doesn't matter.
> > So I think we should:
> > - check exit code returned by system()
> The attached patch should fix this for you. I'll commit it to the
> tree later today when I get back home.
Patch fixes only first error. Second still exists and now compilation fails at:
g++ -pipe -Wall -O2 -march=athlon -mtune=athlon-xp -g -Wabi -Wall
-Wcast-qual -Wctor-dtor-privacy -Werror -Wextra -Wno-deprecated
-Wno-non-template-friend -Wno-pmf-conversions -Wno-sign-compare
-Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual
-Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow
-Wsign-promo -Wswitch -Wsynth -Wwrite-strings -o tools/atf-report
tools/atf-report.o -L/home/coder/RPM/BUILD/atf-0.4
/home/coder/RPM/BUILD/atf-0.4/.libs/libatf.a
cc1plus: warnings being treated as errors
tools/atf-run.cpp: In function 'void call_hook(const std::string&,
const std::string&)':
tools/atf-run.cpp:573: warning: ignoring return value of 'int
system(const char*)', declared with attribute warn_unused_result
> > - add --disable-werror flag to configure (now I just add sed -i
> > '/-Werror/d' m4/developer-mode.m4 but it's looks like a hack)
> No, sorry. Developer mode is meant to catch all these problems, and
> thus this is why it enables all kinds of warnings and enforces
> -Werror. You can always pass --disable-developer to the configure
> script, but I wouldn't do this because you will not get run-time
> assertion checks (which are very useful at this point of development).
So, why developer mode is enabled by default in the stable version (0.4)?
[...]
> > testsuite: error: cannot find atf-config
> > FAIL: ./tests/bootstrap/testsuite
> > =====================================
> > 1 of 1 tests failed
> This is the normal behavior of autotest. You need to have the
> installation directory in the path for it to find the binaries; this
> way you can run the same test suite against different installations.
> Or alternatively add the $(srcdir)/tools directory to the path, if you
> want to run 'make check' prior installation; it should work.
Ok. It helps me pass some tests:
+ make -j1 --silent --no-print-directory check
...
## ------------------------------------------------------------ ##
## Automated Testing Framework 0.4 test suite: bootstrap tests. ##
## ------------------------------------------------------------ ##
1: application: arguments and options handling ok
2: application: online help option ok
3: test_program: filter test cases by name FAILED
(t_test_program_filter.at:53)
4: test_program: output format and exit codes FAILED
(t_test_program_run.at:41)
5: test_program: list test cases FAILED
(t_test_program_list.at:41)
6: atf-format: formatting of long lines FAILED (t_atf_format.at:56)
7: atf-config: querying of build-time variables ok
8: atf-run: execution of tests FAILED (t_atf_run.at:108)
9: test_program: compare C++ and sh interfaces FAILED
(t_test_program_compare.at:42)
10: subr: atf_check function FAILED
(t_subr_atf_check.at:40)
## ------------- ##
## Test results. ##
## ------------- ##
ERROR: All 10 tests were run,
7 failed unexpectedly.
## -------------------------- ##
## testsuite.log was created. ##
## -------------------------- ##
Please send `testsuite.log' and all information you think might help:
To: <atf-devel%NetBSD.org@localhost>
Subject: [Automated Testing Framework 0.4] testsuite: 3 4 5 6 8 9 10 failed
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below `testsuite.dir'.
FAIL: ./tests/bootstrap/testsuite
=====================================
1 of 1 tests failed
Please report to atf-devel%NetBSD.org@localhost
=====================================
make[2]: *** [check-TESTS] Error 1
make[1]: *** [check-am] Error 2
make: *** [check] Error 2
What I should do next?
In attach testsuite.log file. I see many errors like
atf_test_case: command not found
And this command really not found:
[c0der@xxx ~]$ find RPM -name atf_test_case
[c0der@xxx ~]$
[...]
> > Also one bug: I always use make --silent but I see all commands for
> > compilatioa as is. It shouldn't be shown.
>
> Does 'make --silent' work with any package that uses Automake and
> Libtool? I've tried that here and I see all kinds of commands
> generated by these tools, so most likely this is not ATF's fault.
Most of package shown nothing with --silent option.
[c0der@xxx ~]$ info make 'Invoking make' 'Options summary'
...
`-s'
`--silent'
`--quiet'
Silent operation; do not print the commands as they are executed.
*Note Command Echoing: Echoing.
...
And in "Command Echoing: Echoing." chapter:
The `-s' or `--silent' flag to `make' prevents all echoing, as if
all commands started with `@'. A rule in the makefile for the special
target `.SILENT' without prerequisites has the same effect (*note
Special Built-in Target Names: Special Targets.). `.SILENT' is
essentially obsolete since `@' is more flexible.
--
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru
Attachment:
testsuite.log
Description: Binary data