While resurrecting various test harnesses for LCOV/GCOV
usage, I looked at the "make test" in the perl bindings.
The failures are appended below.
0) transaction flags set & get
This test is broken. rpmlib needs to be able to
other bits internally, not just set whatever random
values are passed in from bindings.
At a minimum, the test needs to change to set bits
by name (like RPMTRANS_FLAG_NOSCRIPTS), not by
value (as in 0x2).
Even the names cannot be guaranteed to remain invariant.
E.g. there are only 2 free bits in rpmtransFlags, there
*will* come a day when additional bits are needed,
and other bits will be rearranged.
1) no $ys->initdb and no $ts->verifydb methods
Yep. The intent is to do rpmdb initialization lazily,
and maintenance through external tools, to the
greatest extent possible.
No, I'm not interested in re-adding either --initdb or --verifydb
(and methods) back into rpmlib.
2) macro initialization through perl bindings in tests is not correct.
The assert failure indicates that macros needed to
open a table within an rpmdb have not been read.
Previously there was a compiled in fallback value, which
has been removed. The goal is to do Berkeley DB (and sqlite3)
configuration in DB_CONFIG, or to remove the macros
previously used to the greatest extent possible.
73 de Jeff
=================================================================
[jbj@fedora10 perl]$ make test
make -f Makefile.perl VPATH= || \
make -f Makefile.perl VPATH=
make[1]: Entering directory `/X/src/wdj/perl'
make[1]: Leaving directory `/X/src/wdj/perl'
make -f Makefile.perl test
make[1]: Entering directory `/X/src/wdj/perl'
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.pod.coverage.t ..... ok
t/00.pod.t .............. skipped: Test::Pod 1.00 required for testing POD
t/01.rpm.t .............. ok
t/02.rpmconstant.t ...... ok
t/03.header.t ........... ok
t/04.transaction.t ...... 1/14
# Failed test 'can get transflags'
# at t/04.transaction.t line 14.
# got: '256'
# expected: '0'
# Failed test 'can get old transflags'
# at t/04.transaction.t line 15.
# got: '256'
# expected: '0'
# Failed test 'can change transflags'
# at t/04.transaction.t line 16.
# got: '258'
# expected: '2'
# Failed test 'can initdb()'
# at t/04.transaction.t line 43.
# Failed test 'can verifydb()'
# at t/04.transaction.t line 49.
t/04.transaction.t ...... 12/14 # Looks like you failed 5 tests of 14.
t/04.transaction.t ...... Dubious, test returned 5 (wstat 1280, 0x500)
Failed 5/14 subtests
t/05.packageiterator.t .. lt-rpm: dbconfig.c:488: db3New: Assertion `dbOpts != ((void *)0) && *dbOpts != '\0'' failed.
Cannot init db in /X/src/wdj/perl/t/tempdb at t/05.packageiterator.t line 26.
# No tests run!
t/05.packageiterator.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 5/5 subtests
t/06.problems.t ......... ok
t/07.files.t ............ ok
t/08.dependencies.t ..... ok
t/09.spec.t ............. ok
Test Summary Report
-------------------
t/04.transaction.t (Wstat: 1280 Tests: 14 Failed: 5)
Failed tests: 3-6, 11
Non-zero exit status: 5
t/05.packageiterator.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 5 tests but ran 0.
Files=11, Tests=96, 4 wallclock secs ( 0.05 usr 0.26 sys + 0.96 cusr 1.48 csys = 2.75 CPU)
Result: FAIL
Failed 2/11 test programs. 5/96 subtests failed.
make[1]: *** [test_dynamic] Error 255
make[1]: Leaving directory `/X/src/wdj/perl'
make: *** [test] Error 2
[jbj@fedora10 perl]$
Received on Fri Dec 25 15:08:54 2009