Fix sosplice tests on 32 bit systems by putting the correct number
authorbluhm <bluhm@openbsd.org>
Thu, 25 Aug 2016 17:13:59 +0000 (17:13 +0000)
committerbluhm <bluhm@openbsd.org>
Thu, 25 Aug 2016 17:13:59 +0000 (17:13 +0000)
of bytes into the time_t Perl pack template.  Also fix error messages.

regress/sys/kern/sosplice/error/args-idle-EINVAL.pl
regress/sys/kern/sosplice/error/args-max-EINVAL.pl

index fccf11e..3e32cb6 100644 (file)
@@ -31,9 +31,9 @@ our %args = (
        if ($Config{longsize} == 8) {
            $packed = pack('iiiiiiii', $ss->fileno(),0,0,0,-1,-1,-1,-1);
        } else {
-           $packed = pack('iiiii', $ss->fileno(),0,0,-1,-1);
+           $packed = pack('iiiiii', $ss->fileno(),0,0,-1,-1,-1);
        }
        $s->setsockopt(SOL_SOCKET, SO_SPLICE, $packed)
-           and die "splice to unconnected socket succeeded";
+           and die "splice with negative idle timeout succeeded";
     },
 );
index e61d83a..135f775 100644 (file)
@@ -31,9 +31,9 @@ our %args = (
        if ($Config{longsize} == 8) {
            $packed = pack('iiiiiiii', $ss->fileno(),0,-1,-1,0,0,0,0);
        } else {
-           $packed = pack('iiiii', $ss->fileno(),-1,-1,0,0);
+           $packed = pack('iiiiii', $ss->fileno(),-1,-1,0,0,0);
        }
        $s->setsockopt(SOL_SOCKET, SO_SPLICE, $packed)
-           and die "splice to unconnected socket succeeded";
+           and die "splice with negative maximum succeeded";
     },
 );