aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-04-09 08:50:34 +0100
committerRon Yorston <rmy@pobox.com>2018-04-09 08:50:34 +0100
commit921c1ab66bad54d4ad8591bb74e41ac985248496 (patch)
tree552a04c691e78e78570e4ec2c83fbc0e59953924 /testsuite
parent5b6f06f5eb8628955262508d153627fe6f2d1c8b (diff)
parenta1870f4807a75663a085c9f5e92870fa7554f0ad (diff)
downloadbusybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.tar.gz
busybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.tar.bz2
busybox-w32-921c1ab66bad54d4ad8591bb74e41ac985248496.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bunzip2.tests16
-rw-r--r--testsuite/bz2_issue_11.bz2bin0 -> 12000 bytes
-rw-r--r--testsuite/bz2_issue_12.bz2bin0 -> 11000 bytes
-rwxr-xr-xtestsuite/unlzma.tests21
-rw-r--r--testsuite/unlzma_issue_1.lzmabin0 -> 171 bytes
-rw-r--r--testsuite/unlzma_issue_2.lzmabin0 -> 261 bytes
6 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/bunzip2.tests b/testsuite/bunzip2.tests
index fcfce1a31..edb332748 100755
--- a/testsuite/bunzip2.tests
+++ b/testsuite/bunzip2.tests
@@ -552,6 +552,22 @@ if test "${0##*/}" = "bunzip2.tests"; then
552 echo "FAIL: $unpack: pbzip_4m_zeros file" 552 echo "FAIL: $unpack: pbzip_4m_zeros file"
553 FAILCOUNT=$((FAILCOUNT + 1)) 553 FAILCOUNT=$((FAILCOUNT + 1))
554 fi 554 fi
555
556 errout="`${bb}bunzip2 <bz2_issue_11.bz2 2>&1 >/dev/null`"
557 if test x"$errout:$?" = x"bunzip2: bunzip error -5:1"; then
558 echo "PASS: $unpack: bz2_issue_11.bz2 corrupted example"
559 else
560 echo "FAIL: $unpack: bz2_issue_11.bz2 corrupted example"
561 FAILCOUNT=$((FAILCOUNT + 1))
562 fi
563
564 errout="`${bb}bunzip2 <bz2_issue_12.bz2 2>&1 >/dev/null`"
565 if test x"$errout:$?" = x"bunzip2: bunzip error -3:1"; then
566 echo "PASS: $unpack: bz2_issue_12.bz2 corrupted example"
567 else
568 echo "FAIL: $unpack: bz2_issue_12.bz2 corrupted example"
569 FAILCOUNT=$((FAILCOUNT + 1))
570 fi
555fi 571fi
556 572
557exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255)) 573exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
diff --git a/testsuite/bz2_issue_11.bz2 b/testsuite/bz2_issue_11.bz2
new file mode 100644
index 000000000..62b252046
--- /dev/null
+++ b/testsuite/bz2_issue_11.bz2
Binary files differ
diff --git a/testsuite/bz2_issue_12.bz2 b/testsuite/bz2_issue_12.bz2
new file mode 100644
index 000000000..4215f08d6
--- /dev/null
+++ b/testsuite/bz2_issue_12.bz2
Binary files differ
diff --git a/testsuite/unlzma.tests b/testsuite/unlzma.tests
new file mode 100755
index 000000000..0e98afe09
--- /dev/null
+++ b/testsuite/unlzma.tests
@@ -0,0 +1,21 @@
1#!/bin/sh
2
3. ./testing.sh
4
5# testing "test name" "commands" "expected result" "file input" "stdin"
6# file input will be file called "input"
7# test can create a file "actual" instead of writing to stdout
8
9# Damaged encrypted streams
10testing "unlzma (bad archive 1)" \
11 "unlzma <unlzma_issue_1.lzma >/dev/null; echo \$?" \
12"1
13" "" ""
14
15# Damaged encrypted streams
16testing "unlzma (bad archive 2)" \
17 "unlzma <unlzma_issue_2.lzma >/dev/null; echo \$?" \
18"1
19" "" ""
20
21exit $FAILCOUNT
diff --git a/testsuite/unlzma_issue_1.lzma b/testsuite/unlzma_issue_1.lzma
new file mode 100644
index 000000000..fb70104ba
--- /dev/null
+++ b/testsuite/unlzma_issue_1.lzma
Binary files differ
diff --git a/testsuite/unlzma_issue_2.lzma b/testsuite/unlzma_issue_2.lzma
new file mode 100644
index 000000000..853f0fc29
--- /dev/null
+++ b/testsuite/unlzma_issue_2.lzma
Binary files differ