Bug 1923

Summary: [LTP] 'nm' case failed on all platforms with Yocto 1.2 M2 rc1
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yi Zhao <yi.zhao>
Component: devtools / tool chainAssignee: Jiajun Xu <jiajun.xu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: jiajun.xu, liang.li2, meta.mr.watcher, meta.watcher, nitin.a.kamble, sgw, yi.zhao, yp.kernel.watcher, yp.watcher
Version: 1.2   
Target Milestone: 1.2 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yi Zhao 2012-01-18 23:41:45 UTC
Tree/branch: poky/1.2_M2
Commit: 0f4d99d207b224bb9ce23de00a48f795ae20b3a0
Image location:
http://autobuilder.pokylinux.org/nightly/20120111-3/machines/

LTP version: 20110915

'nm' case failed on all platforms. The error message is like below:
############
-------System test for nm command------
nm: nmfile1.obj: no symbols
nm: nmfile1.obj: no symbols
nm: nmfile2.obj: no symbols
nm: nmfile3.obj: no symbols
nm: nmfile1.obj: no symbols
nm: nmfile1.obj: no symbols
nm: nmfile2.obj: no symbols
nm: nmfile3.obj: no symbols
nm -A: FAIL
#############


Steps:
######
1. root@beagleboard:~# cd /opt/ltp/testcases/bin/
2. root@beagleboard:/opt/ltp/testcases/bin# ./nm01 
######
Comment 1 Bruce Ashfield 2012-01-19 05:51:14 UTC
Is this ARM toolchain related ? Is this really only happening on the
beagleboard ?
Comment 2 Jiajun Xu 2012-01-19 05:54:12 UTC
It also happens on other platforms, including both Intel and non-Intel platforms.
Comment 3 Bruce Ashfield 2012-01-19 05:54:53 UTC
Thanks for the update. 

We'll have to figure out what has happened with the toolchain.
Comment 4 Bruce Ashfield 2012-01-19 05:55:25 UTC
(and reading, I see that the all platform part was already covered). sorry about that.
Comment 5 Saul Wold 2012-01-19 09:12:50 UTC
again which image is failing?

Can you also provide the test case in a form that we can use.
Comment 6 Nitin Kamble 2012-01-19 15:42:24 UTC
Does anybody know last when this has worked?
Comment 7 Yi Zhao 2012-01-20 01:07:59 UTC
This issue is same as bug 1922. When using the pre-build ltp, the case failed. When build the ltp on the target, the case can pass. 
 
Steps:
#########
1. Download the ltp testsuite from http://sourceforge.net/projects/ltp/files/LTP%20Source/ltp-20110915/
2. Copy the tarball to the target and decompress it.
3. # cd ltp-full-20110915; ./configure; cd testcases/commands/ade/nm;  make; ./nm01
########

The case can pass:
####################
root@beagleboard:~/ltp-full-20110915/testcases/commands/ade/nm# ./nm01 
-------System test for nm command------
-)1
-)2
-)3
-)4
-)5
-)6
-)7
-)8
nm01: PASS
####################
Comment 8 Nitin Kamble 2012-01-20 10:30:25 UTC
I find the binaries were getting stripped by our poky packaging code. And that was causing the failure: I disabled stripping of elf binaries for ltp recipe. Now the tests are passing in my local env, and also should pass in the image. 

Can you please test it and update the bugzilla?

Thanks,
Nitin
Comment 9 Jiajun Xu 2012-01-20 17:09:57 UTC
Hi Nitin,
It's casued by the new ltp recipe introduced into poky. I will take the owner of the bug. Thanks a lot for your comments and try.
Comment 10 Nitin Kamble 2012-01-20 17:12:10 UTC
Jiajun,
  Thanks for jumping in. I think the issue is fixed, just need verification.
Thanks,
Nitin
Comment 11 Jiajun Xu 2012-01-20 19:15:03 UTC
(In reply to comment #10)
> Jiajun,
>   Thanks for jumping in. I think the issue is fixed, just need verification.
> Thanks,
> Nitin

Sorry, Nitin. Yes, the bug is root caused and we could mark the bug as fixed. I will open another new bug since poky will strip all binaries during do_package, which makes LTP cases fail.
Comment 12 Jiajun Xu 2012-01-20 20:01:38 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Jiajun,
> >   Thanks for jumping in. I think the issue is fixed, just need verification.
> > Thanks,
> > Nitin
> Sorry, Nitin. Yes, the bug is root caused and we could mark the bug as fixed. I
> will open another new bug since poky will strip all binaries during do_package,
> which makes LTP cases fail.

The bug has been fixed by Nitin's patch on http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=nitin/misc&id=ffc4c2baa9ed5116336b1d5c2d6110f7e4163c27.
Comment 13 Nitin Kamble 2012-01-25 14:45:37 UTC
commit 5c6aa87a9124815df768392cde715cbb8ce55104
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Fri Jan 20 10:11:10 2012 -0800

    ltp: disable elf binary stripping
    
    Otherwise the ltp tests ldd01 & nm01 fail due to missing stripped
    information.
    
    This Fixes these bugs:
    [YOCTO #1922]
    [YOCTO #1923]
    
    (From OE-Core rev: 075266fa8bf12719c58a21c75a35fede5608dcdf)
    
    Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Comment 14 Yi Zhao 2012-03-07 02:36:06 UTC
Verified with 1.2 M3 20120229 build

Tree/branch: poky/1.2_M3
Commit: 320558f494c618f53e0c773db3ea0109476e8359
Image location:
http://autobuilder.pokylinux.org/nightly/20120229-1/machines/qemu/qemuppc/

##########
tag=nm stime=946714336
cmdline="export TCdat=$LTPROOT/testcases/bin; nm01 "
contacts=""
analysis=exit
<<<test_output>>>
-------System test for nm command------
-)1
-)2
-)3
-)4
-)5
-)6
-)7
-)8
nm01: PASS
############