Bug 1162

Summary: [LTP] 'ld' case failed with Yocto 1.1 M1 build
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yi Zhao <yi.zhao>
Component: devtools / tool chainAssignee: Nitin Kamble <nitin.a.kamble>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, jessica.zhang, jiajun.xu, liang.li2, meta.mr.watcher, meta.watcher, sgw, yi.zhao, yp.kernel.watcher, yp.watcher
Version: 1.0   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yi Zhao 2011-06-13 00:00:12 UTC
Tree/Branch: Poky/1.1_M1
Poky Commit: 4ff7af11ef69849ef9c16f585eae58ac920b222b
Meta Branch: 1.1_M1
Meta Commit: fc719f0cd6530ce15148b4aa274f1644b461b298

With Yocto 1.1 M1 RC2 build, 'ld' case failed on all platforms, including qemu and real hardware. This case can run pass in Yocto 1.0 M4.

'ld' case will test the basic functionality of the `ld` command.

The error log of these failure cases show:
#######
<<<test_output>>>
Assertion 1 ..................
-)
Assertion 2 ..................
1,4c1,3
< gcc: error: x.obj: No such file or directory
< gcc: error: y.obj: No such file or directory
< gcc: fatal error: no input files 
< compilation terminated.
---
> gcc: x.obj: No such file or directory
> gcc: y.obj: No such file or directory
> gcc: No input files 
FAIL -  ld failed to give expected error msg
#######

You can find the scripts "Assertion 2" section in testcases/commands/ade/ld/ld01:
##################          
##ASSERTION 2 
#Test for graceful failure when ld can't find a fileTest calling ld through cc
#
#CODE
echo "Assertion 2 .................."
$CC x.obj y.obj 2> $TCtmp/errmsg.out
cat <<EOF > $TCtmp/errmsg.exp
$CC: x.obj: No such file or directory
$CC: y.obj: No such file or directory
$CC: No input files
EOF

diff -iw $TCtmp/errmsg.out $TCtmp/errmsg.exp
if [ $? -eq 0 ] 
then
    echo  "-)"
else
    echo "FAIL -  ld failed to give expected error msg"
    do_cleanup
    exit 1
fi
###############                                                                         
To reproduce the bug, you could download the LTP from
http://sourceforge.net/projects/ltp/files/LTP%20Source/ltp-20101031/ltp-full-20101031.bz2/download
and build it in target system. Then you could find ld01 under
"testcases/commands/ade/ld/ld01". Run it with commands "export TCdat=$LTPROOT/testcases/bin; ld01" you will get above
failure. $LTPROOT is a folder which you create for installing the ltp.
Comment 1 Nitin Kamble 2011-07-20 11:34:26 UTC
any particular reason your are not using latest ltp-full-20110606.bz2 ?
Comment 2 Nitin Kamble 2011-07-20 17:08:08 UTC
Looks like the gcc 4.6 has changed the error messages a bit as seen here:
< gcc: error: x.obj: No such file or directory
< gcc: error: y.obj: No such file or directory
< gcc: fatal error: no input files 
< compilation terminated.
---
> gcc: x.obj: No such file or directory
> gcc: y.obj: No such file or directory
> gcc: No input files 


While gcc 4.5 was giving as expected error messages, and gcc 4.6 is giving errors slightly differently. Possibly ltp test scripts need to be updated accordingly.


Similer error also comes for assertions # 4 for the testcase:

Assertion 4 ..................
1,3c1,2
< gcc: error: bad/x.obj: No such file or directory
< gcc: fatal error: no input files
< compilation terminated.
---
> gcc: bad/x.obj: No such file or directory
> gcc: No input files
FAIL -  ld failed to give expected error msg


Thanks,
Nitin
Comment 3 Nitin Kamble 2011-07-21 15:40:42 UTC
This need fixing LTP, as I talked with gcc person and he says that gcc is fine.
Comment 4 Yi Zhao 2011-07-21 20:30:15 UTC
I re-test this case with ltp-20110606 on 1.1 M2 RC3 build. This issue also happened. 

##########
<<<test_start>>>                                                                                                                                                                                        
tag=ld stime=1311304706                                                                                                                                                                                 
cmdline="export TCdat=$LTPROOT/testcases/bin; ld01"                                                                                                                                                     
contacts=""                                                                                                                                                                                             
analysis=exit                                                                                                                                                                                           
<<<test_output>>>                                                                                                                                                                                       
Assertion 1 ..................                                                                                                                                                                          
-)                                                                                                                                                                                                      
Assertion 2 ..................                                                                                                                                                                          
1,4c1,3                                                                                                                                                                                                 
< gcc: error: x.obj: No such file or directory                                                                                                                                                          
< gcc: error: y.obj: No such file or directory                                                                                                                                                          
< gcc: fatal error: no input files                                                                                                                                                                      
< compilation terminated.                                                                                                                                                                               
---                                                                                                                                                                                                     
> gcc: x.obj: No such file or directory                                                                                                                                                                 
> gcc: y.obj: No such file or directory                                                                                                                                                                 
> gcc: No input files                                                                                                                                                                                   
FAIL -  ld failed to give expected error msg
####################

I checked the testcases/commands/ade/ld/ld01 scripts, it is same with 20101031
Comment 5 Nitin Kamble 2011-07-21 22:23:42 UTC
Yi Zhao,
  As I mentioned earlier LTP need to be updated to reflect new error messages. It is not an issue with ld or gcc.

Nitin
Comment 6 Jiajun Xu 2011-07-23 05:30:04 UTC
(In reply to comment #5)
> Yi Zhao,
>   As I mentioned earlier LTP need to be updated to reflect new error messages.
> It is not an issue with ld or gcc.
> Nitin

Thanks, Nitin. I think we could mark the bug as "NOTABUG" now since it's not gcc related.

Hi Yi,
Could you help to report the issue out to LTP mailing list.
Comment 7 Nitin Kamble 2011-08-08 09:15:46 UTC
marking it as notabug as discussed before.