gsoc 2015
Dmitry V. Levin
ldv at altlinux.org
Thu Mar 5 18:42:22 UTC 2015
On Thu, Mar 05, 2015 at 02:03:51AM +0800, 杨秉武 wrote:
> To understand a program how to run, it's the easiest way to write test
> unit:).So i take some time to test the strace.
> I check the makefile to find some test target (like make test but i do not
> find), i find this
>
> > RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
> > html-recursive info-recursive install-data-recursive \
> > install-dvi-recursive install-exec-recursive \
> > install-html-recursive install-info-recursive \
> > install-pdf-recursive install-ps-recursive install-recursive \
> > installcheck-recursive installdirs-recursive pdf-recursive \
> > ps-recursive uninstall-recursive
You are looking at a generated file. There is little use to do that
unless you are debugging a build bug.
> So i guess the check-recursive target is the test. the test result as below:
>
> > =================================================
> > strace 4.9.0.377-6a63: tests/test-suite.log
> > =================================================
> > 1 of 23 tests failed. (12 tests were not run).
>
> one test failed and 12 tests skip.
12 skipped tests means that you've got a pretty old operating system.
> finally i find the reason. because the Interval expressions were not
> traditionally available in awk. They were added as part of the POSIX
> standard to make awk and egrep consistent with each other.solving this
> problem just add the option --posix to match.
>
> awk --posix -f "$srcdir"/caps.awk "$LOG" ||
> > { cat "$LOG"; fail_ 'unexpected output'; }
Posix compatibility mode means more than just enabling interval
expressions. gawk has -r (aka --re-interval) option that explicitly
enables interval expressions. Is this option portable enough?
> during this the road to test, i find some problem.
>
> 1. some test will skip if the check_prog failed(program is not exist),
> so the test is incomplete. it didnt run all tests.
> 2. some test script depend linux program like time, on my system it
> didnt be installed. I mean we should check the program version. It's
> universal to check the dependence version. some package management will do
> this like yum pip npm.
> 3. it 's not automated.
strace test suite assumes a decent operating system.
> i'm very happy to write test suite to be familiar with the strace code
> base, then develop the strace code base as long-term devleloper:)
You are welcome. :)
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150305/ed21c57c/attachment.bin>
More information about the Strace-devel
mailing list