| 1 |
Test cases for lbzip2. -*- outline -*- |
| 2 |
|
| 3 |
|
| 4 |
* Compressor tests |
| 5 |
|
| 6 |
** fib |
| 7 |
|
| 8 |
Check how compressor copes with a Fibonacci word on input. I think that |
| 9 |
Fibonacci word is the worst case for some BWT implementations. |
| 10 |
|
| 11 |
** repet |
| 12 |
|
| 13 |
Check how compressor handles very repetitive data (a sequence of alternating |
| 14 |
two different characters). This seems to be the worst case for some bzip2 |
| 15 |
implementations (like ant). |
| 16 |
|
| 17 |
|
| 18 |
* Decompressor tests |
| 19 |
|
| 20 |
** 32767 |
| 21 |
|
| 22 |
Test if decompressor supports blocks with more than 18001 selectors |
| 23 |
(in particular 32767 selectors). Some implementations (p7zip, ant) |
| 24 |
choke on this. |
| 25 |
|
| 26 |
** ch255 |
| 27 |
|
| 28 |
Test how decompressor copes with a `zip bomb'. |
| 29 |
|
| 30 |
** codelen20 |
| 31 |
|
| 32 |
Check if decompressor correctly handles 20-bit prefix codes. |
| 33 |
|
| 34 |
** concat |
| 35 |
|
| 36 |
Check whether decompressor supports concatenated bzip2 streams. Some |
| 37 |
implementations don't support that (including older versions of the |
| 38 |
original bzip2). |
| 39 |
|
| 40 |
** crc1 |
| 41 |
|
| 42 |
Determine whether decompressor checks block CRCs. Some old versions |
| 43 |
of yambi didn't check them. |
| 44 |
|
| 45 |
** crc2 |
| 46 |
|
| 47 |
Determine whether decompressor checks stream CRCs. Pre-2.0 versions |
| 48 |
of lbzip2 don't check stream CRC. |
| 49 |
|
| 50 |
** cve |
| 51 |
|
| 52 |
Test if decompressor is vulnerable to CVE-2010-0405 (integer overflow |
| 53 |
in BZ2_decompress). Most decompressors based on bzip2-1.0.5 or earlier |
| 54 |
are vulnerable. |
| 55 |
|
| 56 |
** empty |
| 57 |
|
| 58 |
Check if decompressor supports empty compressed files. |
| 59 |
|
| 60 |
** gap |
| 61 |
|
| 62 |
Check if decompressor allows a gap consisting of garbage bytes between |
| 63 |
bzip2 streams. Pre-2.0 lbzip2 allows that. |
| 64 |
|
| 65 |
** incomp-[12] |
| 66 |
|
| 67 |
Check if cyclic, non-randomized files are supported. See comments in |
| 68 |
`incomp' file for more infomation. |
| 69 |
|
| 70 |
** overrun |
| 71 |
|
| 72 |
Check if decompressor correctly rejects blocks that overrun maximal block |
| 73 |
size declared in bzip2 header. Pre-2.0 lbzip2 bounded block sizes on a flat |
| 74 |
value of 900000, ignoring the information in stream header. |
| 75 |
|
| 76 |
** rand |
| 77 |
|
| 78 |
Check if decompressor supports randomized blocks. Old yambi versions lacked |
| 79 |
that. Some implementations (eg. busybox) don't seem to care about |
| 80 |
randomized blocks at all. |
| 81 |
|
| 82 |
** trash |
| 83 |
|
| 84 |
Check if decompressor ignores trailing garbage after bzip2 stream. |
| 85 |
|
| 86 |
** void |
| 87 |
|
| 88 |
Check if decompressor treats empty bz2 files as empty streams. |