summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-08 14:19:59 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-08 14:19:59 +0000
commitafb2dc4303ef5b6afb0eafc67c9e81ed9e607f49 (patch)
tree86a243752885e936a96d3b87d1fa826cb4124660 /regress
parente0d922a3fd571b981c332ac624e47430438d2d58 (diff)
Add some padding bytes to syscall argument struct so that tests
pass on armv7. from Moritz Buhl
Diffstat (limited to 'regress')
-rw-r--r--regress/sys/kern/sosplice/error/args-idle-EINVAL.pl6
-rw-r--r--regress/sys/kern/sosplice/error/args-max-EINVAL.pl6
2 files changed, 8 insertions, 4 deletions
diff --git a/regress/sys/kern/sosplice/error/args-idle-EINVAL.pl b/regress/sys/kern/sosplice/error/args-idle-EINVAL.pl
index 3e32cb64287..0e7194766ca 100644
--- a/regress/sys/kern/sosplice/error/args-idle-EINVAL.pl
+++ b/regress/sys/kern/sosplice/error/args-idle-EINVAL.pl
@@ -29,9 +29,11 @@ our %args = (
my $packed;
if ($Config{longsize} == 8) {
- $packed = pack('iiiiiiii', $ss->fileno(),0,0,0,-1,-1,-1,-1);
+ $packed = pack('ixxxxqql!', $ss->fileno(),-1,-1-1);
} else {
- $packed = pack('iiiiii', $ss->fileno(),0,0,-1,-1,-1);
+ my $pad = $Config{ARCH} eq 'i386'? '': 'xxxx';
+ my $packstr = "i${pad}lllll!${pad}";
+ $packed = pack($packstr, $ss->fileno(),0,0,-1,-1,-1);
}
$s->setsockopt(SOL_SOCKET, SO_SPLICE, $packed)
and die "splice with negative idle timeout succeeded";
diff --git a/regress/sys/kern/sosplice/error/args-max-EINVAL.pl b/regress/sys/kern/sosplice/error/args-max-EINVAL.pl
index 135f775e30a..68506c86b19 100644
--- a/regress/sys/kern/sosplice/error/args-max-EINVAL.pl
+++ b/regress/sys/kern/sosplice/error/args-max-EINVAL.pl
@@ -29,9 +29,11 @@ our %args = (
my $packed;
if ($Config{longsize} == 8) {
- $packed = pack('iiiiiiii', $ss->fileno(),0,-1,-1,0,0,0,0);
+ $packed = pack('ixxxxqql!', $ss->fileno(),-1,0,0);
} else {
- $packed = pack('iiiiii', $ss->fileno(),-1,-1,0,0,0);
+ my $pad = $Config{ARCH} eq 'i386'? '': 'xxxx';
+ my $packstr = "i${pad}lllll!${pad}";
+ $packed = pack($packstr, $ss->fileno(),-1,-1,0,0,0);
}
$s->setsockopt(SOL_SOCKET, SO_SPLICE, $packed)
and die "splice with negative maximum succeeded";