From 85b5595b67f0081b2a900104ed7589de4bb75e12 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. (cherry picked from commit a5f2aa5618fe9183706c9c514c3067985f6c338b) --- 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 HcmV?d00001 literal 1240 zcma)6&ui0g6n|MdTXd5sV<;XLL0QLamaP@%JXmRUIfw`%co;Nk474L@OOg&ftxGQ+ z%Z>#hpnrh)4|Me6#e;bCBzW=A!}K4h?|t+AmReBu;N|;%ect=@eUlzOeEdk7lVBne z%%MFMkWW~yz@Ax1V@?ZdLFk886|~TK6{7#zW1fimj%)Fh-Sj-C5fb|Ck3sKrH7@^N zjg4>VxI9e9M(15oTJAuG27bZVSBw?WCO=XjGsJqVD}PWxI{NfIbM*7SeJ&D?>LVyh zgvB`q_E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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 HcmV?d00001 literal 716 zcmV;-0yF*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