summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-03-22 13:42:40 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-03-23 18:06:46 +0100
commit2f809d29e85527acd75d4d2e46aaa14adc2f09dd (patch)
treeff042e0bb2ee9463b2a14f19f6fd423e56fdae5e /test
parentcoredump: split out parse_auxv() to src/shared/ (diff)
downloadsystemd-2f809d29e85527acd75d4d2e46aaa14adc2f09dd.tar.xz
systemd-2f809d29e85527acd75d4d2e46aaa14adc2f09dd.zip
test-coredump-util: add tests for parse_aux()
The test files are /proc//auxv files copies from various architecutres signified by the file name suffix. Those tests are fairly simple, but when we run them on n architectures, we do ~n² cross-arch tests.
Diffstat (limited to 'test')
-rw-r--r--test/auxv/.gitattributes3
-rw-r--r--test/auxv/bash.riscv64bin0 -> 384 bytes
-rw-r--r--test/auxv/cat.s390xbin0 -> 304 bytes
-rw-r--r--test/auxv/dbus-broker-launch.aarch64bin0 -> 336 bytes
-rw-r--r--test/auxv/dbus-broker-launch.amd64bin0 -> 336 bytes
-rw-r--r--test/auxv/polkitd.aarch64bin0 -> 336 bytes
-rw-r--r--test/auxv/resolved.arm32bin0 -> 160 bytes
-rw-r--r--test/auxv/sleep.i686bin0 -> 192 bytes
-rw-r--r--test/auxv/sleep32.i686bin0 -> 192 bytes
-rw-r--r--test/auxv/sleep64.amd64bin0 -> 336 bytes
-rw-r--r--test/auxv/sudo.aarch64bin0 -> 336 bytes
-rw-r--r--test/auxv/sudo.amd64bin0 -> 336 bytes
-rw-r--r--test/meson.build83
13 files changed, 29 insertions, 57 deletions
diff --git a/test/auxv/.gitattributes b/test/auxv/.gitattributes
new file mode 100644
index 0000000000..58e3ff4c98
--- /dev/null
+++ b/test/auxv/.gitattributes
@@ -0,0 +1,3 @@
+/*.* -whitespace
+/*.* binary
+/*.* generated
diff --git a/test/auxv/bash.riscv64 b/test/auxv/bash.riscv64
new file mode 100644
index 0000000000..273a468b30
--- /dev/null
+++ b/test/auxv/bash.riscv64
Binary files differ
diff --git a/test/auxv/cat.s390x b/test/auxv/cat.s390x
new file mode 100644
index 0000000000..aa76441fed
--- /dev/null
+++ b/test/auxv/cat.s390x
Binary files differ
diff --git a/test/auxv/dbus-broker-launch.aarch64 b/test/auxv/dbus-broker-launch.aarch64
new file mode 100644
index 0000000000..3a05e3cabb
--- /dev/null
+++ b/test/auxv/dbus-broker-launch.aarch64
Binary files differ
diff --git a/test/auxv/dbus-broker-launch.amd64 b/test/auxv/dbus-broker-launch.amd64
new file mode 100644
index 0000000000..21965e85e3
--- /dev/null
+++ b/test/auxv/dbus-broker-launch.amd64
Binary files differ
diff --git a/test/auxv/polkitd.aarch64 b/test/auxv/polkitd.aarch64
new file mode 100644
index 0000000000..ff1ea9f140
--- /dev/null
+++ b/test/auxv/polkitd.aarch64
Binary files differ
diff --git a/test/auxv/resolved.arm32 b/test/auxv/resolved.arm32
new file mode 100644
index 0000000000..7d05f3b20b
--- /dev/null
+++ b/test/auxv/resolved.arm32
Binary files differ
diff --git a/test/auxv/sleep.i686 b/test/auxv/sleep.i686
new file mode 100644
index 0000000000..d0b5f2c927
--- /dev/null
+++ b/test/auxv/sleep.i686
Binary files differ
diff --git a/test/auxv/sleep32.i686 b/test/auxv/sleep32.i686
new file mode 100644
index 0000000000..f52f512436
--- /dev/null
+++ b/test/auxv/sleep32.i686
Binary files differ
diff --git a/test/auxv/sleep64.amd64 b/test/auxv/sleep64.amd64
new file mode 100644
index 0000000000..c3c7ed472f
--- /dev/null
+++ b/test/auxv/sleep64.amd64
Binary files differ
diff --git a/test/auxv/sudo.aarch64 b/test/auxv/sudo.aarch64
new file mode 100644
index 0000000000..e49ce6a9ac
--- /dev/null
+++ b/test/auxv/sudo.aarch64
Binary files differ
diff --git a/test/auxv/sudo.amd64 b/test/auxv/sudo.amd64
new file mode 100644
index 0000000000..91e4646615
--- /dev/null
+++ b/test/auxv/sudo.amd64
Binary files differ
diff --git a/test/meson.build b/test/meson.build
index 1135ecd920..1721cffcd5 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -3,63 +3,32 @@
if install_tests
testdata_dir = testsdir + '/testdata/'
- install_subdir('journal-data',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-execute',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-fstab-generator',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-path',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-path-util',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-umount',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('test-network-generator-conversion',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-03.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-04.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-06.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-10.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-11.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-16.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-28.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-30.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-52.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-63.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
- install_subdir('testsuite-80.units',
- exclude_files : '.gitattributes',
- install_dir : testdata_dir)
+ foreach subdir : [
+ 'auxv',
+ 'journal-data',
+ 'units',
+ 'test-execute',
+ 'test-fstab-generator',
+ 'test-path',
+ 'test-path-util',
+ 'test-umount',
+ 'test-network-generator-conversion',
+ 'testsuite-03.units',
+ 'testsuite-04.units',
+ 'testsuite-06.units',
+ 'testsuite-10.units',
+ 'testsuite-11.units',
+ 'testsuite-16.units',
+ 'testsuite-28.units',
+ 'testsuite-30.units',
+ 'testsuite-52.units',
+ 'testsuite-63.units',
+ 'testsuite-80.units',
+ ]
+ install_subdir(subdir,
+ exclude_files : '.gitattributes',
+ install_dir : testdata_dir)
+ endforeach
install_data(kbd_model_map,
install_dir : testdata_dir + '/test-keymap-util')