Skip to contentSkip to conversation

bzip2: Add test suite for bzip2

PATCH Superseded Rahul Kumar 2 participants 6 messages Apr 2, 2020 – Apr 15, 2020

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bzip2: Add test suite for bzip2

[YOCTO #13444]

---
 .../bzip2/0001-bzip2-modify-run-tests-script.patch | 220 +++++++++++++++++++++
 meta/recipes-extended/bzip2/bzip2/Makefile.am      |   2 +
 meta/recipes-extended/bzip2/bzip2_1.0.8.bb         |  15 +-
 3 files changed, 234 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +220 -0
new file mode 100644
index 0000000..8ae3c4e
@@ -0,0 +1,220 @@
+From 42e6258485030085285d4b30854bfb94bcf43880 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar <[email protected]>
+Date: Mon, 30 Mar 2020 12:17:00 +0530
+Subject: [PATCH] bzip2: modify run-tests script
+
+Upstream-Status: Inappropriate [ modify run-tests script for ptest infrastructure ]
+
+modify run-tests script to write PASS/FAIL as expected by the ptest infrastructure
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83 +++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 43 insertions(+), 40 deletions(-)
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"
+ IGNORE_MD5=0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi
+
+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then
+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"
++  echo "Checking md5 sums: No"
+ fi
+
+ # Remove any left over tesfilecopies from previous runs first.
+@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} && { echo "PASS: ${bzfile} Decompress"; } \
++    || { echo "FAIL: ${bzfile} Decompress";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -93,20 +93,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo "PASS: ${bzfile} Recompress "; } \
++    || { echo "FAIL: ${bzfile} Recompress";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo "PASS: ${bzfile} Redecompress"; } \
++    || { echo "FAIL: ${bzfile} Redecompress";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -114,16 +114,16 @@ while IFS= read -r -d '' bzfile; do
+   rm "${copy}"
+
+   # Now do it all again in "small" mode.
+-  echo "  Decompress (small)..."
++  # echo "  Decompress (small)..."
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} &&{ echo "PASS: ${bzfile} Decompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Decompress (small)";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} > /dev/null 2>&1 && { echo "PASS: ${bzfile} Md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} Md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -131,20 +131,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo "PASS: ${bzfile} Recompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Recompress (small)";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo "PASS: ${bzfile} Redecompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Redecompress (small)";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum : Miss Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -169,14 +169,14 @@ nobad=0
+ badbad=0
+ while IFS= read -r -d '' badfile; do
+
+-  echo "Processing ${badfile}"
++  # echo "Processing ${badfile}"
+
+-  echo "  Trying to decompress..."
++  # echo "  Trying to decompress..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"
++    echo "FAIL: badness not detected"
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -185,18 +185,20 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile} during decompress."
+   fi
+
+-  echo "  Trying to decompress (small)..."
++  # echo "  Trying to decompress (small)..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"
++    echo "FAIL: badness not detected "
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -205,10 +207,12 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile} during decompress (small)"
+   fi
+
+ done < <(find ${TESTS_DIR} -type f -name \*\.bz2.bad -print0)
+@@ -234,5 +238,4 @@ if [[ ${results} -eq 0 ]]; then
+ else
+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--
+2.7.4
meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
index dcf6458..f917b23 100644
@@ -46,6 +46,7 @@ runtest:
 	else echo "FAIL: sample2 decompress"; fi
 	@if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
 	else echo "FAIL: sample3 decompress"; fi
+	./bzip2-tests/run-tests.sh
 
 install-ptest:
 	sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
 	cp $(srcdir)/sample1.bz2	$(DESTDIR)/
 	cp $(srcdir)/sample2.bz2	$(DESTDIR)/
 	cp $(srcdir)/sample3.bz2	$(DESTDIR)/
+	cp -rf $(srcdir)/../git		$(DESTDIR)/bzip2-tests
 	ln -s $(bindir)/bzip2		$(DESTDIR)/bzip2
 
 install-exec-hook:
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +12 -3
index 8e9b779..e8ec5c6 100644
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the performance of the PPM family of
 HOMEPAGE = "https://sourceware.org/bzip2/"
 SECTION = "console/utils"
 LICENSE = "bzip2"
-LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"
-
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \
+                    file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \
+                    file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \
+                    file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \
+                    file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \
+                   "
 SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
+           git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \
            file://configure.ac;subdir=${BP} \
            file://Makefile.am;subdir=${BP} \
            file://run-ptest \
+           file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git \
            "
+
 SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
 SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
 
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
 UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
 PACKAGES =+ "libbz2"
@@ -39,7 +48,7 @@ do_install_ptest () {
 
 FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"
 
 PROVIDES_append_class-native = " bzip2-replacement-native"
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 1 line · Rahul Kumar

[YOCTO #13444]

Thanks for contributing this work Rahul.

It would be good if the long log explained the changes made in a sentence or two. I've made some comments and asked some questions inline below. I may have gone overboard but I hope you get the idea that we'd like to see not just the changes but the reason for the changes.

Also, can you present the results of running:

# ptest-runner bzip2
on qemux86-64 with kvm enabled in the long log?
If there are tests that fail or are skipped
comment on that even it it's to say that you don't know what is wrong.
Quoted 15 lines
---
  .../bzip2/0001-bzip2-modify-run-tests-script.patch | 220 +++++++++++++++++++++
  meta/recipes-extended/bzip2/bzip2/Makefile.am      |   2 +
  meta/recipes-extended/bzip2/bzip2_1.0.8.bb         |  15 +-
  3 files changed, 234 insertions(+), 3 deletions(-)

create mode 100644 meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +0 -0
new file mode 100644
index 0000000..8ae3c4e

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 6

Quoted 6 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +6 -0
@@ -0,0 +1,220 @@
+From 42e6258485030085285d4b30854bfb94bcf43880 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar <[email protected]>
+Date: Mon, 30 Mar 2020 12:17:00 +0530
+Subject: [PATCH] bzip2: modify run-tests script
+
+Upstream-Status: Inappropriate [ modify run-tests script for ptest infrastructure ]

It seems that some of the changes are to make the tests less verbose and to 'tighten-up' the language and formatting used. Upstream might accept them, have you checked? If you change the status to Pending I think it would be better for now because that would force someone check on the progress at some point.

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest infrastructure
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83 +++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 43 insertions(+), 40 deletions(-)
+

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it.

Quoted 26 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +26 -0
+ IGNORE_MD5=0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi
+
+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then
+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 60

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++  echo "Checking md5 sums: No"
+ fi
+
+ # Remove any left over tesfilecopies from previous runs first.
+@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Without an explanation in the long log, I can't tell if this comment was removed intentionally or perhaps when you were debugging. I expect you have a good reason to remove it but an explaination would be helpful.

Quoted 110 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +110 -0
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} && { echo "PASS: ${bzfile} Decompress"; } \
++    || { echo "FAIL: ${bzfile} Decompress";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -93,20 +93,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo "PASS: ${bzfile} Recompress "; } \
++    || { echo "FAIL: ${bzfile} Recompress";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo "PASS: ${bzfile} Redecompress"; } \
++    || { echo "FAIL: ${bzfile} Redecompress";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -114,16 +114,16 @@ while IFS= read -r -d '' bzfile; do
+   rm "${copy}"
+
+   # Now do it all again in "small" mode.
+-  echo "  Decompress (small)..."
++  # echo "  Decompress (small)..."
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} &&{ echo "PASS: ${bzfile} Decompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Decompress (small)";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} > /dev/null 2>&1 && { echo "PASS: ${bzfile} Md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} Md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -131,20 +131,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo "PASS: ${bzfile} Recompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Recompress (small)";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo "PASS: ${bzfile} Redecompress (small)"; } \
++    || { echo "FAIL: ${bzfile} Redecompress (small)";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum Matched"; } \
++      || { echo "FAIL: ${bzfile} md5sum : Miss Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -169,14 +169,14 @@ nobad=0
+ badbad=0
+ while IFS= read -r -d '' badfile; do
+
+-  echo "Processing ${badfile}"
++  # echo "Processing ${badfile}"
+
+-  echo "  Trying to decompress..."
++  # echo "  Trying to decompress..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 180

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++    echo "FAIL: badness not detected"
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -185,18 +185,20 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"

It's 'badness':
https://www.merriam-webster.com/thesaurus/badness

Quoted 65 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +40 -0
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile} during decompress."
+   fi
+
+-  echo "  Trying to decompress (small)..."
++  # echo "  Trying to decompress (small)..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"
++    echo "FAIL: badness not detected "
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -205,10 +207,12 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile} during decompress (small)"
+   fi
+
+ done < <(find ${TESTS_DIR} -type f -name \*\.bz2.bad -print0)
+@@ -234,5 +238,4 @@ if [[ ${results} -eq 0 ]]; then
+ else
+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--
+2.7.4
meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
index dcf6458..f917b23 100644
@@ -46,6 +46,7 @@ runtest:
  	else echo "FAIL: sample2 decompress"; fi
  	@if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
  	else echo "FAIL: sample3 decompress"; fi
+	./bzip2-tests/run-tests.sh
 
  install-ptest:
  	sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
  	cp $(srcdir)/sample1.bz2	$(DESTDIR)/
  	cp $(srcdir)/sample2.bz2	$(DESTDIR)/
  	cp $(srcdir)/sample3.bz2	$(DESTDIR)/
+	cp -rf $(srcdir)/../git		$(DESTDIR)/bzip2-tests
  	ln -s $(bindir)/bzip2		$(DESTDIR)/bzip2
 
  install-exec-hook:
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of · line 12

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +5 -2
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the performance of the PPM family of
  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"
-
+LIC_FILES_CHKSUM = "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \
+                    file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \
+                    file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \
+                    file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \
+                    file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \

What's all this additional license info about? Please explain in when replying as well as in the long log.

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of · line 15

Quoted 3 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +2 -0
+                   "
  SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
+           git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \

Mention how big this repo is in the long log.

Quoted 15 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +4 -0
             file://configure.ac;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \
+           file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git \
             "
+
  SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
  SRC_URI[sha256sum] = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
 
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
  PACKAGES =+ "libbz2"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 5 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
