aboutsummaryrefslogtreecommitdiff
path: root/testsuite (follow)
Commit message (Collapse)AuthorAgeFilesLines
* xxd: allow '-p -c 0' to cause a single line to be outputRon Yorston2026-07-131-0/+8
| | | | | | | | | | | | | | | | Since 2022 the 'xxd' which comes with 'vim' has allowed the combination of options '-p -c 0' as a way to request output on a single line. Details: https://github.com/vim/vim/pull/9524 Add this feature to the BusyBox 'xxd' applet. Adds 64 bytes. (GitHub issue #610) Signed-off-by: Ron Yorston <rmy@pobox.com>
* Merge branch 'busybox' into mergeRon Yorston2026-07-085-8/+101
|\ | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com>
| * join: new appletRon Yorston2026-07-081-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta join_main - 843 +843 printfields - 462 +462 readfields - 442 +442 .rodata 107120 107332 +212 packed_usage 36078 36237 +159 applet_names 2870 2875 +5 applet_main 1652 1656 +4 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 4/0 up/down: 2127/0) Total: 2127 bytes text data bss dec hex filename 1080964 555 4992 1086511 10942f busybox_old 1083091 555 4992 1088638 109c7e busybox_unstripped v2: Add a missing return statement which broke the '-t' option. Thanks to Roberto A. Foglietta for pointing this out. Signed-off-by: Morgan Bartlett <mjmouse9999@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix printf "%o\n", -1Denys Vlasenko2026-07-061-0/+2
| | | | | | | | | | | | | | function old new delta awk_printf 1381 1387 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cmp: add KMG suffix for cmp -n MAXCOUNTAnubhav Kokane2026-07-031-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change input to getopt32 from int to char * so that max_count is parsed as string. Use xatol_sfx to convert string to long. function old new delta cmp_main 595 631 +36 .rodata 107121 107120 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-1) Total: 35 bytes Signed-off-by: Anubhav Kokane <dev.anubhavk@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix printing of very large numbers with printf("%d")Denys Vlasenko2026-07-021-1/+23
| | | | | | | | | | | | | | | | | | | | function old new delta awk_printf 1086 1349 +263 .rodata 107108 107121 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 276/0) Total: 276 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: add '*' as a valid specifier for width and precision in printfDenys Vlasenko2026-07-011-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch by Anubhav Kokane <dev.anubhavk@gmail.com> function old new delta awk_printf 640 1086 +446 .rodata 107131 107108 -23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 446/-23) Total: 423 bytes text data bss dec hex filename 1080210 555 4992 1085757 10913d busybox_old 1080633 555 4992 1086180 1092e4 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testing stripts: allow to skip "awk gsub erroneous word start match" testDenys Vlasenko2026-05-141-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio.tests: fix false positiveDenys Vlasenko2026-04-301-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio.tests: do not use "ls" to detect that file does not existDenys Vlasenko2026-04-301-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: unicode fixDenys Vlasenko2026-04-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio.tests: fix false positive when -o support is not enabledDenys Vlasenko2026-04-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cpio: fix a bug (wrong free() address) in !FEATURE_TAR_LONG_OPTIONS configDenys Vlasenko2026-04-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon.tests: fix false positive if longopts are not enabledDenys Vlasenko2026-04-291-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * paste: fix output when file lengths differRon Yorston2026-03-052-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the files being pasted had different numbers of lines the output was incorrect. Rewrite the loop over all lines to allow for this. Add tests for such conditions. function old new delta paste_main 458 526 +68 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | join: re-add accidentally removed returnmbartlett212026-07-061-0/+6
| | | | | | | | It broke single-character splitting
* | join: changesmbartlett212026-07-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | Fix combinatorial field_split() now takes in LINE as a parameter, rather than just the fields parameter. Saves 16 bytes. Signed-off-by: Ron Yorston <rmy@pobox.com>
* | testsuite: skip tests for handling of non-printable charactersRon Yorston2026-05-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | Among the tests for 'ls' there are some for how it displays a filename containing non-printable characters. These fail on Windows because most of the characters used aren't allowed in filenames there. This can cause the test process to hang. Skip these tests on Windows. (GitHub commit #592)
* | patch: improved handling of files with no final newlineRon Yorston2026-04-161-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 2275a53f0 (patch: handle files with no final newline) was incomplete. It only detected a line with no newline in the first section of a hunk. Add the code necessary to detect the '\ No newline at end of file' warning in the second section. Also add some tests. Adds 48-80 bytes. (GitHub issue #575)
* | join: add some more testsRon Yorston2026-01-231-0/+30
| | | | | | | | | | One more from the POSIX documentation and some examples from coreutils.
* | Merge branch 'busybox' into mergeRon Yorston2026-01-224-9/+81
|\|
| * md5/sha1sum: Honor the -b flag in the outputMartin Storsjö2026-01-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of md5sum/sha1sum contains a character to indicate what mode was used to read the file - '*' for binary, and ' ' for text or where binary is insignificant. This flag character makes a difference for the ffmpeg testsuite. This testsuite contains a number of reference files (e.g. [1]), containing the expected md5sum output for those files, which is checked verbatim. By making busybox's md5sum honor this flag in the output, ffmpeg's testsuite can run successfully on top of busybox. The flag is only partially implemented; in coreutils md5sum, a later "-t" option overrides an earlier "-b" option. Here, just check if a "-b" option was specified or not. Neither flag affects how the files actually are read. [1] https://code.ffmpeg.org/FFmpeg/FFmpeg/src/commit/894da5ca7d742e4429ffb2af534fcda0103ef593/tests/ref/acodec/flac Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cmp: fix -n causing all diffs to be output, implement size suffixes for SKIPDenys Vlasenko2026-01-182-9/+54
| | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 35802 35828 +26 cmp_main 616 595 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 26/-21) Total: 5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * xxd: fix -pANYTHING handling (-pc50 does not mean -p -c50)Denys Vlasenko2025-11-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | function old new delta packed_usage 35768 35802 +34 xxd_main 1447 1449 +2 .rodata 106438 106439 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 37/0) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | md5/sha1sum: Honor the -b flag in the outputMartin Storsjö2026-01-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of md5sum/sha1sum contains a character to indicate what mode was used to read the file - '*' for binary, and ' ' for text or where binary is insignificant. This flag character makes a difference for the ffmpeg testsuite. This testsuite contains a number of reference files (e.g. [1]), containing the expected md5sum output for those files, which is checked verbatim. By making busybox's md5sum honor this flag in the output, ffmpeg's testsuite can run successfully on top of busybox. The flag is only partially implemented; in coreutils md5sum, a later "-t" option overrides an earlier "-b" option. Here, just check if a "-b" option was specified or not. Neither flag affects how the files actually are read. [1] https://code.ffmpeg.org/FFmpeg/FFmpeg/src/commit/894da5ca7d742e4429ffb2af534fcda0103ef593/tests/ref/acodec/flac Signed-off-by: Martin Storsjö <martin@martin.st>
* | join: minor adjustmentsRon Yorston2026-01-021-0/+15
| | | | | | | | | | | | | | | | - Update the size estimate to follow upstream's methodology - Disable the applet by default until it's accepted upstream - Add a minimal test script, stealing an example from POSIX
* | make: fix expansion of immediate-mode macrosRon Yorston2025-11-281-0/+18
| | | | | | | | | | | | | | | | | | Immediate-mode macros shouldn't be recursively expanded, but are subject to suffix and pattern substitution. Adds 16 bytes to the 32-bit build. (pdpmake GitHub issue 77)
* | paste: fix output when file lengths differRon Yorston2025-11-102-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | If the files being pasted had different numbers of lines the output was incorrect. Rewrite the loop over all lines to allow for this. Add tests for such conditions. Adds 64-80 bytes. (GitHub issue #542)
* | tr: an escaped dash doesn't indicate a rangeRon Yorston2025-08-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Upstream commit d683c5c2f1 (tr: support octal ranges) broke the previous behaviour that an escaped dash doesn't indicate a range: '[p\-r]' should match 'p', '-' or 'r', not 'p', 'q' or 'r'. Add a special case to handle this. Adds 16 bytes. (GitHub issue #515)
* | Merge branch 'busybox' into mergeRon Yorston2025-08-155-6/+46
|\|
| * ls: fix -Q to match GNUDenys Vlasenko2025-08-012-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_name 137 229 +92 display_files 375 402 +27 c_escape_conv_str00 - 24 +24 display 1476 1485 +9 conv_str 33 - -33 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 3/0 up/down: 152/-33) Total: 119 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha3sum: add -aBITS testsDenys Vlasenko2025-07-302-4/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sha384sum: new appletAndy Knowles2025-07-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta sha512384_end - 198 +198 packed_usage 35021 35134 +113 init384 - 80 +80 sha384_begin - 19 +19 sha384_end - 10 +10 applet_names 2823 2833 +10 md5_sha1_sum_main 501 507 +6 sha3_end 54 59 +5 applet_main 1628 1632 +4 show_usage_if_dash_dash_help 79 72 -7 hash_file 358 344 -14 sha512_end 197 10 -187 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 5/3 up/down: 445/-208) Total: 237 bytes Signed-off-by: Andy Knowles <aknowles@galleonec.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2025-08-121-13/+85
|\|
| * libbb/yescrypt: actually, largest allowed salt is 86 chars, support thatDenys Vlasenko2025-07-171-3/+7
| | | | | | | | | | | | | | function old new delta yescrypt_r 767 756 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * cryptpw: -m sha512crypt must also be acceptedDenys Vlasenko2025-07-071-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: fix salts ending in dots (corresponding to binary zeros)Denys Vlasenko2025-07-071-0/+20
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: accept longer salts (up to 84 chars)Denys Vlasenko2025-07-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta cryptpw_main 214 223 +9 chpasswd_main 347 356 +9 passwd_main 931 934 +3 yescrypt_r 1084 1056 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 21/-28) Total: -7 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/yescrypt: make it possible to set constant parameters, and set YESCRYPT_RWDenys Vlasenko2025-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | function old new delta yescrypt_kdf32_body 1052 1420 +368 yescrypt_r 1133 1084 -49 static.smix 762 - -762 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 368/-811) Total: -443 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add yescrypt password hashing supportDenys Vlasenko2025-07-061-13/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to work, but not at all optimized for size. The extra copy of sha256 code need to be removed. The yescrypt code in libbb/yescrypt/* is adapted from libxcrypt-4.4.38 with minimal edits, hopefully making it easier to track backports by resetting the tree to this commit, then comparing changes in upstream libxcrypt to the tree. function old new delta blockmix_xor_save - 7050 +7050 static.blockmix_xor - 6475 +6475 blockmix - 3390 +3390 SHA256_Transform - 3083 +3083 yescrypt_kdf_body - 1724 +1724 PBKDF2_SHA256 - 1003 +1003 smix1 - 960 +960 yescrypt_r - 890 +890 salsa20 - 804 +804 smix - 790 +790 smix2 - 659 +659 blockmix_salsa8_xor - 601 +601 yescrypt_kdf - 479 +479 blockmix_salsa8 - 415 +415 Krnd - 256 +256 _HMAC_SHA256_Init - 213 +213 _SHA256_Update - 198 +198 _SHA256_Final - 195 +195 decode64_uint32 - 166 +166 encode64 - 153 +153 decode64 - 136 +136 libcperciva_HMAC_SHA256_Buf - 132 +132 SHA256_Pad_Almost - 131 +131 salsa20_simd_unshuffle - 101 +101 salsa20_simd_shuffle - 101 +101 yes_crypt - 90 +90 libcperciva_SHA256_Buf - 86 +86 crypt_make_rand64encoded - 85 +85 static.atoi64_partial - 77 +77 alloc_region - 72 +72 ascii64 - 65 +65 PAD - 64 +64 _HMAC_SHA256_Final - 55 +55 static.cpu_to_be32_vect - 51 +51 free_region - 47 +47 libcperciva_SHA256_Init - 37 +37 yescrypt_init_local - 34 +34 crypt_make_pw_salt 92 125 +33 initial_state - 32 +32 .rodata 105771 105803 +32 atoi64 - 25 +25 explicit_bzero - 22 +22 pw_encrypt 920 941 +21 yescrypt_free_local - 9 +9 crypt_make_salt 85 - -85 ------------------------------------------------------------------------------ (add/remove: 43/1 grow/shrink: 3/0 up/down: 31042/-85) Total: 30957 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2025-08-102-23/+81
|\|
| * hexdump: add tests for %x, handle little/big endian properlyRadoslav Kolev2025-07-011-22/+69
| | | | | | | | | | Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * od: make -B test little endian only, add variant for big endianRadoslav Kolev2025-07-011-1/+12
| | | | | | | | | | Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | testsuite: check that wget handles httpsRon Yorston2025-07-111-0/+4
| | | | | | | | | | | | We failed to notice a problem with the native Windows crypto support for TLS because there was no test. Add a test case, using wget to fetch an https URL.
* | Merge branch 'busybox' into mergeRon Yorston2025-05-191-0/+23
|\|
| * archival: disallow path traversals (CVE-2023-39810)Denys Vlasenko2025-04-161-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create new configure option for archival/libarchive based extractions to disallow path traversals. As this is a paranoid option and might introduce backward incompatibility, default it to no. Fixes: CVE-2023-39810 Based on the patch by Peter Kaestle <peter.kaestle@nokia.com> function old new delta data_extract_all 921 945 +24 strip_unsafe_prefix 101 102 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 25/0) Total: 25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | make: fix single-suffix inference rule regressionRon Yorston2025-01-211-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Commit 85bbce87d (make: support GNU/BSD suffixes and inference rules) added code to handle inference rules with arbitrary suffixes. Unfortunately it failed to check for a single-suffix rule in the case where no known suffix was found. Add the necessary code and a test which would have caught the problem. Adds 48 bytes. (pdpmake GitHub issue 72)
* | make: support GNU/BSD suffixes and inference rulesRon Yorston2025-01-141-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The specification of inference rules in POSIX implies that only suffixes starting with a period and containing no other periods are to be considered. In contrast, both GNU and BSD make allow suffixes to contain an arbitrary number of periods, or none at all. Allow this as an extension. Adds 640-816 bytes. (pdpmake GitHub issue 70)
* | Merge branch 'busybox' into mergeRon Yorston2024-12-302-12/+134
|\|
| * cut: fix up -D/-s behavior with -FDenys Vlasenko2024-12-201-2/+33
| | | | | | | | | | | | | | | | | | | | function old new delta cut_main 1388 1402 +14 packed_usage 34934 34933 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-1) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>