aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test
diff options
context:
space:
mode:
authorAlexander Egorenkov <Alexander.Egorenkov@ibm.com>2020-06-23 17:46:15 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-06-23 21:24:30 +0200
commitbbad15ae75da01150f3b1fed1a3837f5f5bedc89 (patch)
treefac55cc631521270f128cbf8292b9d55330fbc9e /sys/test
parent6930bbef3b671ae21f74007f9e59efb9b236b93f (diff)
target: support of big-endian architectures
* Introduce the new target flag 'LittleEndian' which specifies of which endianness the target is. * Introduce the new requires flag 'littleendian' for tests to selectively enable/disable tests on either little-endian architectures or big-endian ones. * Disable KD unit test on s390x architecture because the test works only on little-endian architecture. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
Diffstat (limited to 'sys/test')
-rw-r--r--sys/test/test/align02
-rw-r--r--sys/test/test/align0_be6
-rw-r--r--sys/test/test/bf2
-rw-r--r--sys/test/test/bf22
-rw-r--r--sys/test/test/nla2
5 files changed, 11 insertions, 3 deletions
diff --git a/sys/test/test/align0 b/sys/test/test/align0
index a73ca98a5..82272f5a9 100644
--- a/sys/test/test/align0
+++ b/sys/test/test/align0
@@ -1,5 +1,5 @@
# 32_shmem has 4-byte alignment for int64 and everything goes havoc.
-# requires: -arch=32_shmem
+# requires: -arch=32_shmem littleendian
syz_compare(&AUTO="010000000200000003000400000000000500000000000000", 0x18, &AUTO=@align0={0x1, 0x2, 0x3, 0x4, 0x5}, AUTO)
syz_compare(&AUTO="", 0x18, &AUTO=@align0={0x0, 0x0, 0x0, 0x0, 0x0}, 0x17) # EBADF
diff --git a/sys/test/test/align0_be b/sys/test/test/align0_be
new file mode 100644
index 000000000..00f251cc9
--- /dev/null
+++ b/sys/test/test/align0_be
@@ -0,0 +1,6 @@
+# 32_shmem has 4-byte alignment for int64 and everything goes havoc.
+# requires: -arch=32_shmem -littleendian
+
+syz_compare(&AUTO="000100000000000203000004000000000000000000000005", 0x18, &AUTO=@align0={0x1, 0x2, 0x3, 0x4, 0x5}, AUTO)
+syz_compare(&AUTO="", 0x18, &AUTO=@align0={0x0, 0x0, 0x0, 0x0, 0x0}, 0x17) # EBADF
+syz_compare(&AUTO="", 0x18, &AUTO=@align0={0x1, 0x0, 0x0, 0x0, 0x0}, AUTO) # EINVAL
diff --git a/sys/test/test/bf b/sys/test/test/bf
index b1a251e66..f35ff1336 100644
--- a/sys/test/test/bf
+++ b/sys/test/test/bf
@@ -1,5 +1,5 @@
# 32_shmem has 4-byte alignment for int64 and everything goes havoc.
-# requires: -arch=32_shmem
+# requires: -arch=32_shmem littleendian
syz_compare(&AUTO="ab03000000000000cdcdcdcdcdcdcdcdebffff03ab0303abaa00000000000000", 0x20, &AUTO=@bf0={0xabab, 0xcdcdcdcdcdcdcdcd, 0xabab, 0xffff, 0xffffff, 0xabab, 0xabab, 0xaaa}, AUTO)
syz_compare(&AUTO="dcfcde563422f10e", 0x8, &AUTO=@bf2={0x0abc, 0x0bcd, 0xcdef, 0x123456, 0x78ef12}, AUTO)
diff --git a/sys/test/test/bf2 b/sys/test/test/bf2
index 1f5f71877..e0345388b 100644
--- a/sys/test/test/bf2
+++ b/sys/test/test/bf2
@@ -1,5 +1,5 @@
# 32_shmem has 4-byte alignment for int64 and everything goes havoc.
-# requires: -arch=32_shmem
+# requires: -arch=32_shmem littleendian
syz_compare(&AUTO="1200000034067800", AUTO, &AUTO=@bf4={0x12, {0x34, 0x56, 0x78}}, AUTO)
syz_compare(&AUTO="1200000034060000", AUTO, &AUTO=@bf5={0x12, {0x34, 0x56}}, AUTO)
diff --git a/sys/test/test/nla b/sys/test/test/nla
index 72bd24ff7..b2c5bf1a9 100644
--- a/sys/test/test/nla
+++ b/sys/test/test/nla
@@ -1,3 +1,5 @@
+# requires: littleendian
+
syz_compare(&AUTO="0500aa0055000000", AUTO, &AUTO=@nla=[@a0={AUTO, AUTO, 0x55, ''}], AUTO)
syz_compare(&AUTO="0600bb0055550000", AUTO, &AUTO=@nla=[@a1={AUTO, AUTO, 0x5555, ''}], AUTO)
syz_compare(&AUTO="0800cc0055555555", AUTO, &AUTO=@nla=[@a2={AUTO, AUTO, 0x55555555, ''}], AUTO)