All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ltp: fix two cases failure
@ 2017-12-14  6:45 Yi Zhao
  2017-12-14  6:45 ` [PATCH 1/2] ltp: add tar as runtime dependency Yi Zhao
  2017-12-14  6:45 ` [PATCH 2/2] ltp: fix ar01 case failure Yi Zhao
  0 siblings, 2 replies; 3+ messages in thread
From: Yi Zhao @ 2017-12-14  6:45 UTC (permalink / raw)
  To: openembedded-core



Yi Zhao (2):
  ltp: add tar as runtime dependency
  ltp: fix ar01 case failure

 ...s-ar01-Fix-for-test-in-deterministic-mode.patch | 252 +++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20170929.bb          |   2 +
 2 files changed, 254 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] ltp: add tar as runtime dependency
  2017-12-14  6:45 [PATCH 0/2] ltp: fix two cases failure Yi Zhao
@ 2017-12-14  6:45 ` Yi Zhao
  2017-12-14  6:45 ` [PATCH 2/2] ltp: fix ar01 case failure Yi Zhao
  1 sibling, 0 replies; 3+ messages in thread
From: Yi Zhao @ 2017-12-14  6:45 UTC (permalink / raw)
  To: openembedded-core

The tar from busybox lacks some options that cause the tar01 case
failed. Add tar as runtime dependency.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 meta/recipes-extended/ltp/ltp_20170929.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/ltp/ltp_20170929.bb b/meta/recipes-extended/ltp/ltp_20170929.bb
index aaa7c93..1a7e869f 100644
--- a/meta/recipes-extended/ltp/ltp_20170929.bb
+++ b/meta/recipes-extended/ltp/ltp_20170929.bb
@@ -104,6 +104,7 @@ RDEPENDS_${PN} = "\
     unzip \
     util-linux \
     which \
+    tar \
 "
 
 FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/* /opt/ltp/testcases/data/nm01/lib.a /opt/ltp/lib/libmem.a"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ltp: fix ar01 case failure
  2017-12-14  6:45 [PATCH 0/2] ltp: fix two cases failure Yi Zhao
  2017-12-14  6:45 ` [PATCH 1/2] ltp: add tar as runtime dependency Yi Zhao
@ 2017-12-14  6:45 ` Yi Zhao
  1 sibling, 0 replies; 3+ messages in thread
From: Yi Zhao @ 2017-12-14  6:45 UTC (permalink / raw)
  To: openembedded-core

Our binutils is configured with --enable-deterministic-archives, so ar
runs in deterministic mode by default. The ar01 case would fail because
it doesn't consider this mode. Backport a patch from upstream to fix
this issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 ...s-ar01-Fix-for-test-in-deterministic-mode.patch | 252 +++++++++++++++++++++
 meta/recipes-extended/ltp/ltp_20170929.bb          |   1 +
 2 files changed, 253 insertions(+)
 create mode 100644 meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch

diff --git a/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
new file mode 100644
index 0000000..e7c927e
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
@@ -0,0 +1,252 @@
+From 04da9478887e705ea38e4f097492da20e651686c Mon Sep 17 00:00:00 2001
+From: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Date: Wed, 13 Sep 2017 15:48:42 +0800
+Subject: [PATCH] commands/ar01: Fix for test in deterministic mode
+
+If binutils was configured with --enable-deterministic-archives,
+ar will run in deterministic mode by default, and use zero for
+timestamps and uids/gids, which makes the test case abnormal.
+
+Fix this by add the "U" modifier when deterministic mode is default.
+
+Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+Signed-off-by: Fei Jie <feij.fnst@cn.fujitsu.com>
+
+Upstream-Status: Backport
+[http://lists.linux.it/pipermail/ltp/2017-September/005668.html]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ testcases/commands/ar/ar01 | 92 ++++++++++++++++++++++++++--------------------
+ 1 file changed, 52 insertions(+), 40 deletions(-)
+
+diff --git a/testcases/commands/ar/ar01 b/testcases/commands/ar/ar01
+index ddab2e0..d688f76 100644
+--- a/testcases/commands/ar/ar01
++++ b/testcases/commands/ar/ar01
+@@ -23,14 +23,26 @@
+ # This is a basic ar command test.
+ #
+ TST_CNT=17
++TST_SETUP=setup
+ TST_TESTFUNC=test
+ TST_NEEDS_TMPDIR=1
+ . tst_test.sh
+ 
++setup()
++{
++	ar --help | grep "use zero for timestamps and uids/gids (default)" \
++		>/dev/null
++	if [ $? -eq 0 ]; then
++		MOD="U"
++	else
++		MOD=""
++	fi
++}
++
+ test1()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -ra file1.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -ra"$MOD" file1.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -47,9 +59,9 @@ test1()
+ 
+ test2()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-		         $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
+-	ROD ar -ma file1.in lib.a file4.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in $TST_DATAROOT/file4.in
++	ROD ar -ma"$MOD" file1.in lib.a file4.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile4.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -66,8 +78,8 @@ test2()
+ 
+ test3()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -rb file3.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -rb"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -84,9 +96,9 @@ test3()
+ 
+ test4()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -mb file3.in lib.a file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -mb"$MOD" file3.in lib.a file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -103,7 +115,7 @@ test4()
+ 
+ test5()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+ 
+ 	if [ -s ar.out ]; then
+ 		tst_res TFAIL "ar produced output unexpectedly (-c)"
+@@ -117,7 +129,7 @@ test5()
+ 
+ test6()
+ {
+-	ROD ar -qc lib.a $TST_DATAROOT/file1.in \> ar.out
++	ROD ar -qc"$MOD" lib.a $TST_DATAROOT/file1.in \> ar.out
+ 
+ 	if [ -s ar.out ]; then
+ 		tst_res TFAIL "ar produced output unexpectedly (-qc)"
+@@ -131,9 +143,9 @@ test6()
+ 
+ test7()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -d lib.a file1.in file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -d"$MOD" lib.a file1.in file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file3.in\n" > ar.exp
+@@ -150,9 +162,9 @@ test7()
+ 
+ test8()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -d lib.a
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -d"$MOD" lib.a
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -169,8 +181,8 @@ test8()
+ 
+ test9()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
+-	ROD ar -ri file3.in lib.a $TST_DATAROOT/file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in
++	ROD ar -ri"$MOD" file3.in lib.a $TST_DATAROOT/file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -187,9 +199,9 @@ test9()
+ 
+ test10()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -mi file3.in lib.a file2.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -mi"$MOD" file3.in lib.a file2.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -206,9 +218,9 @@ test10()
+ 
+ test11()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
+-	                 $TST_DATAROOT/file2.in
+-	ROD ar -m lib.a file3.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file3.in \
++			       $TST_DATAROOT/file2.in
++	ROD ar -m"$MOD" lib.a file3.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\n" > ar.exp
+@@ -225,9 +237,9 @@ test11()
+ 
+ test12()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -p lib.a \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -p"$MOD" lib.a \> ar.out
+ 
+ 	printf "This is file one\nThis is file two\nThis is file three\n" > ar.exp
+ 
+@@ -244,9 +256,9 @@ test12()
+ test13()
+ {
+ 
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -q lib.a $TST_DATAROOT/file4.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -q"$MOD" lib.a $TST_DATAROOT/file4.in
+ 	ROD ar -t lib.a \> ar.out
+ 
+ 	printf "file1.in\nfile2.in\nfile3.in\nfile4.in\n" > ar.exp
+@@ -264,14 +276,14 @@ test13()
+ test14()
+ {
+ 	ROD touch file0.in
+-	ROD ar -cr lib.a file0.in $TST_DATAROOT/file1.in
++	ROD ar -cr"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+ 
+ 	file0_mtime1=$(ar -tv lib.a | grep file0.in)
+ 	file1_mtime1=$(ar -tv lib.a | grep file1.in)
+ 
+ 	touch -c -t $(date --date='next day' +"%Y%m%d%H%M") file0.in
+ 
+-	ROD ar -ru lib.a file0.in $TST_DATAROOT/file1.in
++	ROD ar -ru"$MOD" lib.a file0.in $TST_DATAROOT/file1.in
+ 
+ 	file0_mtime2=$(ar -tv lib.a | grep file0.in)
+ 	file1_mtime2=$(ar -tv lib.a | grep file1.in)
+@@ -293,7 +305,7 @@ test14()
+ 
+ test15()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in
+ 	ROD ar -tv lib.a \> ar.out
+ 
+ 	if grep -q '[rwx-]\{9\} [0-9].*/[0-9].*\s*[0-9].*.*file1.in' ar.out; then
+@@ -308,9 +320,9 @@ test15()
+ 
+ test16()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
+-	                 $TST_DATAROOT/file3.in
+-	ROD ar -xv lib.a \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in \
++			       $TST_DATAROOT/file3.in
++	ROD ar -xv"$MOD" lib.a \> ar.out
+ 
+ 	printf "x - file1.in\nx - file2.in\nx - file3.in\n" > ar.exp
+ 
+@@ -332,8 +344,8 @@ test16()
+ 
+ test17()
+ {
+-	ROD ar -cr lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
+-	ROD ar -xv lib.a file2.in \> ar.out
++	ROD ar -cr"$MOD" lib.a $TST_DATAROOT/file1.in $TST_DATAROOT/file2.in
++	ROD ar -xv"$MOD" lib.a file2.in \> ar.out
+ 
+ 	printf "x - file2.in\n" > ar.exp
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-extended/ltp/ltp_20170929.bb b/meta/recipes-extended/ltp/ltp_20170929.bb
index 1a7e869f..bc0ecdf 100644
--- a/meta/recipes-extended/ltp/ltp_20170929.bb
+++ b/meta/recipes-extended/ltp/ltp_20170929.bb
@@ -50,6 +50,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
            file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
            file://0037-ltp-fix-format-security-error.patch \
            file://0038-generate-reproducible-gzip.patch \
+           file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
            "
 
 S = "${WORKDIR}/git"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-14  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14  6:45 [PATCH 0/2] ltp: fix two cases failure Yi Zhao
2017-12-14  6:45 ` [PATCH 1/2] ltp: add tar as runtime dependency Yi Zhao
2017-12-14  6:45 ` [PATCH 2/2] ltp: fix ar01 case failure Yi Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.