<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>850</bug_id>
          
          <creation_ts>2011-03-10 22:58:45 +0000</creation_ts>
          <short_desc>LSB: Perl tests interrupted on ppc</short_desc>
          <delta_ts>2011-08-08 09:18:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.0</version>
          <rep_platform>mpc8315e-rdb</rep_platform>
          <op_sys>ppc</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jingdong Lu">jingdong.lu</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>jingdong.lu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>12492</commentid>
    <comment_count>0</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2011-03-10 22:58:45 +0000</bug_when>
    <thetext>Perl test was interrupted during the process of execution.
The results:
Tests Expected 	829
Tests Total 	19
Tests Passed 	18
Tests Failed 	1
Warnings 	2

comp/proto.t
comp/redef.t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12504</commentid>
    <comment_count>1</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-03-11 10:30:18 +0000</bug_when>
    <thetext>Jingdong, 
   What do you mean by &quot;interrupted&quot; ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13048</commentid>
    <comment_count>2</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2011-03-30 01:24:55 +0000</bug_when>
    <thetext>Sorry for using an ambiguous word &quot;interrupted&quot; to explain the failure. I run a single test and got the following result. 

root@mpc8315e-rdb:/opt/lsb/test/perl# ./single_test comp/proto.t
comp/proto....dubious
	Test returned status 0 (wstat 11, 0xb)
FAILED--1 test script could be run, alas--no output ever seen

I checked the code of comp/proto.t and picked up the snatch on which failures occurred.

#!./perl
my $i = 1;
sub array_ref_plus (\@@) {
    print &quot;# \@_ = (&quot;,join(&quot;,&quot;,@_),&quot;)\n&quot;;
    print &quot;not &quot; unless @_ == 2 &amp;&amp; ref($_[0]) &amp;&amp; 1 == @{$_[0]} &amp;&amp; $_[1] eq &apos;x&apos;;
    printf &quot;ok %d\n&quot;,$i++;
    @{$_[0]} = (qw(ok),&quot; &quot;,$i++,&quot;\n&quot;);
}

@array = (&apos;a&apos;);
{ my @more = (&apos;x&apos;);
  array_ref_plus @array, @more; }
print &quot;not &quot; unless @array == 4;
print @array;

Run the above code(p2.t) and got the following result:
root@mpc8315e-rdb:/# perl p2.t 
# @_ = (ARRAY(0x1002c7d0),x)
ok 1
Segmentation fault

I think the segmentation fault cause the test cases interrupted and it couldn&apos;t continue to execute the left cases.

I also give a simple test(1.t) and got a wrong result.
#!/usr/bin/perl
$aa=3;                
print $aa;

root@mpc8315e-rdb:/# perl 1.t
-1080421088

I think something is wrong with the realization of function &quot;print&quot;. I compiled perl with debug option and debug it. I posted the debug information and hoped it could be helpful.

root@mpc8315e-rdb:/mnt/sda1/home/perl-5.12.2# gdb ./perl
GNU gdb (GDB) 7.2
...
This GDB was configured as &quot;powerpc-poky-linux&quot;.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;...
Reading symbols from /mnt/sda1/home/perl-5.12.2/perl...done.
(gdb) set args ../perl-tmp/1.t
(gdb) b main
b Breakpoint 1 at 0x10000ac8: file perlmain.c, line 79.
(gdb) b Perl_do_print
Function &quot;Perl_do_print&quot; not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (Perl_do_print) pending.
(gdb) b PerlIO_printf
Function &quot;PerlIO_printf&quot; not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 3 (PerlIO_printf) pending.
(gdb) r
Starting program: /mnt/sda1/home/perl-5.12.2/perl ../perl-tmp/1.t
[Thread debugging using libthread_db enabled]

Breakpoint 1, main (argc=2, argv=0xbffffd24, env=0xbffffd30) at perlmain.c:79
79	    PL_use_safe_putenv = 0;
(gdb) c
Continuing.

Breakpoint 2, Perl_do_print (my_perl=0x10012008, sv=0x1002c808, fp=0x10028ac0) at doio.c:1207
1207	    if (!sv)
(gdb) n
1209	    if (SvTYPE(sv) == SVt_IV &amp;&amp; SvIOK(sv)) {
(gdb) n
1211		if (SvIsUV(sv))
(gdb) n
1214		    PerlIO_printf(fp, &quot;%&quot;IVdf, (IV)SvIVX(sv));
(gdb) where
#0  Perl_do_print (my_perl=0x10012008, sv=0x1002c808, fp=0x10028ac0) at doio.c:1214
#1  0x0fe8b32c in Perl_pp_print (my_perl=0x10012008) at pp_hot.c:777
#2  0x0fe87350 in Perl_runops_standard (my_perl=0x10012008) at run.c:40
#3  0x0fde6914 in S_run_body (my_perl=0x10012008, oldscope=1) at perl.c:2308
#4  0x0fde634c in perl_run (my_perl=0x10012008) at perl.c:2233
#5  0x10000bf4 in main (argc=2, argv=0xbffffd24, env=0xbffffd30) at perlmain.c:117
(gdb) s
627860480
Program exited normally.

I am not sure why it can&apos;t jump into the function &quot;PerlIO_printf&quot; even though I set up a breakpoint on it. I also posted the source code of &quot;PerlIO_printf&quot; in perlio.c.
#undef PerlIO_printf
int                     
PerlIO_printf(PerlIO *f, const char *fmt, ...)
{    
    va_list ap;   
    int result;
    va_start(ap, fmt);
    result = PerlIO_vprintf(f, fmt, ap);
    va_end(ap);  
    return result;     
}

I think it is related to the definition of &quot;va_list&quot; on PPC platform and it is also related to gcc. Sorry, I&apos;m not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13523</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-05-02 10:02:21 +0000</bug_when>
    <thetext>is this issue only on PPC ? how about other arches ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13557</commentid>
    <comment_count>4</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2011-05-03 19:50:01 +0000</bug_when>
    <thetext>With 20100423 build on autobuilder, 
git commit 653cd1423793a3fd66da5c5682021d5c5b729cfe

On qemuarm, qemumips and routerstationpro images, there is no this issue.
This issue only happened on qemuppc and mpc8315e-rdb (ppc hardware).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13695</commentid>
    <comment_count>5</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2011-05-12 01:54:08 +0000</bug_when>
    <thetext>I found this problem disappeared after perl was updated to 5.12.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15320</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-08-08 09:18:39 +0000</bug_when>
    <thetext>as perl upgrade fixes the issue, closing this bug</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>