commit: 55c740b9af4de8917dd94b94c411a7721cf2946d parent f28d94bc45c365bcece0f7e44e47f6f9f4fa9f13 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Sun, 30 Jan 2022 15:24:22 +0100 test-bin/strings: Add tests for `-t format` optionDiffstat:
A | test-bin/outputs/strings/all_bytes_td | 1 | + |
A | test-bin/outputs/strings/all_bytes_to | 1 | + |
A | test-bin/outputs/strings/all_bytes_tx | 1 | + |
A | test-bin/outputs/strings/true_8_td | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | test-bin/outputs/strings/true_8_to | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | test-bin/outputs/strings/true_8_tx | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | test-bin/outputs/strings/true_td | 91 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | test-bin/outputs/strings/true_to | 91 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | test-bin/outputs/strings/true_tx | 91 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | test-bin/strings | 28 | ++++++++++++++++++++++++++++ |
10 files changed, 499 insertions(+), 0 deletions(-)
diff --git a/test-bin/outputs/strings/all_bytes_td b/test-bin/outputs/strings/all_bytes_td @@ -0,0 +1 @@ +32 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/test-bin/outputs/strings/all_bytes_to b/test-bin/outputs/strings/all_bytes_to @@ -0,0 +1 @@ +40 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/test-bin/outputs/strings/all_bytes_tx b/test-bin/outputs/strings/all_bytes_tx @@ -0,0 +1 @@ +20 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/test-bin/outputs/strings/true_8_td b/test-bin/outputs/strings/true_8_td @@ -0,0 +1,65 @@ +680 /lib64/ld-linux-x86-64.so.2 +929 __cxa_finalize +944 __libc_start_main +962 libc.so.6 +972 GLIBC_2.2.5 +984 _ITM_deregisterTMCloneTable +1012 __gmon_start__ +1027 _ITM_registerTMCloneTable +4553 []A\A]A^A_ +12304 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +12347 GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +13435 /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +13484 elf-init.c +13498 stddef.h +13655 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +13720 long long int +13734 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +14905 __init_array_start +14924 /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +14989 elf-init.c +15000 long unsigned int +15018 __libc_csu_fini +15049 __libc_csu_init +15070 long double +15082 __init_array_end +15473 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +16232 elf-init.c +16243 __init_array_end +16260 _DYNAMIC +16269 __init_array_start +16288 __GNU_EH_FRAME_HDR +16307 _GLOBAL_OFFSET_TABLE_ +16329 __libc_csu_fini +16345 _ITM_deregisterTMCloneTable +16380 __libc_start_main@GLIBC_2.2.5 +16410 __data_start +16423 __gmon_start__ +16438 __dso_handle +16451 _IO_stdin_used +16466 __libc_csu_init +16482 __bss_start +16499 __TMC_END__ +16511 _ITM_registerTMCloneTable +16537 __cxa_finalize@GLIBC_2.2.5 +16581 .shstrtab +16599 .note.ABI-tag +16613 .gnu.hash +16639 .gnu.version +16652 .gnu.version_r +16667 .rela.dyn +16688 .plt.got +16717 .eh_frame_hdr +16731 .eh_frame +16741 .init_array +16753 .fini_array +16765 .dynamic +16785 .comment +16794 .debug_aranges +16809 .debug_info +16821 .debug_abbrev +16835 .debug_line +16847 .debug_str +16858 .debug_loc +16869 .debug_line_str +16885 .debug_rnglists diff --git a/test-bin/outputs/strings/true_8_to b/test-bin/outputs/strings/true_8_to @@ -0,0 +1,65 @@ +1250 /lib64/ld-linux-x86-64.so.2 +1641 __cxa_finalize +1660 __libc_start_main +1702 libc.so.6 +1714 GLIBC_2.2.5 +1730 _ITM_deregisterTMCloneTable +1764 __gmon_start__ +2003 _ITM_registerTMCloneTable +10711 []A\A]A^A_ +30020 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +30073 GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +32173 /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +32254 elf-init.c +32272 stddef.h +32527 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +32630 long long int +32646 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +35071 __init_array_start +35114 /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +35215 elf-init.c +35230 long unsigned int +35252 __libc_csu_fini +35311 __libc_csu_init +35336 long double +35352 __init_array_end +36161 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +37550 elf-init.c +37563 __init_array_end +37604 _DYNAMIC +37615 __init_array_start +37640 __GNU_EH_FRAME_HDR +37663 _GLOBAL_OFFSET_TABLE_ +37711 __libc_csu_fini +37731 _ITM_deregisterTMCloneTable +37774 __libc_start_main@GLIBC_2.2.5 +40032 __data_start +40047 __gmon_start__ +40066 __dso_handle +40103 _IO_stdin_used +40122 __libc_csu_init +40142 __bss_start +40163 __TMC_END__ +40177 _ITM_registerTMCloneTable +40231 __cxa_finalize@GLIBC_2.2.5 +40305 .shstrtab +40327 .note.ABI-tag +40345 .gnu.hash +40377 .gnu.version +40414 .gnu.version_r +40433 .rela.dyn +40460 .plt.got +40515 .eh_frame_hdr +40533 .eh_frame +40545 .init_array +40561 .fini_array +40575 .dynamic +40621 .comment +40632 .debug_aranges +40651 .debug_info +40665 .debug_abbrev +40703 .debug_line +40717 .debug_str +40732 .debug_loc +40745 .debug_line_str +40765 .debug_rnglists diff --git a/test-bin/outputs/strings/true_8_tx b/test-bin/outputs/strings/true_8_tx @@ -0,0 +1,65 @@ +2a8 /lib64/ld-linux-x86-64.so.2 +3a1 __cxa_finalize +3b0 __libc_start_main +3c2 libc.so.6 +3cc GLIBC_2.2.5 +3d8 _ITM_deregisterTMCloneTable +3f4 __gmon_start__ +403 _ITM_registerTMCloneTable +11c9 []A\A]A^A_ +3010 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +303b GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +347b /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +34ac elf-init.c +34ba stddef.h +3557 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +3598 long long int +35a6 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +3a39 __init_array_start +3a4c /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +3a8d elf-init.c +3a98 long unsigned int +3aaa __libc_csu_fini +3ac9 __libc_csu_init +3ade long double +3aea __init_array_end +3c71 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +3f68 elf-init.c +3f73 __init_array_end +3f84 _DYNAMIC +3f8d __init_array_start +3fa0 __GNU_EH_FRAME_HDR +3fb3 _GLOBAL_OFFSET_TABLE_ +3fc9 __libc_csu_fini +3fd9 _ITM_deregisterTMCloneTable +3ffc __libc_start_main@GLIBC_2.2.5 +401a __data_start +4027 __gmon_start__ +4036 __dso_handle +4043 _IO_stdin_used +4052 __libc_csu_init +4062 __bss_start +4073 __TMC_END__ +407f _ITM_registerTMCloneTable +4099 __cxa_finalize@GLIBC_2.2.5 +40c5 .shstrtab +40d7 .note.ABI-tag +40e5 .gnu.hash +40ff .gnu.version +410c .gnu.version_r +411b .rela.dyn +4130 .plt.got +414d .eh_frame_hdr +415b .eh_frame +4165 .init_array +4171 .fini_array +417d .dynamic +4191 .comment +419a .debug_aranges +41a9 .debug_info +41b5 .debug_abbrev +41c3 .debug_line +41cf .debug_str +41da .debug_loc +41e5 .debug_line_str +41f5 .debug_rnglists diff --git a/test-bin/outputs/strings/true_td b/test-bin/outputs/strings/true_td @@ -0,0 +1,91 @@ +680 /lib64/ld-linux-x86-64.so.2 +929 __cxa_finalize +944 __libc_start_main +962 libc.so.6 +972 GLIBC_2.2.5 +984 _ITM_deregisterTMCloneTable +1012 __gmon_start__ +1027 _ITM_registerTMCloneTable +4478 AUATI +4553 []A\A]A^A_ +8359 ;*3$" +12304 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +12347 GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +13435 /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +13484 elf-init.c +13498 stddef.h +13640 f.... +13655 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +13715 main +13720 long long int +13734 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +14898 size_t +14905 __init_array_start +14924 /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +14984 envp +14989 elf-init.c +15000 long unsigned int +15018 __libc_csu_fini +15034 char +15039 argc +15044 size +15049 __libc_csu_init +15065 argv +15070 long double +15082 __init_array_end +15466 true.c +15473 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +16225 true.c +16232 elf-init.c +16243 __init_array_end +16260 _DYNAMIC +16269 __init_array_start +16288 __GNU_EH_FRAME_HDR +16307 _GLOBAL_OFFSET_TABLE_ +16329 __libc_csu_fini +16345 _ITM_deregisterTMCloneTable +16373 _edata +16380 __libc_start_main@GLIBC_2.2.5 +16410 __data_start +16423 __gmon_start__ +16438 __dso_handle +16451 _IO_stdin_used +16466 __libc_csu_init +16482 __bss_start +16494 main +16499 __TMC_END__ +16511 _ITM_registerTMCloneTable +16537 __cxa_finalize@GLIBC_2.2.5 +16565 .symtab +16573 .strtab +16581 .shstrtab +16591 .interp +16599 .note.ABI-tag +16613 .gnu.hash +16623 .dynsym +16631 .dynstr +16639 .gnu.version +16652 .gnu.version_r +16667 .rela.dyn +16677 .init +16683 .plt +16688 .plt.got +16697 .text +16703 .fini +16709 .rodata +16717 .eh_frame_hdr +16731 .eh_frame +16741 .init_array +16753 .fini_array +16765 .dynamic +16774 .data +16780 .bss +16785 .comment +16794 .debug_aranges +16809 .debug_info +16821 .debug_abbrev +16835 .debug_line +16847 .debug_str +16858 .debug_loc +16869 .debug_line_str +16885 .debug_rnglists diff --git a/test-bin/outputs/strings/true_to b/test-bin/outputs/strings/true_to @@ -0,0 +1,91 @@ +1250 /lib64/ld-linux-x86-64.so.2 +1641 __cxa_finalize +1660 __libc_start_main +1702 libc.so.6 +1714 GLIBC_2.2.5 +1730 _ITM_deregisterTMCloneTable +1764 __gmon_start__ +2003 _ITM_registerTMCloneTable +10576 AUATI +10711 []A\A]A^A_ +20247 ;*3$" +30020 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +30073 GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +32173 /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +32254 elf-init.c +32272 stddef.h +32510 f.... +32527 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +32623 main +32630 long long int +32646 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +35062 size_t +35071 __init_array_start +35114 /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +35210 envp +35215 elf-init.c +35230 long unsigned int +35252 __libc_csu_fini +35272 char +35277 argc +35304 size +35311 __libc_csu_init +35331 argv +35336 long double +35352 __init_array_end +36152 true.c +36161 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +37541 true.c +37550 elf-init.c +37563 __init_array_end +37604 _DYNAMIC +37615 __init_array_start +37640 __GNU_EH_FRAME_HDR +37663 _GLOBAL_OFFSET_TABLE_ +37711 __libc_csu_fini +37731 _ITM_deregisterTMCloneTable +37765 _edata +37774 __libc_start_main@GLIBC_2.2.5 +40032 __data_start +40047 __gmon_start__ +40066 __dso_handle +40103 _IO_stdin_used +40122 __libc_csu_init +40142 __bss_start +40156 main +40163 __TMC_END__ +40177 _ITM_registerTMCloneTable +40231 __cxa_finalize@GLIBC_2.2.5 +40265 .symtab +40275 .strtab +40305 .shstrtab +40317 .interp +40327 .note.ABI-tag +40345 .gnu.hash +40357 .dynsym +40367 .dynstr +40377 .gnu.version +40414 .gnu.version_r +40433 .rela.dyn +40445 .init +40453 .plt +40460 .plt.got +40471 .text +40477 .fini +40505 .rodata +40515 .eh_frame_hdr +40533 .eh_frame +40545 .init_array +40561 .fini_array +40575 .dynamic +40606 .data +40614 .bss +40621 .comment +40632 .debug_aranges +40651 .debug_info +40665 .debug_abbrev +40703 .debug_line +40717 .debug_str +40732 .debug_loc +40745 .debug_line_str +40765 .debug_rnglists diff --git a/test-bin/outputs/strings/true_tx b/test-bin/outputs/strings/true_tx @@ -0,0 +1,91 @@ +2a8 /lib64/ld-linux-x86-64.so.2 +3a1 __cxa_finalize +3b0 __libc_start_main +3c2 libc.so.6 +3cc GLIBC_2.2.5 +3d8 _ITM_deregisterTMCloneTable +3f4 __gmon_start__ +403 _ITM_registerTMCloneTable +117e AUATI +11c9 []A\A]A^A_ +20a7 ;*3$" +3010 GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +303b GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +347b /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +34ac elf-init.c +34ba stddef.h +3548 f.... +3557 GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +3593 main +3598 long long int +35a6 GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +3a32 size_t +3a39 __init_array_start +3a4c /var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +3a88 envp +3a8d elf-init.c +3a98 long unsigned int +3aaa __libc_csu_fini +3aba char +3abf argc +3ac4 size +3ac9 __libc_csu_init +3ad9 argv +3ade long double +3aea __init_array_end +3c6a true.c +3c71 /home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +3f61 true.c +3f68 elf-init.c +3f73 __init_array_end +3f84 _DYNAMIC +3f8d __init_array_start +3fa0 __GNU_EH_FRAME_HDR +3fb3 _GLOBAL_OFFSET_TABLE_ +3fc9 __libc_csu_fini +3fd9 _ITM_deregisterTMCloneTable +3ff5 _edata +3ffc __libc_start_main@GLIBC_2.2.5 +401a __data_start +4027 __gmon_start__ +4036 __dso_handle +4043 _IO_stdin_used +4052 __libc_csu_init +4062 __bss_start +406e main +4073 __TMC_END__ +407f _ITM_registerTMCloneTable +4099 __cxa_finalize@GLIBC_2.2.5 +40b5 .symtab +40bd .strtab +40c5 .shstrtab +40cf .interp +40d7 .note.ABI-tag +40e5 .gnu.hash +40ef .dynsym +40f7 .dynstr +40ff .gnu.version +410c .gnu.version_r +411b .rela.dyn +4125 .init +412b .plt +4130 .plt.got +4139 .text +413f .fini +4145 .rodata +414d .eh_frame_hdr +415b .eh_frame +4165 .init_array +4171 .fini_array +417d .dynamic +4186 .data +418c .bss +4191 .comment +419a .debug_aranges +41a9 .debug_info +41b5 .debug_abbrev +41c3 .debug_line +41cf .debug_str +41da .debug_loc +41e5 .debug_line_str +41f5 .debug_rnglists diff --git a/test-bin/strings b/test-bin/strings @@ -27,6 +27,30 @@ devnull_body() { atf_check ../bin/strings - </dev/null } +atf_test_case octalformat +octalformat_body() { + atf_check -o file:outputs/strings/all_bytes_to ../bin/strings -to inputs/all_bytes + atf_check ../bin/strings -to /dev/null + atf_check -o file:outputs/strings/true_to ../bin/strings -to inputs/strings/true + atf_check -o file:outputs/strings/true_8_to ../bin/strings -to -n 8 inputs/strings/true +} + +atf_test_case hexformat +hexformat_body() { + atf_check -o file:outputs/strings/all_bytes_tx ../bin/strings -tx inputs/all_bytes + atf_check ../bin/strings -tx /dev/null + atf_check -o file:outputs/strings/true_tx ../bin/strings -tx inputs/strings/true + atf_check -o file:outputs/strings/true_8_tx ../bin/strings -tx -n 8 inputs/strings/true +} + +atf_test_case decformat +decformat_body() { + atf_check -o file:outputs/strings/all_bytes_td ../bin/strings -td inputs/all_bytes + atf_check ../bin/strings -td /dev/null + atf_check -o file:outputs/strings/true_td ../bin/strings -td inputs/strings/true + atf_check -o file:outputs/strings/true_8_td ../bin/strings -td -n 8 inputs/strings/true +} + atf_init_test_cases() { cd "$(atf_get_srcdir)" @@ -34,4 +58,8 @@ atf_init_test_cases() { atf_add_test_case trueelf atf_add_test_case true8elf atf_add_test_case devnull + + atf_add_test_case octalformat + atf_add_test_case hexformat + atf_add_test_case decformat }