diff options
author | Elliott Hughes <enh@google.com> | 2019-04-25 10:48:21 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-04-26 00:40:51 -0500 |
commit | 3e8fdc228df1ef233d0c578207fde76d3ad9559a (patch) | |
tree | ed8afc0f28214eef4623ffb044bf1276d56ee771 | |
parent | 8bc59e09eebe64e1234a922e030180a88be48046 (diff) | |
download | toybox-3e8fdc228df1ef233d0c578207fde76d3ad9559a.tar.gz |
file: add test ELF binaries.
We keep regressing on this, and the ELF stuff is quite complicated, so
even though checking in binaries isn't my first choice, this seems like
a good use of 20KiB...
-rwxr-xr-x | tests/file.test | 10 | ||||
-rwxr-xr-x | tests/files/elf/ndk-elf-note-full | bin | 0 -> 9824 bytes | |||
-rwxr-xr-x | tests/files/elf/ndk-elf-note-short | bin | 0 -> 10976 bytes |
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/file.test b/tests/file.test index 2d8f04b6..802f32e1 100755 --- a/tests/file.test +++ b/tests/file.test @@ -20,6 +20,16 @@ testing "env python script" "file env.python.script" "env.python.script: python testing "ascii" "file ascii" "ascii: ASCII text\n" "" "" testing "java class" "file java.class" "java.class: Java class file, version 49.0 (Java 1.5)\n" "" "" testing "Android .dex" "file android.dex" "android.dex: Android dex file, version 035\n" "" "" + +# These actually test a lot of the ELF code: 32-/64-bit, arm/arm64, PT_INTERP, +# the two kinds of NDK ELF note, BuildID, and stripped/not stripped. +toyonly testing "Android NDK full ELF note" \ + "file $FILES/elf/ndk-elf-note-full | sed 's/^.*: //'" \ + "ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 24, built by NDK r19b (5304403), BuildID=0c712b8af424d57041b85326f0000fadad38ee0a, not stripped\n" "" "" +toyonly testing "Android NDK short ELF note" \ + "file $FILES/elf/ndk-elf-note-short | sed 's/^.*: //'" \ + "ELF shared object, 32-bit LSB arm, dynamic (/system/bin/linker), for Android 28, BuildID=da6a5f4ca8da163b9339326e626d8a3c, stripped\n" "" "" + testing "symlink" "file symlink" "symlink: symbolic link\n" "" "" testing "symlink -h" "file -h symlink" "symlink: symbolic link\n" "" "" testing "symlink -L" "file -L symlink" "symlink: Java class file, version 49.0 (Java 1.5)\n" "" "" diff --git a/tests/files/elf/ndk-elf-note-full b/tests/files/elf/ndk-elf-note-full Binary files differnew file mode 100755 index 00000000..da186122 --- /dev/null +++ b/tests/files/elf/ndk-elf-note-full diff --git a/tests/files/elf/ndk-elf-note-short b/tests/files/elf/ndk-elf-note-short Binary files differnew file mode 100755 index 00000000..d2304250 --- /dev/null +++ b/tests/files/elf/ndk-elf-note-short |