Hi, It turns out that -s option does not has any effect for binutils ar, which makes related test cases invalid in ar01 test. Nick Clifton replied in the bug report, https://bugzilla.redhat.com/show_bug.cgi?id=490797
It does make a difference on some versions of the ar program, notably those on some Unix and Solaris systems. These versions of ar do not automatically added a symbol index when the archive is created. But the binutils ar automatically adds a symbol index when an archive is created. So the -s option is supported mainly for backwards compatibility with these other versions of ar. Signed-off-by: CAI Qian <[email protected]> --- testcases/commands/ade/ar/ar01.orig 2009-04-15 23:37:40.000000000 +0800 +++ testcases/commands/ade/ar/ar01 2009-04-15 23:52:02.000000000 +0800 @@ -449,24 +449,26 @@ # The -s causes regeneration of symbol table even if a symbol table exists. +echo "-)17 SKIPPED due to binutils ar automatically adds a symbol." + # CODE -rm -rf $TCtmp/lib.a;cd $TCdat -ar -cr $TCtmp/lib.a file1.o -crtest -size1=`ls -l $TCtmp/lib.a|awk '{print $5}'` -strip $TCtmp/lib.a 2>&1 1>/dev/null -ar -s $TCtmp/lib.a 2>&1 1>/dev/null -size2=`ls -l $TCtmp/lib.a|awk '{print $5}'` +#rm -rf $TCtmp/lib.a;cd $TCdat +#ar -cr $TCtmp/lib.a file1.o +#crtest +#size1=`ls -l $TCtmp/lib.a|awk '{print $5}'` +#strip $TCtmp/lib.a 2>&1 1>/dev/null +#ar -s $TCtmp/lib.a 2>&1 1>/dev/null +#size2=`ls -l $TCtmp/lib.a|awk '{print $5}'` -if [ $size1 -eq $size2 ] +#if [ $size1 -eq $size2 ] -then - echo "-)17" -else - TCRESULT=17 - echo "FAIL - ar with -s does not regenerate symbol table" -fi +#then +# echo "-)17" +#else +# TCRESULT=17 +# echo "FAIL - ar with -s does not regenerate symbol table" +#fi # The -t option prints a table of contents of the archive file. @@ -490,23 +492,25 @@ # The -t does not affect behaviour of -s option. +echo "-)19 SKIPPED due to binutils ar automatically adds a symbol." + # CODE -rm -rf $TCtmp/lib.a;cd $TCdat -ar -cr $TCtmp/lib.a file1.o -crtest -size1=`ls -l $TCtmp/lib.a|awk '{print $5}'` -strip $TCtmp/lib.a 2>&1 1>/dev/null -ar -ts $TCtmp/lib.a 2>&1 1>/dev/null -size2=`ls -l $TCtmp/lib.a|awk '{print $5}'` +#rm -rf $TCtmp/lib.a;cd $TCdat +#ar -cr $TCtmp/lib.a file1.o +#crtest +#size1=`ls -l $TCtmp/lib.a|awk '{print $5}'` +#strip $TCtmp/lib.a 2>&1 1>/dev/null +#ar -ts $TCtmp/lib.a 2>&1 1>/dev/null +#size2=`ls -l $TCtmp/lib.a|awk '{print $5}'` -if [ $size1 -eq $size2 ] -then - echo "-)19" -else - TCRESULT=19 - echo "FAIL - ar with -t option did affect the -s option" -fi +#if [ $size1 -eq $size2 ] +#then +# echo "-)19" +#else +# TCRESULT=19 +# echo "FAIL - ar with -t option did affect the -s option" +#fi # The 'u' flag causes files only with later modification date than # in archive are replaced. ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
