Gentoo Archives: gentoo-perl

From: Michael Cummings <mcummings@g.o>
To: gentoo-perl@l.g.o
Subject: Re: [gentoo-perl] Specific example of make test failure returning $? of 0
Date: Wed, 11 Jan 2006 09:45:41
Message-Id: 1136972730.13579.15.camel@sys947.dtic.mil
In Reply to: [gentoo-perl] Specific example of make test failure returning $? of 0 by "Beau E. Cox"
1 Hey there again,
2
3 Hope you don't mind, but I'm going (to attempt) to reply to the second
4 message in this thread. A few things that are going on that might be
5 interfering with how your tests are being run...
6
7 (Don't quote me specifically on this, I'm not a portage internals
8 person - or even happy when I have to look at the python that is
9 portage...) When you are running the tests via portage, your working in
10 a different environment than when your testing via the command line.
11 First and foremost there's the sandbox to consider, which among other
12 things would be trumping your local environment (including the
13 definition of $HOME) and using a sanitized, pseudo-chroot (best I can
14 think of to describe it) env. Also, when portage is running the tests,
15 it is my thinking it will always return to your shell a 0 status -
16 because at that point, portage is cleanly exiting. Now on the inside,
17 its getting the die status, wrapping it in 'our' standard message about
18 where to file bugs, etc., and printing it all out stdout.
19 The lack of a defined useshrplib makes sense - in the case of the
20 current (ie, not what I've been playing around with in my experimental
21 overlay, where I wreak complete havoc on the gentoo perl world) ebuilds
22 for perl, libperl is built separately, and perl itself is built against
23 a static libperl.a (the libperl.so is around for everything else in the
24 known universe), so I wouldn't put any stock into that missing def.
25 So (hopfully beating the next question to the punch) how best to test
26 in this case? I'd probably do a manual
27 ebuild package compile
28 cd /var/tmp/portage/<package>/work/<working dir>
29 make test
30 which *should* at least yield whether everything is working ok.
31 Alternatively (painfully) you can install the package, then unpack the
32 source somewhere and make test there (so its using your live system's
33 install of the module against the test harness suite in the unpack).
34 And as a final note...this is one of the reasons tests are enabled
35 universally ;) Hopefully all of that made sense (my coffee just finished
36 brewing if that gives any indication on the state of my consciousness),
37 but if not, lemme know, hopefully someone more cognizant and intelligent
38 will jump in to correct me.
39
40 ~mcummings
41
42
43 On Tue, 2006-01-10 at 20:43 -1000, Beau E. Cox wrote:
44 > Hi -
45 >
46 > Me again. I am still having problems with return code
47 > from a failed make test. Here is a specific example using
48 > the ebuild I created for DBD-mysql. On my system I run with
49 > the normal gentoo perl:
50 >
51 > * dev-lang/perl
52 > Available versions: 5.8.6-r5 5.8.6-r6 5.8.6-r7 5.8.6-r8 5.8.7 5.8.7-r1
53 > 5.8.7-r2 5.8.7-r3
54 > Installed: 5.8.7-r3
55 > Homepage: http://www.perl.org/
56 > Description: Larry Wall's Practical Extraction and Reporting
57 > Language
58 >
59 > and a perl compiled from the perl.org stable sources
60 > and installed on a user (/home/beau).
61 >
62 > I force a failure in the DBD-mysql my specifying an invalid
63 > user name on the perl Makefile.PL command.
64 >
65 > Using the 'normal' gentoo perl make test:
66 >
67 > [...]
68 > FAILED before any test output arrived
69 > t/mysql2.............Mysql
70 > connect('database=test;host=;mysql_emulated_prepare=1','mysqlx',...) failed:
71 > Access denied for user 'mysqlx'@'localhost' (using password: YES) at
72 > t/mysql2.t line 29
73 > Can't call method "getserverinfo" on an undefined value at t/mysql2.t line 30.
74 > t/mysql2.............dubious
75 > Test returned status 255 (wstat 65280, 0xff00)
76 > Failed Test Stat Wstat Total Fail Failed List of Failed
77 > -------------------------------------------------------------------------------
78 > t/10dsnlist.t 10 2560 9 17 188.89% 1-9
79 > Failed Test Stat Wstat Total Fail Failed List of Failed
80 > -------------------------------------------------------------------------------
81 > [...yada,yada...]
82 > -------------------------------------------------------------------------------
83 > t/mysql.t ?? ?? % ??
84 > Failed Test Stat Wstat Total Fail Failed List of Failed
85 > -------------------------------------------------------------------------------
86 > t/mysql2.t 255 65280 ?? ?? % ??
87 > 1 test skipped.
88 > Failed 19/21 test scripts, 9.52% okay. 890/897 subtests failed, 0.78% okay.
89 > Files=21, Tests=897, 7 wallclock secs ( 1.77 cusr + 0.24 csys = 2.01 CPU)
90 > $ echo $?
91 > 0
92 >
93 > Using a perl compiled from the perl.org source:
94 >
95 > [...]
96 > FAILED before any test output arrived
97 > t/mysql2.............Mysql
98 > connect('database=test;host=;mysql_emulated_prepare=1','mysqlx',...) failed:
99 > Access denied for user 'mysqlx'@'localhost' (using password: YES) at
100 > t/mysql2.t line 29
101 > Can't call method "getserverinfo" on an undefined value at t/mysql2.t line 30.
102 > t/mysql2.............dubious
103 > Test returned status 255 (wstat 65280, 0xff00)
104 > Failed Test Stat Wstat Total Fail Failed List of Failed
105 > -------------------------------------------------------------------------------
106 > t/10dsnlist.t 10 2560 9 17 188.89% 1-9
107 > [...yada,yada...]
108 > t/mysql2.t 255 65280 ?? ?? % ??
109 > 1 test skipped.
110 > Failed 19/21 test scripts, 9.52% okay. 890/897 subtests failed, 0.78% okay.
111 > make: *** [test_dynamic] Error 255
112 > $ echo $?
113 > 2
114 >
115 > NOTE:
116 > 1) gentoo perl return 0
117 > 2) my perl returns 2 and says "make: *** [test_dynamic] Error 255"
118 >
119 > The differences in perl -V seem to be:
120 >
121 > gentoo has:
122 > cc='i686-pc-linux-gnu-gcc'
123 >
124 > while I have:
125 > cc='cc'
126 > -Duseshrplib defined
127 >
128 > I am totally confused! I wonder if anyone can reproduce this
129 > or if it is a figment of a misconfiguration of mine?
130 >
131 > --
132 > Aloha => Beau;
133 >

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-perl] Specific example of make test failure returning $? of 0 "Beau E. Cox" <beaucox@×××××××××.com>