* [PATCH 1/8] busybox: enable bzip2 by default
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 2/8] bzip2: extend alternatives list to include bzip2 Chen Qi
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
bunzip2 is enabled by default, but bzip2 is not. This is kind of
strange, and it also causes busybox's ptest failure regarding
bunzip2, as bunzip2's test case needs bzip2 command.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/busybox/busybox/defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig
index 32213c0..0c40990 100644
--- a/meta/recipes-core/busybox/busybox/defconfig
+++ b/meta/recipes-core/busybox/busybox/defconfig
@@ -150,7 +150,7 @@ CONFIG_LZCAT=y
# CONFIG_UNXZ is not set
CONFIG_XZCAT=y
# CONFIG_XZ is not set
-# CONFIG_BZIP2 is not set
+CONFIG_BZIP2=y
CONFIG_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_CPIO=y
# CONFIG_FEATURE_CPIO_O is not set
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/8] bzip2: extend alternatives list to include bzip2
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
2018-11-21 5:41 ` [PATCH 1/8] busybox: enable bzip2 by default Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 3/8] busybox: add zip to RDEPENDS of ptest package Chen Qi
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
bzip2 could also be provided by busybox. So extend the alternatives
list to include bzip2.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/bzip2/bzip2_1.0.6.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 025f45c..7d04e30 100644
--- a/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -29,7 +29,7 @@ CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=
inherit autotools update-alternatives ptest relative_symlinks
ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "bunzip2 bzcat"
+ALTERNATIVE_${PN} = "bunzip2 bzcat bzip2"
#install binaries to bzip2-native under sysroot for replacement-native
EXTRA_OECONF_append_class-native = " --bindir=${STAGING_BINDIR_NATIVE}/${PN}"
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 3/8] busybox: add zip to RDEPENDS of ptest package
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
2018-11-21 5:41 ` [PATCH 1/8] busybox: enable bzip2 by default Chen Qi
2018-11-21 5:41 ` [PATCH 2/8] bzip2: extend alternatives list to include bzip2 Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 4/8] busybox: check uudecode before using it in test case Chen Qi
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
busybox's unzip test case requires zip command. However, busybox
itself does not provide one. So add zip as a runtime dependency.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/busybox/busybox.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b8d8858..b45d2b6 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -53,6 +53,9 @@ RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_man
inherit cml1 systemd update-rc.d ptest
+# busybox's unzip test case needs zip command, which busybox itself does not provide
+RDEPENDS_${PN}-ptest = "zip"
+
# internal helper
def busybox_cfg(feature, tokens, cnf, rem):
if type(tokens) == type(""):
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 4/8] busybox: check uudecode before using it in test case
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
` (2 preceding siblings ...)
2018-11-21 5:41 ` [PATCH 3/8] busybox: add zip to RDEPENDS of ptest package Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 5/8] busybox: use example.org instead of google.com in wget " Chen Qi
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
Check uudecode before using it in test case to avoid unexpected failure.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...-testsuite-check-uudecode-before-using-it.patch | 45 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.29.2.bb | 1 +
2 files changed, 46 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch
diff --git a/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch b/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch
new file mode 100644
index 0000000..2d9856f
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-testsuite-check-uudecode-before-using-it.patch
@@ -0,0 +1,45 @@
+From 85f164ec427fecbae24140b3c93acbbe2ba1c817 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 13 Nov 2018 11:27:01 +0800
+Subject: [PATCH] testsuite: check uudecode before using it
+
+The unzip and tar test cases use uudecode command, so also
+check it via optional function.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086833.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/tar.tests | 2 +-
+ testsuite/unzip.tests | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testsuite/tar.tests b/testsuite/tar.tests
+index d71a349..8c88567 100755
+--- a/testsuite/tar.tests
++++ b/testsuite/tar.tests
+@@ -336,7 +336,7 @@ SKIP=
+ cd .. || exit 1; rm -rf tar.tempdir 2>/dev/null
+
+ mkdir tar.tempdir && cd tar.tempdir || exit 1
+-optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS
++optional FEATURE_SEAMLESS_BZ2 FEATURE_TAR_AUTODETECT LS UUDECODE
+ testing "Symlink attack: create symlink and then write through it" '\
+ exec 2>&1
+ uudecode -o input && tar xvf input; echo $?
+diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
+index af53de9..3b45ece 100755
+--- a/testsuite/unzip.tests
++++ b/testsuite/unzip.tests
+@@ -31,7 +31,7 @@ rmdir foo
+ rm foo.zip
+
+ # File containing some damaged encrypted stream
+-optional FEATURE_UNZIP_CDF
++optional FEATURE_UNZIP_CDF UUDECODE
+ testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
+ "Archive: bad.zip
+ inflating: ]3j½r«I^[\x12K-%Ix
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index df3ea59..a63fa82 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -41,6 +41,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://rcS \
file://rcK \
file://makefile-libbb-race.patch \
+ file://0001-testsuite-check-uudecode-before-using-it.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 5/8] busybox: use example.org instead of google.com in wget test case
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
` (3 preceding siblings ...)
2018-11-21 5:41 ` [PATCH 4/8] busybox: check uudecode before using it in test case Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 6/8] busybox: remove three hostname test cases Chen Qi
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
Use example.org to ensure it's always reachible.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...e-use-www.example.org-for-wget-test-cases.patch | 62 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.29.2.bb | 1 +
2 files changed, 63 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch
diff --git a/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch b/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch
new file mode 100644
index 0000000..7ba0f77
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-testsuite-use-www.example.org-for-wget-test-cases.patch
@@ -0,0 +1,62 @@
+From 03acf460990dfcf6e52b298301b348b9504460a8 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 13 Nov 2018 13:51:42 +0800
+Subject: [PATCH] testsuite: use www.example.org for wget test cases
+
+Use example.org instead of google.com to make sure it's
+always reachible.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086835.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/wget/wget--O-overrides--P | 2 +-
+ testsuite/wget/wget-handles-empty-path | 2 +-
+ testsuite/wget/wget-retrieves-google-index | 2 +-
+ testsuite/wget/wget-supports--P | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/testsuite/wget/wget--O-overrides--P b/testsuite/wget/wget--O-overrides--P
+index 40a3a96..490d743 100644
+--- a/testsuite/wget/wget--O-overrides--P
++++ b/testsuite/wget/wget--O-overrides--P
+@@ -1,5 +1,5 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+ mkdir foo
+-busybox wget -q -O index.html -P foo http://www.google.com/
++busybox wget -q -O index.html -P foo http://www.example.org/
+ test -s index.html
+diff --git a/testsuite/wget/wget-handles-empty-path b/testsuite/wget/wget-handles-empty-path
+index 01d60bd..1802db6 100644
+--- a/testsuite/wget/wget-handles-empty-path
++++ b/testsuite/wget/wget-handles-empty-path
+@@ -1,3 +1,3 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+-busybox wget http://www.google.com
++busybox wget http://www.example.org
+diff --git a/testsuite/wget/wget-retrieves-google-index b/testsuite/wget/wget-retrieves-google-index
+index f9dbb8b..fc801d4 100644
+--- a/testsuite/wget/wget-retrieves-google-index
++++ b/testsuite/wget/wget-retrieves-google-index
+@@ -1,4 +1,4 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+-busybox wget -q -O foo http://www.google.com/
++busybox wget -q -O foo http://www.example.org/
+ test -s foo
+diff --git a/testsuite/wget/wget-supports--P b/testsuite/wget/wget-supports--P
+index bfe4ac4..4ff2fe0 100644
+--- a/testsuite/wget/wget-supports--P
++++ b/testsuite/wget/wget-supports--P
+@@ -1,5 +1,5 @@
+ test x"$SKIP_INTERNET_TESTS" != x"" && exit
+
+ mkdir foo
+-busybox wget -q -P foo http://www.google.com/
++busybox wget -q -P foo http://www.example.org/
+ test -s foo/index.html
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index a63fa82..98767f0 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -42,6 +42,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://rcK \
file://makefile-libbb-race.patch \
file://0001-testsuite-check-uudecode-before-using-it.patch \
+ file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 6/8] busybox: remove three hostname test cases
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
` (4 preceding siblings ...)
2018-11-21 5:41 ` [PATCH 5/8] busybox: use example.org instead of google.com in wget " Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 12:16 ` Burton, Ross
2018-11-21 5:41 ` [PATCH 7/8] busybox: fix du-l-works test case Chen Qi
2018-11-21 5:41 ` [PATCH 8/8] busybox: check CONFIG_DESKTOP before using 'od -t' in " Chen Qi
7 siblings, 1 reply; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
These three test case are removed because of two reasons.
1) net-tools' hostname have different behaviour regarding some options
So when net-tools is installed, test cases may fail.
e.g.
test x$(hostname -i) = x$(busybox hostname -i)
2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts
This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/busybox/busybox.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b45d2b6..cc7246f 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -352,6 +352,12 @@ do_install_ptest () {
cp -r ${B}/testsuite ${D}${PTEST_PATH}/
cp ${B}/.config ${D}${PTEST_PATH}/
ln -s /bin/busybox ${D}${PTEST_PATH}/busybox
+ # Remove some hostname test cases as they may fail because of two reasons
+ # 1) net-tools' hostname have different behaviour regarding some options
+ # 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts
+ rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-i-works
+ rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-d-works
+ rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-s-works
}
inherit update-alternatives
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 6/8] busybox: remove three hostname test cases
2018-11-21 5:41 ` [PATCH 6/8] busybox: remove three hostname test cases Chen Qi
@ 2018-11-21 12:16 ` Burton, Ross
2018-11-21 12:34 ` Burton, Ross
2018-11-22 2:19 ` ChenQi
0 siblings, 2 replies; 13+ messages in thread
From: Burton, Ross @ 2018-11-21 12:16 UTC (permalink / raw)
To: ChenQi; +Cc: OE-core
On Wed, 21 Nov 2018 at 05:35, Chen Qi <Qi.Chen@windriver.com> wrote:
> These three test case are removed because of two reasons.
> 1) net-tools' hostname have different behaviour regarding some options
> So when net-tools is installed, test cases may fail.
> e.g.
> test x$(hostname -i) = x$(busybox hostname -i)
This is just a specific instance of the problem where alternatives may
not be what you want. The busybox test suite should be sure it's
running busybox tools. Having spoken to a few people about this
already, maybe busybox-ptest should contain a symlink farm for all the
applets to the busybox binary that run-ptest can put at the front of
$PATH.
> 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts
> This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts.
Let's fix the hostname setup so hosts is correct too.
Ross
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/8] busybox: remove three hostname test cases
2018-11-21 12:16 ` Burton, Ross
@ 2018-11-21 12:34 ` Burton, Ross
2018-11-22 2:19 ` ChenQi
1 sibling, 0 replies; 13+ messages in thread
From: Burton, Ross @ 2018-11-21 12:34 UTC (permalink / raw)
To: ChenQi; +Cc: OE-core
On Wed, 21 Nov 2018 at 12:16, Burton, Ross <ross.burton@intel.com> wrote:
> On Wed, 21 Nov 2018 at 05:35, Chen Qi <Qi.Chen@windriver.com> wrote:
> > These three test case are removed because of two reasons.
> > 1) net-tools' hostname have different behaviour regarding some options
> > So when net-tools is installed, test cases may fail.
> > e.g.
> > test x$(hostname -i) = x$(busybox hostname -i)
>
> This is just a specific instance of the problem where alternatives may
> not be what you want. The busybox test suite should be sure it's
> running busybox tools. Having spoken to a few people about this
> already, maybe busybox-ptest should contain a symlink farm for all the
> applets to the busybox binary that run-ptest can put at the front of
> $PATH.
Something like this:
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mut&id=42ec5eaf3a6c512bffe03d20e7e512e8d87343ca
Example package contents at https://pastebin.com/5FpY9xyE
If run-ptest just puts that directory at the front of $PATH then
you'll be sure to be run the busybox tool.
Bonus points for making that a function in update-alternatives.bbclass
so every recipe with this problem can use it, but that would have to
happen at do_package time because of how that class works so I'm happy
enough with this for now.
Ross
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/8] busybox: remove three hostname test cases
2018-11-21 12:16 ` Burton, Ross
2018-11-21 12:34 ` Burton, Ross
@ 2018-11-22 2:19 ` ChenQi
2018-11-23 20:59 ` Burton, Ross
1 sibling, 1 reply; 13+ messages in thread
From: ChenQi @ 2018-11-22 2:19 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 11/21/2018 08:16 PM, Burton, Ross wrote:
> On Wed, 21 Nov 2018 at 05:35, Chen Qi <Qi.Chen@windriver.com> wrote:
>> These three test case are removed because of two reasons.
>> 1) net-tools' hostname have different behaviour regarding some options
>> So when net-tools is installed, test cases may fail.
>> e.g.
>> test x$(hostname -i) = x$(busybox hostname -i)
> This is just a specific instance of the problem where alternatives may
> not be what you want. The busybox test suite should be sure it's
> running busybox tools. Having spoken to a few people about this
> already, maybe busybox-ptest should contain a symlink farm for all the
> applets to the busybox binary that run-ptest can put at the front of
> $PATH.
Very good idea! I'll try this out.
>> 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts
>> This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts.
> Let's fix the hostname setup so hosts is correct too.
OK.
Currently, we set hostname to ${MACHINE}. To ensure it's also an entry
in /etc/hosts, it seems that we have to default it to 'localhost'. I'm
going to test with this change. If you have other candidates, please let
me know.
Best Regards,
Chen Qi
> Ross
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 6/8] busybox: remove three hostname test cases
2018-11-22 2:19 ` ChenQi
@ 2018-11-23 20:59 ` Burton, Ross
0 siblings, 0 replies; 13+ messages in thread
From: Burton, Ross @ 2018-11-23 20:59 UTC (permalink / raw)
To: ChenQi; +Cc: OE-core
On Thu, 22 Nov 2018 at 02:12, ChenQi <Qi.Chen@windriver.com> wrote:
> >> 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts
> >> This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts.
> > Let's fix the hostname setup so hosts is correct too.
>
> OK.
> Currently, we set hostname to ${MACHINE}. To ensure it's also an entry
> in /etc/hosts, it seems that we have to default it to 'localhost'. I'm
> going to test with this change. If you have other candidates, please let
> me know.
What I mean is when we change hostname, we should update hosts so
${MACHINE} is an alias for localhost. Like my local machine has:
127.0.0.1 localhost
127.0.1.1 flashheart.burtonini.com flashheart
Ross
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 7/8] busybox: fix du-l-works test case
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
` (5 preceding siblings ...)
2018-11-21 5:41 ` [PATCH 6/8] busybox: remove three hostname test cases Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
2018-11-21 5:41 ` [PATCH 8/8] busybox: check CONFIG_DESKTOP before using 'od -t' in " Chen Qi
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
64 + 64 + 16 = 144K
144 + sizeof_a_directory >= 145
So fix to use 145 instead of 144.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...-du-l-works-fix-to-use-145-instead-of-144.patch | 32 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.29.2.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch
diff --git a/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch b/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch
new file mode 100644
index 0000000..bb5f753
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-du-l-works-fix-to-use-145-instead-of-144.patch
@@ -0,0 +1,32 @@
+From c69feb2fdb755d6db34d0eb0a9e9994386c15e3a Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 14 Nov 2018 15:19:57 +0800
+Subject: [PATCH] du-l-works: fix to use 145 instead of 144
+
+64 + 64 + 16 = 144
+144 + size_of_directory >= 145
+So fix to use 145 instead of 144.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086836.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/du/du-l-works | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testsuite/du/du-l-works b/testsuite/du/du-l-works
+index af87345..575064a 100644
+--- a/testsuite/du/du-l-works
++++ b/testsuite/du/du-l-works
+@@ -5,7 +5,7 @@ cd du.testdir
+ dd if=/dev/zero of=file1 bs=1k count=64 2>/dev/null
+ ln file1 file1.1
+ dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
+-test x"`busybox du -l .`" = x"144 ." \
++test x"`busybox du -l .`" = x"145 ." \
+ -o x"`busybox du -l .`" = x"146 ." \
+ -o x"`busybox du -l .`" = x"148 ." \
+ -o x"`busybox du -l .`" = x"152 ." \
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index 98767f0..f38db2a 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -43,6 +43,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://makefile-libbb-race.patch \
file://0001-testsuite-check-uudecode-before-using-it.patch \
file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \
+ file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 8/8] busybox: check CONFIG_DESKTOP before using 'od -t' in test case
2018-11-21 5:41 [PATCH V2 0/8] Fixes for busybox ptest Chen Qi
` (6 preceding siblings ...)
2018-11-21 5:41 ` [PATCH 7/8] busybox: fix du-l-works test case Chen Qi
@ 2018-11-21 5:41 ` Chen Qi
7 siblings, 0 replies; 13+ messages in thread
From: Chen Qi @ 2018-11-21 5:41 UTC (permalink / raw)
To: openembedded-core
The '-t' option support for 'od' is enabled by CONFIG_DESKTOP.
So check it before using it in test cases.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...te-check-CONFIG_DESKTOP-before-using-od-t.patch | 83 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.29.2.bb | 1 +
2 files changed, 84 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/0001-testsuite-check-CONFIG_DESKTOP-before-using-od-t.patch
diff --git a/meta/recipes-core/busybox/busybox/0001-testsuite-check-CONFIG_DESKTOP-before-using-od-t.patch b/meta/recipes-core/busybox/busybox/0001-testsuite-check-CONFIG_DESKTOP-before-using-od-t.patch
new file mode 100644
index 0000000..9b96eee
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-testsuite-check-CONFIG_DESKTOP-before-using-od-t.patch
@@ -0,0 +1,83 @@
+From b09db631e77c63ebe733c69b00108f043f1f1d85 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 21 Nov 2018 10:00:29 +0800
+Subject: [PATCH] testsuite: check CONFIG_DESKTOP before using 'od -t'
+
+The '-t' option for od is enabled by CONFIG_DESKTOP. So
+check this config before using 'od -t' in test cases.
+
+Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2018-November/086895.html]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ testsuite/echo/echo-prints-dash | 1 +
+ testsuite/echo/echo-prints-non-opts | 1 +
+ testsuite/echo/echo-prints-slash-zero | 2 +-
+ testsuite/echo/echo-prints-slash_00041 | 2 +-
+ testsuite/echo/echo-prints-slash_0041 | 2 +-
+ testsuite/echo/echo-prints-slash_041 | 2 +-
+ testsuite/echo/echo-prints-slash_41 | 2 +-
+ 7 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/testsuite/echo/echo-prints-dash b/testsuite/echo/echo-prints-dash
+index ddcdbad..f1f31a0 100644
+--- a/testsuite/echo/echo-prints-dash
++++ b/testsuite/echo/echo-prints-dash
+@@ -1 +1,2 @@
++# FEATURE: CONFIG_DESKTOP
+ test "`busybox echo - | od -t x1 | head -n 1`" = "0000000 2d 0a"
+diff --git a/testsuite/echo/echo-prints-non-opts b/testsuite/echo/echo-prints-non-opts
+index c7d1e20..4e642a1 100644
+--- a/testsuite/echo/echo-prints-non-opts
++++ b/testsuite/echo/echo-prints-non-opts
+@@ -1 +1,2 @@
++# FEATURE: CONFIG_DESKTOP
+ test "`busybox echo -neEZ | od -t x1 | head -n 1`" = "0000000 2d 6e 65 45 5a 0a"
+diff --git a/testsuite/echo/echo-prints-slash-zero b/testsuite/echo/echo-prints-slash-zero
+index d97ed8e..948f899 100644
+--- a/testsuite/echo/echo-prints-slash-zero
++++ b/testsuite/echo/echo-prints-slash-zero
+@@ -1,3 +1,3 @@
+-# FEATURE: CONFIG_FEATURE_FANCY_ECHO
++# FEATURE: CONFIG_FEATURE_FANCY_ECHO CONFIG_DESKTOP
+
+ test "`busybox echo -e -n 'msg\n\0' | od -t x1 | head -n 1`" = "0000000 6d 73 67 0a 00"
+diff --git a/testsuite/echo/echo-prints-slash_00041 b/testsuite/echo/echo-prints-slash_00041
+index 9cffabd..7ea217b 100644
+--- a/testsuite/echo/echo-prints-slash_00041
++++ b/testsuite/echo/echo-prints-slash_00041
+@@ -1,3 +1,3 @@
+-# FEATURE: CONFIG_FEATURE_FANCY_ECHO
++# FEATURE: CONFIG_FEATURE_FANCY_ECHO CONFIG_DESKTOP
+
+ test "`busybox echo -ne '\00041z' | od -t x1 | head -n 1`" = "0000000 04 31 7a"
+diff --git a/testsuite/echo/echo-prints-slash_0041 b/testsuite/echo/echo-prints-slash_0041
+index b07429d..941faca 100644
+--- a/testsuite/echo/echo-prints-slash_0041
++++ b/testsuite/echo/echo-prints-slash_0041
+@@ -1,3 +1,3 @@
+-# FEATURE: CONFIG_FEATURE_FANCY_ECHO
++# FEATURE: CONFIG_FEATURE_FANCY_ECHO CONFIG_DESKTOP
+
+ test "`busybox echo -ne '\0041z' | od -t x1 | head -n 1`" = "0000000 21 7a"
+diff --git a/testsuite/echo/echo-prints-slash_041 b/testsuite/echo/echo-prints-slash_041
+index 1d70cec..60cbfca 100644
+--- a/testsuite/echo/echo-prints-slash_041
++++ b/testsuite/echo/echo-prints-slash_041
+@@ -1,3 +1,3 @@
+-# FEATURE: CONFIG_FEATURE_FANCY_ECHO
++# FEATURE: CONFIG_FEATURE_FANCY_ECHO CONFIG_DESKTOP
+
+ test "`busybox echo -ne '\041z' | od -t x1 | head -n 1`" = "0000000 21 7a"
+diff --git a/testsuite/echo/echo-prints-slash_41 b/testsuite/echo/echo-prints-slash_41
+index 6d8999b..afd7c36 100644
+--- a/testsuite/echo/echo-prints-slash_41
++++ b/testsuite/echo/echo-prints-slash_41
+@@ -1,3 +1,3 @@
+-# FEATURE: CONFIG_FEATURE_FANCY_ECHO
++# FEATURE: CONFIG_FEATURE_FANCY_ECHO CONFIG_DESKTOP
+
+ test "`busybox echo -ne '\41z' | od -t x1 | head -n 1`" = "0000000 21 7a"
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.29.2.bb b/meta/recipes-core/busybox/busybox_1.29.2.bb
index f38db2a..66049bd 100644
--- a/meta/recipes-core/busybox/busybox_1.29.2.bb
+++ b/meta/recipes-core/busybox/busybox_1.29.2.bb
@@ -44,6 +44,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-testsuite-check-uudecode-before-using-it.patch \
file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \
file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \
+ file://0001-testsuite-check-CONFIG_DESKTOP-before-using-od-t.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
--
1.9.1
^ permalink raw reply related [flat|nested] 13+ messages in thread