From a5f2aa5618fe9183706c9c514c3067985f6c338b Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 20 Apr 2024 13:12:50 +0300 Subject: [PATCH] Tests: Remove x86 and SPARC BCJ tests These are very old but the exact test file isn't easy to reproduce as it was compiled from a short C program (bcj_test.c) long ago. These tests weren't very good anyway, just a little better than nothing. --- tests/Makefile.am | 7 --- tests/bcj_test.c | 64 ------------------------- tests/compress_prepared_bcj_sparc | Bin 1240 -> 0 bytes tests/compress_prepared_bcj_x86 | Bin 1388 -> 0 bytes tests/files/README | 8 ---- tests/files/good-1-sparc-lzma2.xz | Bin 612 -> 0 bytes tests/files/good-1-x86-lzma2.xz | Bin 716 -> 0 bytes tests/test_compress_prepared_bcj_sparc | 4 -- tests/test_compress_prepared_bcj_x86 | 4 -- 9 files changed, 87 deletions(-) delete mode 100644 tests/bcj_test.c delete mode 100644 tests/compress_prepared_bcj_sparc delete mode 100644 tests/compress_prepared_bcj_x86 delete mode 100644 tests/files/good-1-sparc-lzma2.xz delete mode 100644 tests/files/good-1-x86-lzma2.xz delete mode 100755 tests/test_compress_prepared_bcj_sparc delete mode 100755 tests/test_compress_prepared_bcj_x86 diff --git a/tests/Makefile.am b/tests/Makefile.am index d7f4a418..e6516213 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,16 +8,11 @@ EXTRA_DIST = \ tests.h \ test_files.sh \ test_compress.sh \ - test_compress_prepared_bcj_sparc \ - test_compress_prepared_bcj_x86 \ test_compress_generated_abc \ test_compress_generated_random \ test_compress_generated_text \ test_scripts.sh \ test_suffix.sh \ - bcj_test.c \ - compress_prepared_bcj_sparc \ - compress_prepared_bcj_x86 \ xzgrep_expected_output AM_CPPFLAGS = \ @@ -59,8 +54,6 @@ TESTS = \ test_vli \ test_files.sh \ test_suffix.sh \ - test_compress_prepared_bcj_sparc \ - test_compress_prepared_bcj_x86 \ test_compress_generated_abc \ test_compress_generated_random \ test_compress_generated_text diff --git a/tests/bcj_test.c b/tests/bcj_test.c deleted file mode 100644 index 84abe7b3..00000000 --- a/tests/bcj_test.c +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-License-Identifier: 0BSD - -/////////////////////////////////////////////////////////////////////////////// -// -/// \file bcj_test.c -/// \brief Source code of compress_prepared_bcj_* -/// -/// This is a simple program that should make the compiler to generate -/// PC-relative branches, jumps, and calls. The compiled files can then -/// be used to test the branch conversion filters. Note that this program -/// itself does nothing useful. -/// -/// Compiling: gcc -std=c99 -fPIC -c bcj_test.c -/// Don't optimize or strip. -// -// Author: Lasse Collin -// -/////////////////////////////////////////////////////////////////////////////// - -extern int jump(int a, int b); - - -extern int -call(int a, int b) -{ - if (a < b) - a = jump(a, b); - - return a; -} - - -extern int -jump(int a, int b) -{ - // The loop generates conditional jump backwards. - while (1) { - if (a < b) { - a *= 2; - a += 3 * b; - break; - } else { - // Put enough code here to prevent JMP SHORT on x86. - a += b; - a /= 2; - b += b % 5; - a -= b / 3; - b = 2 * b + a - 1; - a *= b + a + 1; - b += a - 1; - a += b * 2 - a / 5; - } - } - - return a; -} - - -int -main(int argc, char **argv) -{ - int a = call(argc, argc + 1); - return a == 0; -} diff --git a/tests/compress_prepared_bcj_sparc b/tests/compress_prepared_bcj_sparc deleted file mode 100644 index 86ea7ddb11b7505373d86b6fbf17c88e4eb88a30..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1240 zc-oaz&ubGw6n>LUO;9Uqk)n9$2uf0Fw%aCRtp_8Cb`K(g2p$UA%^FC`ZW6MaQcq1c z7muOGfUux{fcOtYa`ECpJbDtmc*vpp55#%9GwHfS!GYO%Kfdqnmp5;7_~6k)k{~c! z1QNk>wxkciQ3#${NU@ya)E&3u8dXr-+JVdbmv-QZXs2cwJY}|QyVi7({QCQ7aFX%M zzcRk|HRYGbDPQZoDU#(Lr16EHS?mjo6}bRUhV(cS;L7i0AV(j+rH_96v(5$NA>M-` zK`zT{tj;3(Y%e0-lfsu>3V>(B;F$FWQogvKFiL@uk% zFj@p7#V}=$2AH7E5cP2_9vn``;cwASV>-cp9J5;Senj;OF8V&N8P|xs;dLOqFM$Sm zG<`3673=LQ(c2LJHyxwNI5nDhmv!j*Ks^24G+JlQn$1)araz+z34)nBFMK&XF0!pL z+U`=AU*>6z`&U`+ZN#TB{*6EUs<~HjYmTd!puA}8!(P{JgK1b6*hZs?BWr`wwYwId zb4V_6`X_*tuuqs;Zj&v5w6NQeIQw1}Lfde*>CzBv z|1A=>dbaS3zBT85&T;z;_gP2CB!WxA>HQ@5#^X7A40vARC$|0y_XQ58V{OiRuW=5? XNteR=pK+6XMsCLbpLVg+@p``jQZVLB diff --git a/tests/compress_prepared_bcj_x86 b/tests/compress_prepared_bcj_x86 deleted file mode 100644 index bcc546f04cbb959fab9ae6d775157c531ded50ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1388 zc-oCr&1(}u6n~SX?ba^#gL$H4EkMi|l`XzWsGj)^H^T!@9snbuv1FF=`NF7CFGb7VXg}qu*6otP^R%qEI75?rs zdshwev@*(hi8M!v%u4VQIr|u~L+`r-t9JR1PtJ~k8Idk3q8!ZABl?4-=AE1lvBphO zGm3rBR|?s1z-N4|HeR0dxjiu|e&^uO18ZQYHLsenUxVJax!w;sqv(IOypoNc7XU&t zGk5(Xp+`#4KZbAN+hAS`6ac4RCG}{GS$(%@*X+}-wuNL=ko>%bRqxQP&csB(9U%XKf z4;;J!2ey58>^{VQ<^Z)~IC)F1c!#dMHtcuQX7iF4@Q~==mO+;EnAsjNFJ42RI6LFj zm}BmOcy2*$Gx^?d`n+wKIrh15hYNSPu;jv>E{xbWrzsP_=k96SsR2(H`zp1B_jzA% ze+vE#vzRqO1cq3AL)Epkj^hxIZf(I|_FoN!=clK_>iq2N0$EfSr>4V1g^f&d2a?hC glvTNhE#GCngFRr?;bX;4q2_%EHSeGDJz&HC4G^0FjQ{`u diff --git a/tests/files/README b/tests/files/README index 15a75b80..584e6ba4 100644 --- a/tests/files/README +++ b/tests/files/README @@ -66,14 +66,6 @@ good-1-delta-lzma2.tiff.xz is an image file that compresses better with Delta+LZMA2 than with plain LZMA2. - good-1-x86-lzma2.xz uses the x86 filter (BCJ) and LZMA2. The - uncompressed file is compress_prepared_bcj_x86 found from the tests - directory. - - good-1-sparc-lzma2.xz uses the SPARC filter and LZMA2. The - uncompressed file is compress_prepared_bcj_sparc found from the tests - directory. - good-1-arm64-lzma2-1.xz uses the ARM64 filter and LZMA2. The uncompressed data is constructed so that it tests integer wrap around and sign extension. To recreate the file, compress diff --git a/tests/files/good-1-sparc-lzma2.xz b/tests/files/good-1-sparc-lzma2.xz deleted file mode 100644 index 4532bc61c1a3fd3ba55726bff542230dbfa3de10..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 612 zc-jGE0-OE)H+ooF000E$*0e?f0SN#h0SEvLs_J*(1lIy0T>w9kMTBTHiU|rqP*<4q zy+h3=>BhIS_~FMS3&JYf15Z3o zyondruX%`tHjHl7JTz)4phYKzLsG9%o=aYyG{OIl!M))O)*(<{6gw$YWhjtxPAz3o zHIOBCw_%E(@Dz19s;+ext0~(y_O8YPIy#dDY=xtaRqzJGH#U&Fo18HLYuujtZ!Y+u z#L8|bd~_cu=z4ZP!;&N+j?)Xm6ZI0#I~o~RmHM4O-WJk$5CIxO5!rjdjx2be%R{g3 zR->*1aJLh)h&) z96V|7(S12}MZ`&3hN6B&xsEv=jiVF|m4Ca`-r&;!q?mn1g4W@U~wYPXwrg_J?F!F1N)NX5XRZ z(1}y(Ml850zHt_lK_F;o3Sl`))VC-%27MTVFn-r;9;VghK){x)ipy@zV|LuklqG;P z!rNYWc5e{wW?h9(9)n_Va&L&6_w!)jpwsjs>F?1ZsDlZc6H}}b>SNBxs5(#a$ynNH y0{I&%5|0loy-2><}$swDcc#Ao{g000001X)@K86SNB diff --git a/tests/files/good-1-x86-lzma2.xz b/tests/files/good-1-x86-lzma2.xz deleted file mode 100644 index 8053917bad7d4f43169312c43713afcd4cf51bec..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 716 zc-jHX0yF*nH+ooF000E$*0e?f0R#Xc0SExnxpd3m1#1F|T>w9kMTBTO-rlH71K2fF zq>*!@eAV{Ae?1%0dPRjv;AqaK52~C5` z#1O&XZ{}_(no)!cXEany3*BG3=({7HK2SR}f@TKWA!=eaD}u!er+XteMni# zlx-j18Iprum`|dPwFOxHhPD{hja?DcjZ5=vHv@)q&`TSIA#l z_133ZPo`QuX|ch8IU8q&UhQ}{21O2q^AW;v0FtC;8ywtk#aO59jBm|Nm#*f%QeK>2 z8r}vY+8zdtc55>RYwV;n{m}Mu%moSC(cT86GWRjbVidoO^VjY-+JxHXiu z>=vy%8-AKCrG$+9vrRt+Q;>aAJ{Zwuu#uCOSA3q+uBmNO*w5&E^2M{9_y1Mz8<1Mz z1HvGOjE?aDdJ0D3a-}E0Z->q|yE{__=Sq6ph)$m3iGgE?@^U#2J8qL_N%2}!6la1&^clV*sX3g*TXb0 zZ&XK)oap%OJ|FS~>!a9Mh2nLH4iws-W?+1p^Kd7ktj3%Q;jf#raGq@^7d%;(AWpmj y-+M9950;Kv`Q?PC0002Y{;&Ts9Ye4H0j34)3IG5I(#}<}#Ao{g000001X)^L%US6F diff --git a/tests/test_compress_prepared_bcj_sparc b/tests/test_compress_prepared_bcj_sparc deleted file mode 100755 index 15d870af..00000000 --- a/tests/test_compress_prepared_bcj_sparc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: 0BSD - -exec "$srcdir/test_compress.sh" compress_prepared_bcj_sparc diff --git a/tests/test_compress_prepared_bcj_x86 b/tests/test_compress_prepared_bcj_x86 deleted file mode 100755 index 8cdd0312..00000000 --- a/tests/test_compress_prepared_bcj_x86 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: 0BSD - -exec "$srcdir/test_compress.sh" compress_prepared_bcj_x86 -- 2.47.3