@@ -39,7 +48,7 @@ do_install_ptest () {
 
  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ? If it requires bash, how bad are the scripts and can they be made POSIX compliant with the help of:
https://www.shellcheck.net/

../Randy

Quoted 7 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
  PROVIDES_append_class-native = " bzip2-replacement-native"
  BBCLASSEXTEND = "native nativesdk"
 
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#2 lore raw

Hi Randy,

Kindly find the attached bzip2 ptest logs file.
I answered your Question here .
Kindly take a look and feel free to point out if i am wrong at any place and let me know if i missed anything.
==========

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest

infrastructure

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83

+++++++++++++++++++++++++++++++-----------------------------

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 12 lines

+ 1 file changed, 43 insertions(+), 40 deletions(-)

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it ?

Ans:
we need to parse the TEST_DIR Path because we are running runtest.sh script outside the bzip2-tests directory.
But I figured out a more convenient way for this.
I will parse the TEST_DIR path during running the runscript.sh.

I can implement this by adding below line in makefile.am file. ./bzip2-tests/run-tests.sh --tests-dir="$(PWD)/bzip2-tests"

In Next version of patch I will implement it.

===========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 36

Quoted 12 lines

+ IGNORE_MD5=0

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi

Explanation:

if ! type "valgrind" > /dev/null;
suppose if valgrind is not present in my image at that time it is
showing
./bzip2-tests/run-tests.sh: line 43: type: valgrind: not found

Since we are displaying a message in script that valgrind is used or
not.

So i redirect the output
BY Modifying this line with "if ! type "valgrind" > /dev/null 2>&1"

==========

Quoted 14 lines

+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then

+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"
++  echo "Checking md5 sums: No"
Quoted 2 lines

+ fi
+

Explanation:
I Simply modified valgrind and md5sum messages with Yes/No

==========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 60

Quoted 7 lines

+ # Remove any left over tesfilecopies from previous runs first. +@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +5 -0
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Explanation:
Initially for each file It is printing Decompress...
I think which is not required to display in ptest logs so i comment it out.

==========

Quoted 4 lines

+ if [[ ${IGNORE_MD5} -ne 1 ]]; then

+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Review

Quoted 3 lines

++ || { echo "FAIL: ${bzfile} md5sum Matched";

(quoted diff) +2 -0
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; conti

Explanation:
for md5sum there is no short form option for --status option. use of --status is "don't output anything, status code shows success"

md5sum -c ${md5file} < ${copy}
so i removed the --status option due to this below line is coming in ptest log
-: OK

==========

+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1

+ fi
+--

Explanation:
if some test failed then script is returning with exit 1 status due to this at the end of ptest below message is printing
make: *** [Makefile:14: runtest] Error 1

logs wil looks like below if script returning with exit 1 status

PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/void.bz2.bad during decompress (small)

Correctly found all bad file data integrity errors.

Bad results, look for !!! in the logs above
- ./bzip2-tests/commons-compress/zip64support.tar.bz2 bad decompress result
- ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2 bad decompress result
- ./bzip2-tests/lbzip2/idx899999.bz2 bad decompress result
- ./bzip2-tests/lbzip2/ch255.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-fb.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-00.bz2 bad decompress result
make: *** [Makefile:14: runtest] Error 1

ERROR: Exit status is 512
DURATION: 31
END: /usr/lib/bzip2/ptest
2020-04-13T16:05
STOP: ptest-runner
root@qemux86-64:~#

To avoid "make: *** [Makefile:14: runtest] Error 1" messgae I removed exit 1 line from the script.
May be i am wrong please suggest me i should keep it or remove.

==========

Quoted 4 lines
             file://configure.ac;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \

+

file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git \

Quoted 4 lines
             "

+
SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" SRC_URI[sha256sum] =

"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +3 -1
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
  PACKAGES =+ "libbz2"
@@ -39,7 +48,7 @@ do_install_ptest () {
 
  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ? If it requires bash, how bad are the scripts and can they be made POSIX compliant with the help of:
https://www.shellcheck.net/
Ans.
This script is based on array concept and Arrays are not part of the POSIX sh specification.
so i think we should go with bash script.

==========

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2/Makefile.am

Review

Quoted 20 lines

index dcf6458..f917b23 100644

meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
@@ -46,6 +46,7 @@ runtest:
  else echo "FAIL: sample2 decompress"; fi
  @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
  else echo "FAIL: sample3 decompress"; fi
+ ./bzip2-tests/run-tests.sh
 
  install-ptest:
  sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
  cp $(srcdir)/sample1.bz2 $(DESTDIR)/
  cp $(srcdir)/sample2.bz2 $(DESTDIR)/
  cp $(srcdir)/sample3.bz2 $(DESTDIR)/
+ cp -rf $(srcdir)/../git $(DESTDIR)/bzip2-tests
  ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2
 
  install-exec-hook:
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the

Quoted 4 lines

index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the

performance of the PPM family of

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -1
  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 8

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
-
+LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 9

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 10

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 11

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f
\

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 12

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327
\

What's all this additional license info about? Please explain in when replying as well as in the long log.

Ans:
I don't have much knowledge about the licensing part so I populated all the licenses which are present in the bzip2-tests source code.
can you please provide any suggestions on what basis we should take the decision of the license population.
==========

Let me know if I missed anything here.

*Thanks & Regards,*
Rahul Kumar
Software Engineer,Linux Solutions Engineering
Group,Montavista Software LLC
Email Id: [email protected]
<https://plus.google.com/+CodeTwoSoftware>

Quoted 387 lines · Randy MacLeod
Quoted 1 line · Rahul Kumar

[YOCTO #13444]

Thanks for contributing this work Rahul.

It would be good if the long log explained the changes made in a sentence or two. I've made some comments and asked some questions inline below. I may have gone overboard but I hope you get the idea that we'd like to see not just the changes but the reason for the changes.

Also, can you present the results of running:

# ptest-runner bzip2
on qemux86-64 with kvm enabled in the long log?
If there are tests that fail or are skipped
comment on that even it it's to say that you don't know what is wrong.
Quoted 4 lines
---
  .../bzip2/0001-bzip2-modify-run-tests-script.patch | 220

+++++++++++++++++++++

Quoted 4 lines
  meta/recipes-extended/bzip2/bzip2/Makefile.am      |   2 +
  meta/recipes-extended/bzip2/bzip2_1.0.8.bb         |  15 +-
  3 files changed, 234 insertions(+), 3 deletions(-)

create mode 100644

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 2 lines

diff --git

a/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines

new file mode 100644
index 0000000..8ae3c4e
--- /dev/null
+++

b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 6

Quoted 7 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +6 -0
@@ -0,0 +1,220 @@
+From 42e6258485030085285d4b30854bfb94bcf43880 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar <[email protected]>
+Date: Mon, 30 Mar 2020 12:17:00 +0530
+Subject: [PATCH] bzip2: modify run-tests script
+
+Upstream-Status: Inappropriate [ modify run-tests script for ptest

infrastructure ]

It seems that some of the changes are to make the tests less verbose and to 'tighten-up' the language and formatting used. Upstream might accept them, have you checked? If you change the status to Pending I think it would be better for now because that would force someone check on the progress at some point.

Review line 8

Quoted 2 lines
(quoted diff) +2 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest

infrastructure

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83

+++++++++++++++++++++++++++++++-----------------------------

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +12 -0
+ 1 file changed, 43 insertions(+), 40 deletions(-)
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it.

Quoted 26 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +26 -0
+ IGNORE_MD5=0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi
+
+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then
+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 60

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++  echo "Checking md5 sums: No"
+ fi
+
+ # Remove any left over tesfilecopies from previous runs first.
+@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Without an explanation in the long log, I can't tell if this comment was removed intentionally or perhaps when you were debugging. I expect you have a good reason to remove it but an explaination would be helpful.

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} && { echo

"PASS: ${bzfile} Decompress"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Decompress";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 13 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +13 -0
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -93,20 +93,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo

"PASS: ${bzfile} Recompress "; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Recompress";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo

"PASS: ${bzfile} Redecompress"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Redecompress";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
+@@ -114,16 +114,16 @@ while IFS= read -r -d '' bzfile; do
+   rm "${copy}"
+
+   # Now do it all again in "small" mode.
+-  echo "  Decompress (small)..."
++  # echo "  Decompress (small)..."
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} &&{ echo

"PASS: ${bzfile} Decompress (small)"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Decompress (small)";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} > /dev/null 2>&1 && { echo "PASS:

${bzfile} Md5sum Matched"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 13 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +13 -0
++      || { echo "FAIL: ${bzfile} Md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -131,20 +131,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo

"PASS: ${bzfile} Recompress (small)"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Recompress (small)";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo

"PASS: ${bzfile} Redecompress (small)"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Redecompress (small)";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Quoted 18 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +18 -0
++      || { echo "FAIL: ${bzfile} md5sum : Miss Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -169,14 +169,14 @@ nobad=0
+ badbad=0
+ while IFS= read -r -d '' badfile; do
+
+-  echo "Processing ${badfile}"
++  # echo "Processing ${badfile}"
+
+-  echo "  Trying to decompress..."
++  # echo "  Trying to decompress..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 180

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++    echo "FAIL: badness not detected"
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -185,18 +185,20 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"

It's 'badness':
https://www.merriam-webster.com/thesaurus/badness

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 5 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +5 -0
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile}

during decompress."

Quoted 14 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +14 -0
+   fi
+
+-  echo "  Trying to decompress (small)..."
++  # echo "  Trying to decompress (small)..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"
++    echo "FAIL: badness not detected "
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -205,10 +207,12 @@ while IFS= read -r -d '' badfile; do

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile}

during decompress (small)"

Review

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+   fi
+
+ done < <(find ${TESTS_DIR} -type f -name \*\.bz2.bad -print0)
+@@ -234,5 +238,4 @@ if [[ ${results} -eq 0 ]]; then
+ else
+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--
+2.7.4
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2/Makefile.am

meta/recipes-extended/bzip2/bzip2/Makefile.am runtest: · line 47

Quoted 6 lines

index dcf6458..f917b23 100644

meta/recipes-extended/bzip2/bzip2/Makefile.am +0 -0
@@ -46,6 +46,7 @@ runtest:
      else echo "FAIL: sample2 decompress"; fi
      @if cmp sample3.tst sample3.ref; then echo "PASS: sample3

decompress";\

Review

Quoted 14 lines
meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
      else echo "FAIL: sample3 decompress"; fi
+     ./bzip2-tests/run-tests.sh
 
  install-ptest:
      sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
      cp $(srcdir)/sample1.bz2        $(DESTDIR)/
      cp $(srcdir)/sample2.bz2        $(DESTDIR)/
      cp $(srcdir)/sample3.bz2        $(DESTDIR)/
+     cp -rf $(srcdir)/../git         $(DESTDIR)/bzip2-tests
      ln -s $(bindir)/bzip2           $(DESTDIR)/bzip2
 
  install-exec-hook:
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the

Quoted 4 lines

index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the

performance of the PPM family of

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -1
  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 8

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
-
+LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 9

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 10

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 11

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 12

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \

What's all this additional license info about? Please explain in when replying as well as in the long log.

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of · line 15

Quoted 3 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +2 -0
+                   "
  SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
+           git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \

Mention how big this repo is in the long log.

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of · line 21

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
             file://configure.ac;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \
+

file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
             "
+
  SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
  SRC_URI[sha256sum] =

"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +3 -1
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
  PACKAGES =+ "libbz2"
@@ -39,7 +48,7 @@ do_install_ptest () {
 
  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ? If it requires bash, how bad are the scripts and can they be made POSIX compliant with the help of:
https://www.shellcheck.net/

../Randy

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () {

Quoted 7 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
  PROVIDES_append_class-native = " bzip2-replacement-native"
  BBCLASSEXTEND = "native nativesdk"
 
Quoted 4 lines

--
# Randy MacLeod
# Wind River Linux

root@qemux86-64:~# ptest-runner bzip2
START: ptest-runner
2020-04-13T17:08
BEGIN: /usr/lib/bzip2/ptest
./bzip2 -1  < sample1.ref > sample1.rb2
./bzip2 -2  < sample2.ref > sample2.rb2
./bzip2 -3  < sample3.ref > sample3.rb2
./bzip2 -d  < sample1.bz2 > sample1.tst
./bzip2 -d  < sample2.bz2 > sample2.tst
./bzip2 -ds < sample3.bz2 > sample3.tst
PASS: sample1 compress
PASS: sample2 compress
PASS: sample3 compress
PASS: sample1 decompress
PASS: sample2 decompress
PASS: sample3 decompress
./bzip2-tests/run-tests.sh
Testing bzip2 in directory ./bzip2-tests
Using valgrind: No
Checking md5 sums: Yes
Testing decompression and recompression...

Processing ./bzip2-tests/commons-compress/bla.tar.bz2
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Decompress -: OK
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Recompress
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Redecompress -: OK
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Decompress (small)
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Recompress (small)
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/commons-compress/bla.tar.bz2 md5sum Matched Processing ./bzip2-tests/commons-compress/multiple.bz2
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Decompress -: OK
PASS: ./bzip2-tests/commons-compress/multiple.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Recompress
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Redecompress -: OK
PASS: ./bzip2-tests/commons-compress/multiple.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Decompress (small)
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Md5sum Matched
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Recompress (small)
PASS: ./bzip2-tests/commons-compress/multiple.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/commons-compress/multiple.bz2 md5sum Matched Processing ./bzip2-tests/commons-compress/bla.xml.bz2
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Decompress -: OK
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Recompress
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Redecompress -: OK
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Decompress (small)
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Recompress (small)
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/commons-compress/bla.xml.bz2 md5sum Matched Processing ./bzip2-tests/commons-compress/zip64support.tar.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/commons-compress/zip64support.tar.bz2 Decompress Processing ./bzip2-tests/commons-compress/COMPRESS-131.bz2
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Decompress -: OK
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Recompress
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Redecompress -: OK
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Decompress (small)
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Md5sum Matched
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Recompress (small)
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/commons-compress/COMPRESS-131.bz2 md5sum Matched Processing ./bzip2-tests/commons-compress/bla.txt.bz2
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Decompress
-: OK
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Recompress
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Redecompress -: OK
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Decompress (small)
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Md5sum Matched
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Recompress (small)
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/commons-compress/bla.txt.bz2 md5sum Matched Processing ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2 Decompress Processing ./bzip2-tests/go/crypto/pss-vect.txt.bz2
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Recompress
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Decompress (small)
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Recompress (small)
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/crypto/pss-vect.txt.bz2 md5sum Matched Processing ./bzip2-tests/go/crypto/SigVer.rsp.bz2
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 md5sum Matched
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Recompress
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 md5sum Matched
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Decompress (small)
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Recompress (small)
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/go/crypto/SigVer.rsp.bz2 md5sum Matched Processing ./bzip2-tests/go/compress/pass-sawtooth.bz2
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Recompress
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/compress/pass-sawtooth.bz2 md5sum Matched Processing ./bzip2-tests/go/compress/pass-random1.bz2
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Recompress
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/compress/pass-random1.bz2 md5sum Matched Processing ./bzip2-tests/go/compress/random.data.bz2
PASS: ./bzip2-tests/go/compress/random.data.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/compress/random.data.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/random.data.bz2 Recompress
PASS: ./bzip2-tests/go/compress/random.data.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/compress/random.data.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/random.data.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/random.data.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/random.data.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/random.data.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/compress/random.data.bz2 md5sum Matched Processing ./bzip2-tests/go/compress/pass-random2.bz2
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Recompress
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/compress/pass-random2.bz2 md5sum Matched Processing ./bzip2-tests/go/compress/e.txt.bz2
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Decompress
-: OK
PASS: ./bzip2-tests/go/compress/e.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Recompress
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/go/compress/e.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/e.txt.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/go/compress/e.txt.bz2 md5sum Matched
Processing ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Decompress -: OK
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Recompress
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Redecompress -: OK
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 md5sum Matched
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Decompress (small)
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Md5sum Matched
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Recompress (small)
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/go/compress/Isaac.Newton-Opticks.txt.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/rand.bz2
PASS: ./bzip2-tests/lbzip2/rand.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/rand.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/rand.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/rand.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/rand.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/rand.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/rand.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/rand.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/rand.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/lbzip2/rand.bz2 md5sum Matched
Processing ./bzip2-tests/lbzip2/32767.bz2
PASS: ./bzip2-tests/lbzip2/32767.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/32767.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/32767.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/32767.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/32767.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/32767.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/32767.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/32767.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/32767.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/lbzip2/32767.bz2 md5sum Matched
Processing ./bzip2-tests/lbzip2/idx899999.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/lbzip2/idx899999.bz2 Decompress Processing ./bzip2-tests/lbzip2/concat.bz2
PASS: ./bzip2-tests/lbzip2/concat.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/concat.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/concat.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/concat.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/concat.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/concat.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/concat.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/concat.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/concat.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/concat.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/codelen20.bz2
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Redecompress -: OK
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/codelen20.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/incomp-1.bz2
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/incomp-1.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/incomp-2.bz2
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/incomp-2.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/ch255.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/lbzip2/ch255.bz2 Decompress Processing ./bzip2-tests/lbzip2/repet.bz2
PASS: ./bzip2-tests/lbzip2/repet.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/repet.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/repet.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/repet.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/repet.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/repet.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/repet.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/repet.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/repet.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/repet.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/fib.bz2
PASS: ./bzip2-tests/lbzip2/fib.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/fib.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/fib.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/fib.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/fib.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/fib.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/fib.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/fib.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/fib.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/fib.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/trash.bz2
PASS: ./bzip2-tests/lbzip2/trash.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/trash.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/trash.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/trash.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/trash.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/trash.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/trash.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/trash.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/trash.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/trash.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/gap.bz2
PASS: ./bzip2-tests/lbzip2/gap.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/gap.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/gap.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/gap.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/gap.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/gap.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/gap.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/gap.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/gap.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/gap.bz2 md5sum Matched Processing ./bzip2-tests/lbzip2/empty.bz2
PASS: ./bzip2-tests/lbzip2/empty.bz2 Decompress
-: OK
PASS: ./bzip2-tests/lbzip2/empty.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/empty.bz2 Recompress
PASS: ./bzip2-tests/lbzip2/empty.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/lbzip2/empty.bz2 md5sum Matched
PASS: ./bzip2-tests/lbzip2/empty.bz2 Decompress (small)
PASS: ./bzip2-tests/lbzip2/empty.bz2 Md5sum Matched
PASS: ./bzip2-tests/lbzip2/empty.bz2 Recompress (small)
PASS: ./bzip2-tests/lbzip2/empty.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/lbzip2/empty.bz2 md5sum Matched Processing ./bzip2-tests/pyflate/765B.bz2
PASS: ./bzip2-tests/pyflate/765B.bz2 Decompress
-: OK
PASS: ./bzip2-tests/pyflate/765B.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/765B.bz2 Recompress
PASS: ./bzip2-tests/pyflate/765B.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/pyflate/765B.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/765B.bz2 Decompress (small)
PASS: ./bzip2-tests/pyflate/765B.bz2 Md5sum Matched
PASS: ./bzip2-tests/pyflate/765B.bz2 Recompress (small)
PASS: ./bzip2-tests/pyflate/765B.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/pyflate/765B.bz2 md5sum Matched Processing ./bzip2-tests/pyflate/45MB-fb.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/pyflate/45MB-fb.bz2 Decompress Processing ./bzip2-tests/pyflate/45MB-00.bz2

bzip2: I/O or other error, bailing out. Possible reason follows.
bzip2: No space left on device
FAIL: ./bzip2-tests/pyflate/45MB-00.bz2 Decompress Processing ./bzip2-tests/pyflate/510B.bz2
PASS: ./bzip2-tests/pyflate/510B.bz2 Decompress
-: OK
PASS: ./bzip2-tests/pyflate/510B.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/510B.bz2 Recompress
PASS: ./bzip2-tests/pyflate/510B.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/pyflate/510B.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/510B.bz2 Decompress (small)
PASS: ./bzip2-tests/pyflate/510B.bz2 Md5sum Matched
PASS: ./bzip2-tests/pyflate/510B.bz2 Recompress (small)
PASS: ./bzip2-tests/pyflate/510B.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/pyflate/510B.bz2 md5sum Matched Processing ./bzip2-tests/pyflate/hello-world.bz2
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Decompress
-: OK
PASS: ./bzip2-tests/pyflate/hello-world.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Recompress
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/pyflate/hello-world.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Decompress (small)
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Md5sum Matched
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Recompress (small)
PASS: ./bzip2-tests/pyflate/hello-world.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/pyflate/hello-world.bz2 md5sum Matched Processing ./bzip2-tests/pyflate/aaa.bz2
PASS: ./bzip2-tests/pyflate/aaa.bz2 Decompress
-: OK
PASS: ./bzip2-tests/pyflate/aaa.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/aaa.bz2 Recompress
PASS: ./bzip2-tests/pyflate/aaa.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/pyflate/aaa.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/aaa.bz2 Decompress (small)
PASS: ./bzip2-tests/pyflate/aaa.bz2 Md5sum Matched
PASS: ./bzip2-tests/pyflate/aaa.bz2 Recompress (small)
PASS: ./bzip2-tests/pyflate/aaa.bz2 Redecompress (small)
-: OK
PASS: ./bzip2-tests/pyflate/aaa.bz2 md5sum Matched Processing ./bzip2-tests/pyflate/empty.bz2
PASS: ./bzip2-tests/pyflate/empty.bz2 Decompress
-: OK
PASS: ./bzip2-tests/pyflate/empty.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/empty.bz2 Recompress
PASS: ./bzip2-tests/pyflate/empty.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/pyflate/empty.bz2 md5sum Matched
PASS: ./bzip2-tests/pyflate/empty.bz2 Decompress (small)
PASS: ./bzip2-tests/pyflate/empty.bz2 Md5sum Matched
PASS: ./bzip2-tests/pyflate/empty.bz2 Recompress (small)
PASS: ./bzip2-tests/pyflate/empty.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/pyflate/empty.bz2 md5sum Matched Processing ./bzip2-tests/dotnetzip/dancing-color.ps.bz2
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Decompress -: OK
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Recompress
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Redecompress -: OK
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Decompress (small)
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Md5sum Matched
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Recompress (small)
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/dotnetzip/dancing-color.ps.bz2 md5sum Matched Processing ./bzip2-tests/dotnetzip/sample1.bz2
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Decompress
-: OK
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Recompress
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Decompress (small)
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Recompress (small)
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/dotnetzip/sample1.bz2 md5sum Matched Processing ./bzip2-tests/dotnetzip/sample2.bz2
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Decompress
-: OK
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Recompress
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Redecompress
-: OK
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Decompress (small)
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Md5sum Matched
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Recompress (small)
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 Redecompress (small) -: OK
PASS: ./bzip2-tests/dotnetzip/sample2.bz2 md5sum Matched

!!! 6 .bz files did not decompressed/recompressed correctly.

Testing detection of bad input data...

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/go/compress/fail-issue5747.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/go/compress/fail-issue5747.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/overrun.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/overrun.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/crc2.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/crc2.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/crc1.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/crc1.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/overrun2.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/overrun2.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/cve.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/cve.bz2.bad during decompress (small)

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/cve2.bz2.bad during decompress.

bzip2: Data integrity error when decompressing.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/cve2.bz2.bad during decompress (small)
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/void.bz2.bad during decompress.
PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/void.bz2.bad during decompress (small)

Correctly found all bad file data integrity errors.

Bad results, look for !!! in the logs above
- ./bzip2-tests/commons-compress/zip64support.tar.bz2 bad decompress result
- ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2 bad decompress result
- ./bzip2-tests/lbzip2/idx899999.bz2 bad decompress result
- ./bzip2-tests/lbzip2/ch255.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-fb.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-00.bz2 bad decompress result
DURATION: 34
END: /usr/lib/bzip2/ptest
2020-04-13T17:09
STOP: ptest-runner
root@qemux86-64:~#

#3 lore raw
Quoted 3 lines · Rahul Kumar

Hi Randy,

Kindly find the attached bzip2 ptest logs file.

Hi Rahul,

Most or even all of the tests that fail are due to:

  bzip2: No space left on device

For a [de]compression utility ptest suite, it's certainly reasonable to add extra space to the test image:
https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-IMAGE_ROOTFS_EXTRA_SPACE

Make note of what how much extra space is needed in your commit log since we don't have a way for ptests to declare this and for it to be added automatically.

It would also be really nice to see a summary of your ptest result in the long log. For example in my recent update to rsyslog in meta-oe:
   1ec13d7d9 rsyslog: 8.1911.0 -> 8.2002.0
...

    On qemux86-64/kvm the ptest results with extra filesystem space and a timeout of 800 seconds are:
             1911   2002
     TOTAL:   389    408
     PASS:    339    357
     SKIP:     39     39
     XFAIL:     0      0
     FAIL:     11     12
     XPASS:     0      0
     ERROR:     0      0

I probably should have listed the extra space used! oops. :)

Quoted 27 lines

I answered your Question here .
Kindly take a look and feel free to point out if i am wrong at any place and let me know if i missed anything.
==========

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest 

infrastructure

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+Signed-off-by: Rahul Kumar <[email protected] 

<mailto:[email protected]>>

Quoted 2 lines
+---
+ run-tests.sh | 83 

+++++++++++++++++++++++++++++++-----------------------------

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 12 lines

+ 1 file changed, 43 insertions(+), 40 deletions(-)

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it ?

Quoted 7 lines

Ans:
we need to parse the TEST_DIR Path because we are running runtest.sh script outside the bzip2-tests directory. But I figured out a more convenient way for this.
I will parse the TEST_DIR path during running the runscript.sh.

I can implement this by adding below line in makefile.am <http://makefile.am> file. ./bzip2-tests/run-tests.sh --tests-dir="$(PWD)/bzip2-tests"

Ah good.

Quoted 48 lines

In Next version of patch I will implement it.

===========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 36

Quoted 12 lines

+ IGNORE_MD5=0

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi

Explanation:

   if ! type "valgrind" > /dev/null;
   suppose if valgrind is not present in my image at that time it is showing ./bzip2-tests/run-tests.sh: line 43: type: valgrind: not found

   Since we are displaying a message in script that valgrind is used or not.

   So i redirect the output
   BY Modifying this line with "if ! type "valgrind" > /dev/null 2>&1"

==========

Quoted 8 lines

+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then
+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi

Quoted 8 lines

+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"
++  echo "Checking md5 sums: No"
+ fi
+

Quoted 2 lines

Explanation:
I Simply modified valgrind and md5sum messages with Yes/No

I is worth seeing if upstream will accept the change, IMO.

Quoted 11 lines

==========

Quoted 7 lines

+ # Remove any left over tesfilecopies from previous runs first. +@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Quoted 3 lines

Explanation:
Initially for each file It is printing Decompress...
I think which is not required to display in ptest logs so i comment it out.

Does it cause a problem?
We try to minimize our changes so if it's just aesthetic, don't change it.

Quoted 11 lines

==========

Quoted 4 lines

+   if [[ ${IGNORE_MD5} -ne 1 ]]; then

+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";

++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile}

md5sum Matched"; } \

Quoted 3 lines

++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; conti

Quoted 7 lines

Explanation:
for md5sum there is no short form option for --status option. use of --status is "don't output anything, status code shows success"

md5sum -c ${md5file} < ${copy}
so i removed the --status option due to this below line is coming in ptest log -: OK

The discrete md5sum doesn't have a short form of --status and

busybox md5sum only supports '-s'; that's a shame.

I guess we'd need to drop the argument for now but this is another case where perhaps upstream bzip2 will accommodate our desire to run the tests with busybox so it would be nice if you could ask and track the upstream status.

Quoted 35 lines

==========

+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--

Explanation:
if some test failed then script is returning with exit 1 status due to this at the end of ptest below message is printing
make: *** [Makefile:14: runtest] Error 1

logs wil looks like below if script returning with exit 1 status

PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/void.bz2.bad during decompress (small)

Correctly found all bad file data integrity errors.

Bad results, look for !!! in the logs above
 - ./bzip2-tests/commons-compress/zip64support.tar.bz2 bad decompress result
 - ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2 bad decompress result
 - ./bzip2-tests/lbzip2/idx899999.bz2 bad decompress result
 - ./bzip2-tests/lbzip2/ch255.bz2 bad decompress result
 - ./bzip2-tests/pyflate/45MB-fb.bz2 bad decompress result
 - ./bzip2-tests/pyflate/45MB-00.bz2 bad decompress result
make: *** [Makefile:14: runtest] Error 1

ERROR: Exit status is 512
DURATION: 31
END: /usr/lib/bzip2/ptest
2020-04-13T16:05
STOP: ptest-runner
root@qemux86-64:~#

Quoted 3 lines

To avoid "make: *** [Makefile:14: runtest] Error 1" messgae I removed exit 1 line from the script.
May be i am wrong please suggest me i should keep it or remove.

I this it's useful information and as long as when you add additional filesystem space and the test all pass then we don't need to make the failure cases look nice! ;-)

Quoted 23 lines

==========

Quoted 4 lines

             file://configure.ac <http://configure.ac>;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \
+

file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git \

Quoted 4 lines

             "
+
  SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" SRC_URI[sha256sum] =

"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +2 -0
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+

  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"

  PACKAGES =+ "libbz2"

(quoted diff) +0 -0
@@ -39,7 +48,7 @@ do_install_ptest () {
 

  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"

Quoted 10 lines

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ?
If it requires bash, how bad are the scripts and can they be made
POSIX compliant with the help of:
https://www.shellcheck.net/
Ans.
This script is based on array concept and Arrays are not part of the POSIX sh specification. so i think we should go with bash script.

Maybe just add a comment above the RDEPENDS so that if someone wants to get rid of the bash dependency, they know where to start. Ideally upstream would get rid of the bashisms but their run-tests.sh does use: #!/bin/bash so this is fine for now.

Quoted 46 lines

==========

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2/Makefile.am

Quoted 6 lines

index dcf6458..f917b23 100644

meta/recipes-extended/bzip2/bzip2/Makefile.am +0 -0
@@ -46,6 +46,7 @@ runtest:

  else echo "FAIL: sample2 decompress"; fi
  @if cmp sample3.tst sample3.ref; then echo "PASS: sample3

decompress";\

Quoted 12 lines

  else echo "FAIL: sample3 decompress"; fi
+ ./bzip2-tests/run-tests.sh

  install-ptest:
  sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \

meta/recipes-extended/bzip2/bzip2/Makefile.am +0 -0
@@ -56,6 +57,7 @@ install-ptest:

  cp $(srcdir)/sample1.bz2 $(DESTDIR)/
  cp $(srcdir)/sample2.bz2 $(DESTDIR)/
  cp $(srcdir)/sample3.bz2 $(DESTDIR)/
+ cp -rf $(srcdir)/../git $(DESTDIR)/bzip2-tests
  ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2

Review

Quoted 2 lines

  install-exec-hook:

(quoted diff) +0 -0

<http://bzip2_1.0.8.bb> b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb>

meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb> LZ77/LZ78-based compressors, and approaches the

Quoted 4 lines

index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb> +0 -0
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the 

performance of the PPM family of

Quoted 4 lines

  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb>

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb> +1 -1
-
+LIC_FILES_CHKSUM = 

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \

Quoted 2 lines

+  file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \
+

 file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \

Quoted 1 line

+

 file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \

Quoted 1 line

+

Quoted 8 lines

 file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \

What's all this additional license info about? Please explain in when replying as well as in the long log.

Ans:
I don't have much knowledge about the licensing part so I populated all the licenses which are present in the bzip2-tests source code. can you please provide any suggestions on what basis we should take the decision of the license population.

You should use:

LICENSE = "GPLv3+"

since the only code is the run-tests.sh script and that the license given in the script.

The rest of the LICENSE information in the git repo seems to have been copied from the packages where these compressed _data_ files came from. Since we are not compiling any source, we only need to have a LIC_FILES_CHKSUM entry for run-tests.sh. We are simply using the compressed files as data so we can ignore the license info. Ideally the upstream repo would remove the misleading files but IANAL and I don't think it's a problem for us really. It's probably worth explaining this in a sentence or two in your commit log.

Quoted 3 lines

==========

Let me know if I missed anything here.

I think there are a few changes to make for a v2.

Hopefully you will write a commit log that explains the changes that we have agreed to make.  The idea is that someone should be able to read the long log and have a general idea of what the code changes are.

Thanks for working on this ptest addition, it looks like it's heading in the right direction and almost done now.

../Randy

Quoted 427 lines

*Thanks & Regards,*
Rahul Kumar
Software Engineer,Linux Solutions Engineering Group,Montavista Software LLC
Email Id: [email protected] <mailto:[email protected]>
<https://plus.google.com/+CodeTwoSoftware>

On Fri, Apr 3, 2020 at 4:02 AM Randy MacLeod <[email protected] <mailto:[email protected]>> wrote:

    On 2020-04-02 7:10 a.m., Rahul Kumar wrote:
    > [YOCTO #13444]

    Thanks for contributing this work Rahul.

    It would be good if the long log explained the changes made
    in a sentence or two. I've made some comments and asked
    some questions inline below. I may have gone overboard but
    I hope you get the idea that we'd like to see not just the
    changes but the reason for the changes.

    Also, can you present the results of running:
    # ptest-runner bzip2
    on qemux86-64 with kvm enabled in the long log?
    If there are tests that fail or are skipped
    comment on that even it it's to say that you don't know what is wrong.

    >
    > Signed-off-by: Rahul Kumar <[email protected]
    <mailto:[email protected]>>
    > ---
    >   .../bzip2/0001-bzip2-modify-run-tests-script.patch | 220
    +++++++++++++++++++++
    >   meta/recipes-extended/bzip2/bzip2/Makefile.am      |  2 +
    >   meta/recipes-extended/bzip2/bzip2_1.0.8.bb
    <http://bzip2_1.0.8.bb>      |  15 +-
    >   3 files changed, 234 insertions(+), 3 deletions(-)
    >   create mode 100644
    meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch
    >
    > diff --git
    a/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch
    b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch
    > new file mode 100644
    > index 0000000..8ae3c4e
    > --- /dev/null
    > +++
    b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch
    > @@ -0,0 +1,220 @@
    > +From 42e6258485030085285d4b30854bfb94bcf43880 Mon Sep 17
    00:00:00 2001
    > +From: Rahul Kumar <[email protected] <mailto:[email protected]>>
    > +Date: Mon, 30 Mar 2020 12:17:00 +0530
    > +Subject: [PATCH] bzip2: modify run-tests script
    > +
    > +Upstream-Status: Inappropriate [ modify run-tests script for
    ptest infrastructure ]

    It seems that some of the changes are to make the tests less
    verbose and
    to 'tighten-up' the language and formatting used. Upstream might
    accept
    them, have you checked? If you change the status to Pending I think it
    would be better for now because that would force someone check on the
    progress at some point.

    > +
    > +modify run-tests script to write PASS/FAIL as expected by the
    ptest infrastructure
    > +
    > +Signed-off-by: Rahul Kumar <[email protected]
    <mailto:[email protected]>>
    > +---
    > + run-tests.sh | 83
    +++++++++++++++++++++++++++++++-----------------------------
    > + 1 file changed, 43 insertions(+), 40 deletions(-)
    > +
    > +diff --git a/run-tests.sh b/run-tests.sh
    > +index 1ba8c27..1eff62a 100755
    > +--- a/run-tests.sh
    > ++++ b/run-tests.sh
    > +@@ -10,7 +10,7 @@
    > + VALGRIND="valgrind"
    > + VALGRIND_ARGS="-q --error-exitcode=9"
    > + BZIP2="bzip2"
    > +-TESTS_DIR="."
    > ++TESTS_DIR="./bzip2-tests"

    Can you explain why you did this? Maybe upstream would accept it.

    > + IGNORE_MD5=0
    > +
    > + for i in "$@"
    > +@@ -40,21 +40,21 @@ case $i in
    > + esac
    > + done
    > +
    > +-if ! type "valgrind" > /dev/null; then
    > ++if ! type "valgrind" > /dev/null 2>&1; then
    > +   VALGRIND=""
    > +   VALGRIND_ARGS=""
    > + fi
    > +
    > + echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
    > + if [ "$VALGRIND" != "" ]; then
    > +-  echo "  using valgrind"
    > ++  echo "Using valgrind: Yes"
    > + else
    > +-  echo "  NOT using valgrind"
    > ++  echo "Using valgrind: No"
    > + fi
    > + if [[ ${IGNORE_MD5} -eq 0 ]]; then
    > +-  echo "  checking md5 sums"
    > ++  echo "Checking md5 sums: Yes"
    > + else
    > +-  echo "  NOT checking md5 sums"
    > ++  echo "Checking md5 sums: No"
    > + fi
    > +
    > + # Remove any left over tesfilecopies from previous runs first.
    > +@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
    > +   echo "Processing ${bzfile}"
    > +
    > +   # Decompress it.
    > +-  echo "  Decompress..."
    > ++  # echo "  Decompress..."

    Without an explanation in the long log, I can't tell if this
    comment was removed intentionally or perhaps when you were debugging.
    I expect you have a good reason to remove it but an explaination would
    be helpful.

    > +   rm -f "${file}"
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} \
    > +-    || { echo "!!! bad decompress result $?";
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} &&
    { echo "PASS: ${bzfile} Decompress"; } \
    > ++    || { echo "FAIL: ${bzfile} Decompress";
    > +          badtests=("${badtests[@]}" $"${bzfile} bad decompress
    result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +
    > +   if [[ ${IGNORE_MD5} -ne 1 ]]; then
    > +-    md5sum --check --status ${md5file} < ${file} \
    > +-      || { echo "!!! md5sum doesn't match decompressed file";
    > ++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile}
    md5sum Matched"; } \
    > ++      || { echo "FAIL: ${bzfile} md5sum Matched";
    > +            badtests=("${badtests[@]}" $"${file} md5sum doesn't
    match")
    > +            nogood=$[${nogood}+1]; continue; }
    > +   fi
    > +@@ -93,20 +93,20 @@ while IFS= read -r -d '' bzfile; do
    > +   # Compress and decompress a copy
    > +   mv "${file}" "${copy}"
    > +   rm -f "${bzcopy}"
    > +-  echo "  Recompress..."
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
    > +-    || { echo "!!! bad compress result $?";
    > ++  # echo "  Recompress..."
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && {
    echo "PASS: ${bzfile} Recompress "; } \
    > ++    || { echo "FAIL: ${bzfile} Recompress";
    > +          badtests=("${badtests[@]}" $"${copy} bad result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +-  echo "  Redecompress..."
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
    > +-    || { echo "!!! bad (re)decompress result $?";
    > ++  # echo "  Redecompress..."
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} &&
    { echo "PASS: ${bzfile} Redecompress"; } \
    > ++    || { echo "FAIL: ${bzfile} Redecompress";
    > +          badtests=("${badtests[@]}" $"${bzcopy} bad result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +
    > +   if [[ ${IGNORE_MD5} -ne 1 ]]; then
    > +-    md5sum --check --status ${md5file} < ${copy} \
    > +-      || { echo "!!! md5sum doesn't match (re)decompressed file";
    > ++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile}
    md5sum Matched"; } \
    > ++      || { echo "FAIL: ${bzfile} md5sum Matched";
    > +            badtests=("${badtests[@]}" $"${copy} md5sum doesn't
    match")
    > +            nogood=$[${nogood}+1]; continue; }
    > +   fi
    > +@@ -114,16 +114,16 @@ while IFS= read -r -d '' bzfile; do
    > +   rm "${copy}"
    > +
    > +   # Now do it all again in "small" mode.
    > +-  echo "  Decompress (small)..."
    > ++  # echo "  Decompress (small)..."
    > +   rm -f "${file}"
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} \
    > +-    || { echo "!!! bad decompress result $?";
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile}
    &&{ echo "PASS: ${bzfile} Decompress (small)"; } \
    > ++    || { echo "FAIL: ${bzfile} Decompress (small)";
    > +          badtests=("${badtests[@]}" $"${bzfile} bad decompress
    result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +
    > +   if [[ ${IGNORE_MD5} -ne 1 ]]; then
    > +-    md5sum --check --status ${md5file} < ${file} \
    > +-      || { echo "!!! md5sum doesn't match decompressed file";
    > ++    md5sum -c ${md5file} < ${file} > /dev/null 2>&1 && { echo
    "PASS: ${bzfile} Md5sum Matched"; } \
    > ++      || { echo "FAIL: ${bzfile} Md5sum Matched";
    > +            badtests=("${badtests[@]}" $"${file} md5sum doesn't
    match")
    > +            nogood=$[${nogood}+1]; continue; }
    > +   fi
    > +@@ -131,20 +131,20 @@ while IFS= read -r -d '' bzfile; do
    > +   # Compress and decompress a copy
    > +   mv "${file}" "${copy}"
    > +   rm -f "${bzcopy}"
    > +-  echo "  Recompress (small)..."
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
    > +-    || { echo "!!! bad compress result $?";
    > ++  # echo "  Recompress (small)..."
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && {
    echo "PASS: ${bzfile} Recompress (small)"; } \
    > ++    || { echo "FAIL: ${bzfile} Recompress (small)";
    > +          badtests=("${badtests[@]}" $"${copy} bad result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +-  echo "  Redecompress (small)..."
    > +-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
    > +-    || { echo "!!! bad (re)decompress result $?";
    > ++  # echo "  Redecompress (small)..."
    > ++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} &&
    { echo "PASS: ${bzfile} Redecompress (small)"; } \
    > ++    || { echo "FAIL: ${bzfile} Redecompress (small)";
    > +          badtests=("${badtests[@]}" $"${bzcopy} bad result")
    > +          nogood=$[${nogood}+1]; continue; }
    > +
    > +   if [[ ${IGNORE_MD5} -ne 1 ]]; then
    > +-    md5sum --check --status ${md5file} < ${copy} \
    > +-      || { echo "!!! md5sum doesn't match (re)decompressed file";
    > ++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile}
    md5sum Matched"; } \
    > ++      || { echo "FAIL: ${bzfile} md5sum : Miss Matched";
    > +            badtests=("${badtests[@]}" $"${copy} md5sum doesn't
    match")
    > +            nogood=$[${nogood}+1]; continue; }
    > +   fi
    > +@@ -169,14 +169,14 @@ nobad=0
    > + badbad=0
    > + while IFS= read -r -d '' badfile; do
    > +
    > +-  echo "Processing ${badfile}"
    > ++  # echo "Processing ${badfile}"
    > +
    > +-  echo "  Trying to decompress..."
    > ++  # echo "  Trying to decompress..."
    > +   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${badfile}
    > +   ret=$?
    > +
    > +   if [[ ${ret} -eq 0 ]]; then
    > +-    echo "!!! badness not detected"
    > ++    echo "FAIL: badness not detected"
    > +     nobad=$[${nobad}+1]
    > +     badtests=("${badtests[@]}" $"${badfile} badness not detected")
    > +     continue
    > +@@ -185,18 +185,20 @@ while IFS= read -r -d '' badfile; do
    > +   # Assumes "normal" badness is detected by exit code 1 or 2.
    > +   # A crash or valgrind issue will be reported with something
    else.
    > +   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
    > +-    echo "!!! baddness caused baddness in ${BZIP2}"
    > ++    echo "FAIL: baddness caused baddness in ${BZIP2}"
    It's 'badness':
    https://www.merriam-webster.com/thesaurus/badness
    > +     badbad=$[${badbad}+1]
    > +     badtests=("${badtests[@]}" $"${badfile} badness caused
    baddness")
    > +     continue
    > ++  else
    > ++    echo "PASS: Correctly found data integrity errors in
    ${badfile} during decompress."
    > +   fi
    > +
    > +-  echo "  Trying to decompress (small)..."
    > ++  # echo "  Trying to decompress (small)..."
    > +   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${badfile}
    > +   ret=$?
    > +
    > +   if [[ ${ret} -eq 0 ]]; then
    > +-    echo "!!! badness not detected"
    > ++    echo "FAIL: badness not detected "
    > +     nobad=$[${nobad}+1]
    > +     badtests=("${badtests[@]}" $"${badfile} badness not detected")
    > +     continue
    > +@@ -205,10 +207,12 @@ while IFS= read -r -d '' badfile; do
    > +   # Assumes "normal" badness is detected by exit code 1 or 2.
    > +   # A crash or valgrind issue will be reported with something
    else.
    > +   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
    > +-    echo "!!! baddness caused baddness in ${BZIP2}"
    > ++    echo "FAIL: baddness caused baddness in ${BZIP2}"
    > +     badbad=$[${badbad}+1]
    > +     badtests=("${badtests[@]}" $"${badfile} badness caused
    baddness")
    > +     continue
    > ++  else
    > ++    echo "PASS: Correctly found data integrity errors in
    ${badfile} during decompress (small)"
    > +   fi
    > +
    > + done < <(find ${TESTS_DIR} -type f -name \*\.bz2.bad -print0)
    > +@@ -234,5 +238,4 @@ if [[ ${results} -eq 0 ]]; then
    > + else
    > +   echo "Bad results, look for !!! in the logs above"
    > +   printf ' - %s\n' "${badtests[@]}"
    > +-  exit 1
    > + fi
    > +--
    > +2.7.4
    > diff --git a/meta/recipes-extended/bzip2/bzip2/Makefile.am
    b/meta/recipes-extended/bzip2/bzip2/Makefile.am
    > index dcf6458..f917b23 100644
    > --- a/meta/recipes-extended/bzip2/bzip2/Makefile.am
    > +++ b/meta/recipes-extended/bzip2/bzip2/Makefile.am
    > @@ -46,6 +46,7 @@ runtest:
    >       else echo "FAIL: sample2 decompress"; fi
    >       @if cmp sample3.tst sample3.ref; then echo "PASS: sample3
    decompress";\
    >       else echo "FAIL: sample3 decompress"; fi
    > +     ./bzip2-tests/run-tests.sh
    >
    >   install-ptest:
    >       sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
    > @@ -56,6 +57,7 @@ install-ptest:
    >       cp $(srcdir)/sample1.bz2        $(DESTDIR)/
    >       cp $(srcdir)/sample2.bz2        $(DESTDIR)/
    >       cp $(srcdir)/sample3.bz2        $(DESTDIR)/
    > +     cp -rf $(srcdir)/../git  $(DESTDIR)/bzip2-tests
    >       ln -s $(bindir)/bzip2           $(DESTDIR)/bzip2
    >
    >   install-exec-hook:
    > diff --git a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
    <http://bzip2_1.0.8.bb>
    b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb <http://bzip2_1.0.8.bb>
    > index 8e9b779..e8ec5c6 100644
    > --- a/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
    <http://bzip2_1.0.8.bb>
    > +++ b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb
    <http://bzip2_1.0.8.bb>
    > @@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches
    the performance of the PPM family of
    >   HOMEPAGE = "https://sourceware.org/bzip2/"
    >   SECTION = "console/utils"
    >   LICENSE = "bzip2"
    > -LIC_FILES_CHKSUM =
    "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"
    > -
    > +LIC_FILES_CHKSUM =
    "file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664
    \
    > + file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \
    > +
    file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f
    \
    > +
    file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f
    \
    > +
    file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327
    \

    What's all this additional license info about?
    Please explain in when replying as well as in the long log.

    > +                   "
    >   SRC_URI =
    "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz
    <https://sourceware.org/pub/$%7BBPN%7D/$%7BBPN%7D-$%7BPV%7D.tar.gz> \
    > +         
     git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests
    <http://sourceware.org/git/bzip2-tests.git;name=bzip2-tests> \

    Mention how big this repo is in the long log.

    >              file://configure.ac
    <http://configure.ac>;subdir=${BP} \
    >              file://Makefile.am;subdir=${BP} \
    >              file://run-ptest \
    > +
     file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git
    \
    >              "
    > +
    >   SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
    >   SRC_URI[sha256sum] =
    "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
    >
    > +SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
    > +
    >   UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
    >
    >   PACKAGES =+ "libbz2"
    > @@ -39,7 +48,7 @@ do_install_ptest () {
    >
    >   FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
    >
    > -RDEPENDS_${PN}-ptest += "make"
    > +RDEPENDS_${PN}-ptest += "make bash"

    Does it really depend on bash or just a POSIX compliant /bin/sh ?
    If it requires bash, how bad are the scripts and can they be made
    POSIX compliant with the help of:
    https://www.shellcheck.net/

    ../Randy

    >
    >   PROVIDES_append_class-native = " bzip2-replacement-native"
    >   BBCLASSEXTEND = "native nativesdk"
    >
    >
    > 
    >


    -- 
    # Randy MacLeod
    # Wind River Linux
Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#4 lore raw

Hi Randy,

Thanks for your feedback.
As per your suggestion,I am working on that.

currently my patch has Upstream-Status: Inappropriate.

Since I am not aware of the patch submission process on bzip2, I posted a query on bzip2 mailing list (2 days back) but I did not get any response from there.
If they are not responding, in this case shall i keep Upstream-Status:
Inappropriate and send the v2 to oe-core Or should i wait for his response?
Or
Do you have any idea how to submit the patch for bzip2-test repo.

*Thanks & Regards,*
Rahul Kumar
Software Engineer,Linux Solutions Engineering
Group,Montavista Software LLC
Email Id: [email protected]
<https://plus.google.com/+CodeTwoSoftware>

Quoted 774 lines · Randy MacLeod

On 2020-04-13 1:22 p.m., Rahul Kumar wrote:

Hi Randy,

Kindly find the attached bzip2 ptest logs file.

Hi Rahul,

Most or even all of the tests that fail are due to:

bzip2: No space left on device

For a [de]compression utility ptest suite, it's certainly reasonable to add extra space to the test image:

https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-IMAGE_ROOTFS_EXTRA_SPACE

Make note of what how much extra space is needed in your commit log since we don't have a way for ptests to declare this and for it to be added automatically.

It would also be really nice to see a summary of your ptest result in the long log. For example in my recent update to rsyslog in meta-oe:

   1ec13d7d9 rsyslog: 8.1911.0 -> 8.2002.0

...

On qemux86-64/kvm the ptest results with extra filesystem space and a timeout of 800 seconds are:
1911 2002
TOTAL: 389 408
PASS: 339 357
SKIP: 39 39
XFAIL: 0 0
FAIL: 11 12
XPASS: 0 0
ERROR: 0 0

I probably should have listed the extra space used! oops. :)

I answered your Question here .
Kindly take a look and feel free to point out if i am wrong at any place and let me know if i missed anything.
==========

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest

infrastructure

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83

+++++++++++++++++++++++++++++++-----------------------------

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 12 lines

+ 1 file changed, 43 insertions(+), 40 deletions(-)

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it ?

Ans:
we need to parse the TEST_DIR Path because we are running runtest.sh script outside the bzip2-tests directory.
But I figured out a more convenient way for this.
I will parse the TEST_DIR path during running the runscript.sh.

I can implement this by adding below line in makefile.am file. ./bzip2-tests/run-tests.sh --tests-dir="$(PWD)/bzip2-tests"

Ah good.

In Next version of patch I will implement it.

===========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 36

Quoted 12 lines

+ IGNORE_MD5=0

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi

Explanation:

if ! type "valgrind" > /dev/null;
suppose if valgrind is not present in my image at that time it is
showing
./bzip2-tests/run-tests.sh: line 43: type: valgrind: not found

Since we are displaying a message in script that valgrind is used or
not.

So i redirect the output
BY Modifying this line with "if ! type "valgrind" > /dev/null 2>&1"

==========

Quoted 14 lines

+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then

+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"
++  echo "Checking md5 sums: No"
Quoted 2 lines

+ fi
+

Explanation:
I Simply modified valgrind and md5sum messages with Yes/No

I is worth seeing if upstream will accept the change, IMO.

==========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 60

Quoted 7 lines

+ # Remove any left over tesfilecopies from previous runs first. +@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +5 -0
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Explanation:
Initially for each file It is printing Decompress...
I think which is not required to display in ptest logs so i comment it out.

Does it cause a problem?
We try to minimize our changes so if it's just aesthetic, don't change it.

==========

Quoted 4 lines

+ if [[ ${IGNORE_MD5} -ne 1 ]]; then

+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Review

Quoted 3 lines

++ || { echo "FAIL: ${bzfile} md5sum Matched";

(quoted diff) +2 -0
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; conti

Explanation:
for md5sum there is no short form option for --status option. use of --status is "don't output anything, status code shows success"

md5sum -c ${md5file} < ${copy}
so i removed the --status option due to this below line is coming in ptest log
-: OK

The discrete md5sum doesn't have a short form of --status and

busybox md5sum only supports '-s'; that's a shame.

I guess we'd need to drop the argument for now but this is another case where perhaps upstream bzip2 will accommodate our desire to run the tests with busybox so it would be nice if you could ask and track the upstream status.

==========

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +5 -0
+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--

Explanation:
if some test failed then script is returning with exit 1 status due to this at the end of ptest below message is printing
make: *** [Makefile:14: runtest] Error 1

logs wil looks like below if script returning with exit 1 status

PASS: Correctly found data integrity errors in ./bzip2-tests/lbzip2/void.bz2.bad during decompress (small)

Correctly found all bad file data integrity errors.

Bad results, look for !!! in the logs above
- ./bzip2-tests/commons-compress/zip64support.tar.bz2 bad decompress
result
- ./bzip2-tests/go/regexp/re2-exhaustive.txt.bz2 bad decompress result
- ./bzip2-tests/lbzip2/idx899999.bz2 bad decompress result
- ./bzip2-tests/lbzip2/ch255.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-fb.bz2 bad decompress result
- ./bzip2-tests/pyflate/45MB-00.bz2 bad decompress result
make: *** [Makefile:14: runtest] Error 1

ERROR: Exit status is 512
DURATION: 31
END: /usr/lib/bzip2/ptest
2020-04-13T16:05
STOP: ptest-runner
root@qemux86-64:~#

To avoid "make: *** [Makefile:14: runtest] Error 1" messgae I removed exit 1 line from the script.
May be i am wrong please suggest me i should keep it or remove.

I this it's useful information and as long as when you add additional filesystem space and the test all pass then we don't need to make the failure cases look nice! ;-)

==========

Quoted 4 lines
             file://configure.ac;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \

+ file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git

\

Quoted 4 lines
             "

+
SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5" SRC_URI[sha256sum] =

"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +3 -1
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
  PACKAGES =+ "libbz2"
@@ -39,7 +48,7 @@ do_install_ptest () {
 
  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ? If it requires bash, how bad are the scripts and can they be made POSIX compliant with the help of:
https://www.shellcheck.net/
Ans.
This script is based on array concept and Arrays are not part of the POSIX sh specification.
so i think we should go with bash script.

Maybe just add a comment above the RDEPENDS so that if someone wants to get rid of the bash dependency, they know where to start. Ideally upstream would get rid of the bashisms but their run-tests.sh does use: #!/bin/bash so this is fine for now.

==========

Review

Quoted 1 line
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2/Makefile.am

Review

Quoted 20 lines

index dcf6458..f917b23 100644

meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
@@ -46,6 +46,7 @@ runtest:
  else echo "FAIL: sample2 decompress"; fi
  @if cmp sample3.tst sample3.ref; then echo "PASS: sample3 decompress";\
  else echo "FAIL: sample3 decompress"; fi
+ ./bzip2-tests/run-tests.sh
 
  install-ptest:
  sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
  cp $(srcdir)/sample1.bz2 $(DESTDIR)/
  cp $(srcdir)/sample2.bz2 $(DESTDIR)/
  cp $(srcdir)/sample3.bz2 $(DESTDIR)/
+ cp -rf $(srcdir)/../git $(DESTDIR)/bzip2-tests
  ln -s $(bindir)/bzip2 $(DESTDIR)/bzip2
 
  install-exec-hook:
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the

Quoted 4 lines

index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the

performance of the PPM family of

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -1
  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 8

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
-
+LIC_FILES_CHKSUM = "

file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 9

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 10

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 11

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 12

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \

What's all this additional license info about? Please explain in when replying as well as in the long log.

Ans:
I don't have much knowledge about the licensing part so I populated all the licenses which are present in the bzip2-tests source code. can you please provide any suggestions on what basis we should take the decision of the license population.

You should use:

LICENSE = "GPLv3+"

since the only code is the run-tests.sh script and that the license given in the script.

The rest of the LICENSE information in the git repo seems to have been copied from the packages where these compressed _data_ files came from. Since we are not compiling any source, we only need to have a LIC_FILES_CHKSUM entry for run-tests.sh. We are simply using the compressed files as data so we can ignore the license info. Ideally the upstream repo would remove the misleading files but IANAL and I don't think it's a problem for us really. It's probably worth explaining this in a sentence or two in your commit log.

==========

Let me know if I missed anything here.

I think there are a few changes to make for a v2.

Hopefully you will write a commit log that explains the changes that we have agreed to make. The idea is that someone should be able to read the long log and have a general idea of what the code changes are.

Thanks for working on this ptest addition, it looks like it's heading in the right direction and almost done now.

../Randy

*Thanks & Regards,*
Rahul Kumar
Software Engineer,Linux Solutions Engineering
Group,Montavista Software LLC
Email Id: [email protected]
<https://plus.google.com/+CodeTwoSoftware>

Quoted 390 lines · Randy MacLeod
Quoted 1 line · Rahul Kumar

[YOCTO #13444]

Thanks for contributing this work Rahul.

It would be good if the long log explained the changes made in a sentence or two. I've made some comments and asked some questions inline below. I may have gone overboard but I hope you get the idea that we'd like to see not just the changes but the reason for the changes.

Also, can you present the results of running:

# ptest-runner bzip2
on qemux86-64 with kvm enabled in the long log?
If there are tests that fail or are skipped
comment on that even it it's to say that you don't know what is wrong.
Quoted 4 lines
---
  .../bzip2/0001-bzip2-modify-run-tests-script.patch | 220

+++++++++++++++++++++

Quoted 4 lines
  meta/recipes-extended/bzip2/bzip2/Makefile.am      |   2 +
  meta/recipes-extended/bzip2/bzip2_1.0.8.bb         |  15 +-
  3 files changed, 234 insertions(+), 3 deletions(-)

create mode 100644

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 2 lines

diff --git

a/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines

new file mode 100644
index 0000000..8ae3c4e
--- /dev/null
+++

b/meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 6

Quoted 7 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +6 -0
@@ -0,0 +1,220 @@
+From 42e6258485030085285d4b30854bfb94bcf43880 Mon Sep 17 00:00:00 2001
+From: Rahul Kumar <[email protected]>
+Date: Mon, 30 Mar 2020 12:17:00 +0530
+Subject: [PATCH] bzip2: modify run-tests script
+
+Upstream-Status: Inappropriate [ modify run-tests script for ptest

infrastructure ]

It seems that some of the changes are to make the tests less verbose and to 'tighten-up' the language and formatting used. Upstream might accept them, have you checked? If you change the status to Pending I think it would be better for now because that would force someone check on the progress at some point.

Review line 8

Quoted 2 lines
(quoted diff) +2 -0
+
+modify run-tests script to write PASS/FAIL as expected by the ptest

infrastructure

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+
+Signed-off-by: Rahul Kumar <[email protected]>
+---
+ run-tests.sh | 83

+++++++++++++++++++++++++++++++-----------------------------

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 24

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +12 -0
+ 1 file changed, 43 insertions(+), 40 deletions(-)
+
+diff --git a/run-tests.sh b/run-tests.sh
+index 1ba8c27..1eff62a 100755
+--- a/run-tests.sh
++++ b/run-tests.sh
+@@ -10,7 +10,7 @@
+ VALGRIND="valgrind"
+ VALGRIND_ARGS="-q --error-exitcode=9"
+ BZIP2="bzip2"
+-TESTS_DIR="."
++TESTS_DIR="./bzip2-tests"

Can you explain why you did this? Maybe upstream would accept it.

Quoted 26 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +26 -0
+ IGNORE_MD5=0
+
+ for i in "$@"
+@@ -40,21 +40,21 @@ case $i in
+ esac
+ done
+
+-if ! type "valgrind" > /dev/null; then
++if ! type "valgrind" > /dev/null 2>&1; then
+   VALGRIND=""
+   VALGRIND_ARGS=""
+ fi
+
+ echo "Testing ${BZIP2} in directory ${TESTS_DIR}"
+ if [ "$VALGRIND" != "" ]; then
+-  echo "  using valgrind"
++  echo "Using valgrind: Yes"
+ else
+-  echo "  NOT using valgrind"
++  echo "Using valgrind: No"
+ fi
+ if [[ ${IGNORE_MD5} -eq 0 ]]; then
+-  echo "  checking md5 sums"
++  echo "Checking md5 sums: Yes"
+ else
+-  echo "  NOT checking md5 sums"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 60

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++  echo "Checking md5 sums: No"
+ fi
+
+ # Remove any left over tesfilecopies from previous runs first.
+@@ -76,16 +76,16 @@ while IFS= read -r -d '' bzfile; do
+   echo "Processing ${bzfile}"
+
+   # Decompress it.
+-  echo "  Decompress..."
++  # echo "  Decompress..."

Without an explanation in the long log, I can't tell if this comment was removed intentionally or perhaps when you were debugging. I expect you have a good reason to remove it but an explaination would be helpful.

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${bzfile} && { echo

"PASS: ${bzfile} Decompress"; } \

Review line 66

Quoted 2 lines
(quoted diff) +2 -0
++    || { echo "FAIL: ${bzfile} Decompress";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress

result")

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 6 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +6 -0
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 13 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +13 -0
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -93,20 +93,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo

"PASS: ${bzfile} Recompress "; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Recompress";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo

"PASS: ${bzfile} Redecompress"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Redecompress";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +4 -0
++      || { echo "FAIL: ${bzfile} md5sum Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
+@@ -114,16 +114,16 @@ while IFS= read -r -d '' bzfile; do
+   rm "${copy}"
+
+   # Now do it all again in "small" mode.
+-  echo "  Decompress (small)..."
++  # echo "  Decompress (small)..."
+   rm -f "${file}"
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} \
+-    || { echo "!!! bad decompress result $?";
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${bzfile} &&{

echo "PASS: ${bzfile} Decompress (small)"; } \

Review line 117

Quoted 2 lines
(quoted diff) +2 -0
++    || { echo "FAIL: ${bzfile} Decompress (small)";
+          badtests=("${badtests[@]}" $"${bzfile} bad decompress

result")

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 6 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +6 -0
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${file} \
+-      || { echo "!!! md5sum doesn't match decompressed file";
++    md5sum -c ${md5file} < ${file} > /dev/null 2>&1 && { echo "PASS:

${bzfile} Md5sum Matched"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 13 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +13 -0
++      || { echo "FAIL: ${bzfile} Md5sum Matched";
+            badtests=("${badtests[@]}" $"${file} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -131,20 +131,20 @@ while IFS= read -r -d '' bzfile; do
+   # Compress and decompress a copy
+   mv "${file}" "${copy}"
+   rm -f "${bzcopy}"
+-  echo "  Recompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} \
+-    || { echo "!!! bad compress result $?";
++  # echo "  Recompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -z -q -s ${copy} && { echo

"PASS: ${bzfile} Recompress (small)"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Recompress (small)";
+          badtests=("${badtests[@]}" $"${copy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+-  echo "  Redecompress (small)..."
+-  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} \
+-    || { echo "!!! bad (re)decompress result $?";
++  # echo "  Redecompress (small)..."
++  ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -d -q -s ${bzcopy} && { echo

"PASS: ${bzfile} Redecompress (small)"; } \

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 8 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +8 -0
++    || { echo "FAIL: ${bzfile} Redecompress (small)";
+          badtests=("${badtests[@]}" $"${bzcopy} bad result")
+          nogood=$[${nogood}+1]; continue; }
+
+   if [[ ${IGNORE_MD5} -ne 1 ]]; then
+-    md5sum --check --status ${md5file} < ${copy} \
+-      || { echo "!!! md5sum doesn't match (re)decompressed file";
++    md5sum -c ${md5file} < ${copy} && { echo "PASS: ${bzfile} md5sum

Matched"; } \

Quoted 18 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +18 -0
++      || { echo "FAIL: ${bzfile} md5sum : Miss Matched";
+            badtests=("${badtests[@]}" $"${copy} md5sum doesn't match")
+            nogood=$[${nogood}+1]; continue; }
+   fi
+@@ -169,14 +169,14 @@ nobad=0
+ badbad=0
+ while IFS= read -r -d '' badfile; do
+
+-  echo "Processing ${badfile}"
++  # echo "Processing ${badfile}"
+
+-  echo "  Trying to decompress..."
++  # echo "  Trying to decompress..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch line 180

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
++    echo "FAIL: badness not detected"
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -185,18 +185,20 @@ while IFS= read -r -d '' badfile; do
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"

It's 'badness':
https://www.merriam-webster.com/thesaurus/badness

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 5 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +5 -0
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile}

during decompress."

Quoted 14 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +14 -0
+   fi
+
+-  echo "  Trying to decompress (small)..."
++  # echo "  Trying to decompress (small)..."
+   ${VALGRIND} ${VALGRIND_ARGS} ${BZIP2} -k -d -q -s ${badfile}
+   ret=$?
+
+   if [[ ${ret} -eq 0 ]]; then
+-    echo "!!! badness not detected"
++    echo "FAIL: badness not detected "
+     nobad=$[${nobad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness not detected")
+     continue
+@@ -205,10 +207,12 @@ while IFS= read -r -d '' badfile; do

meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch

Quoted 10 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +10 -0
+   # Assumes "normal" badness is detected by exit code 1 or 2.
+   # A crash or valgrind issue will be reported with something else.
+   if [[ ${ret} != 1 ]] && [[ ${ret} != 2 ]]; then
+-    echo "!!! baddness caused baddness in ${BZIP2}"
++    echo "FAIL: baddness caused baddness in ${BZIP2}"
+     badbad=$[${badbad}+1]
+     badtests=("${badtests[@]}" $"${badfile} badness caused baddness")
+     continue
++  else
++    echo "PASS: Correctly found data integrity errors in ${badfile}

during decompress (small)"

Review

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2/0001-bzip2-modify-run-tests-script.patch new file +11 -0
+   fi
+
+ done < <(find ${TESTS_DIR} -type f -name \*\.bz2.bad -print0)
+@@ -234,5 +238,4 @@ if [[ ${results} -eq 0 ]]; then
+ else
+   echo "Bad results, look for !!! in the logs above"
+   printf ' - %s\n' "${badtests[@]}"
+-  exit 1
+ fi
+--
+2.7.4
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2/Makefile.am

meta/recipes-extended/bzip2/bzip2/Makefile.am runtest: · line 47

Quoted 6 lines

index dcf6458..f917b23 100644

meta/recipes-extended/bzip2/bzip2/Makefile.am +0 -0
@@ -46,6 +46,7 @@ runtest:
      else echo "FAIL: sample2 decompress"; fi
      @if cmp sample3.tst sample3.ref; then echo "PASS: sample3

decompress";\

Review

Quoted 14 lines
meta/recipes-extended/bzip2/bzip2/Makefile.am +2 -0
      else echo "FAIL: sample3 decompress"; fi
+     ./bzip2-tests/run-tests.sh
 
  install-ptest:
      sed  -n '/^runtest:/,/^install-ptest:/{/^install-ptest:/!p}' \
@@ -56,6 +57,7 @@ install-ptest:
      cp $(srcdir)/sample1.bz2        $(DESTDIR)/
      cp $(srcdir)/sample2.bz2        $(DESTDIR)/
      cp $(srcdir)/sample3.bz2        $(DESTDIR)/
+     cp -rf $(srcdir)/../git         $(DESTDIR)/bzip2-tests
      ln -s $(bindir)/bzip2           $(DESTDIR)/bzip2
 
  install-exec-hook:
(quoted diff) +0 -0

b/meta/recipes-extended/bzip2/bzip2_1.0.8.bb

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the

Quoted 4 lines

index 8e9b779..e8ec5c6 100644

meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
@@ -5,16 +5,25 @@ LZ77/LZ78-based compressors, and approaches the

performance of the PPM family of

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -1
  HOMEPAGE = "https://sourceware.org/bzip2/"
  SECTION = "console/utils"
  LICENSE = "bzip2"
-LIC_FILES_CHKSUM =

"file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 8

Quoted 2 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -1
-
+LIC_FILES_CHKSUM = "

file://LICENSE;beginline=4;endline=37;md5=600af43c50f1fcb82e32f19b32df4664 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 9

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/go/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707 \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 10

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.txt;md5=9cb56871eed4e748c3bc7e8ff352a54f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 11

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/dotnetzip/License.zlib.txt;md5=cc421ccd22eeb2e5db6b79e6de0a029f \

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the · line 12

Quoted 1 line
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
+

file://../git/commons-compress/LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327 \

What's all this additional license info about? Please explain in when replying as well as in the long log.

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of · line 15

Quoted 3 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +2 -0
+                   "
  SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
+           git://sourceware.org/git/bzip2-tests.git;name=bzip2-tests \

Mention how big this repo is in the long log.

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
             file://configure.ac;subdir=${BP} \
             file://Makefile.am;subdir=${BP} \
             file://run-ptest \
+           file://0001-bzip2-modify-run-tests-script.patch;patchdir=${WORKDIR}/git

\

meta/recipes-extended/bzip2/bzip2_1.0.8.bb LZ77/LZ78-based compressors, and approaches the performance of the PPM family of

Quoted 4 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +1 -0
             "
+
  SRC_URI[md5sum] = "67e051268d0c475ea773822f7500d0e5"
  SRC_URI[sha256sum] =

"ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () { · line 51

Quoted 12 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +3 -1
+SRCREV_bzip2-tests = "8b0198efda1603cf81fa2c7a9bb673dd22ae1661"
+
  UPSTREAM_CHECK_URI = "https://www.sourceware.org/pub/bzip2/"
 
  PACKAGES =+ "libbz2"
@@ -39,7 +48,7 @@ do_install_ptest () {
 
  FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash"

Does it really depend on bash or just a POSIX compliant /bin/sh ? If it requires bash, how bad are the scripts and can they be made POSIX compliant with the help of:
https://www.shellcheck.net/

../Randy

meta/recipes-extended/bzip2/bzip2_1.0.8.bb do_install_ptest () {

Quoted 7 lines
meta/recipes-extended/bzip2/bzip2_1.0.8.bb +0 -0
  PROVIDES_append_class-native = " bzip2-replacement-native"
  BBCLASSEXTEND = "native nativesdk"
 
Quoted 4 lines

--
# Randy MacLeod
# Wind River Linux

--
# Randy MacLeod
# Wind River Linux

#5 lore raw
Quoted 9 lines · Rahul Kumar

Hi Randy,

Thanks for your  feedback.
As per your suggestion,I am working on that.

currently my patch has Upstream-Status: Inappropriate.

Since I am not aware of the patch submission process on bzip2, I posted a query on bzip2 mailing list (2 days back)  but I did not get any response from there. If they are not responding, in this case shall i keep Upstream-Status: Inappropriate and send the v2 to oe-core  Or  should i wait for his response?

It's your call but I'd like to see:
Upstream-Status: Submitted.

as per:
https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations:_Upstream-Status

Submitted [where]
- Submitted to upstream, waiting approval
- Optionally include where it was submitted,
such as the author, mailing list, etc.

Quoted 2 lines

Or
Do you have any idea how to submit the patch for bzip2-test repo.

No, I don't. If there's no answer, ping me here and we'll see if someone can find a connection to the upstream developer(s).

../Randy

Quoted 7 lines

*Thanks & Regards,*
Rahul Kumar
Software Engineer,Linux Solutions Engineering Group,Montavista Software LLC
Email Id: [email protected] <mailto:[email protected]>
<https://plus.google.com/+CodeTwoSoftware>

Signature · 2 lines
# Randy MacLeod
# Wind River Linux