diff options
116 files changed, 18545 insertions, 2763 deletions
diff --git a/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh b/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh index aa7af27..f460cf5 100755 --- a/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh +++ b/contrib/netbsd-tests/crypto/libcrypto/t_libcrypto.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_libcrypto.sh,v 1.3 2010/11/08 19:06:12 pooka Exp $ +# $NetBSD: t_libcrypto.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case bn bn_head() { atf_set "descr" "Checks BIGNUM library" - atf_set "timeout" "300" + atf_set "timeout" "360" } bn_body() { diff --git a/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh b/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh index 1453e75..eb8d0f5 100755 --- a/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh +++ b/contrib/netbsd-tests/crypto/libcrypto/t_pubkey.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_pubkey.sh,v 1.3 2011/06/09 05:25:21 spz Exp $ +# $NetBSD: t_pubkey.sh,v 1.4 2016/10/13 09:25:37 martin Exp $ # # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -49,7 +49,7 @@ atf_test_case rsa rsa_head() { atf_set "descr" "Checks RSA" - atf_set "timeout" "300" + atf_set "timeout" "420" } rsa_body() { @@ -60,7 +60,7 @@ atf_test_case ec ec_head() { atf_set "descr" "Checks EC cipher" - atf_set "timeout" "300" + atf_set "timeout" "480" } ec_body() { @@ -81,7 +81,7 @@ atf_test_case ecdsa ecdsa_head() { atf_set "descr" "Checks ECDSA algorithm" - atf_set "timeout" "300" + atf_set "timeout" "480" } ecdsa_body() { diff --git a/contrib/netbsd-tests/dev/audio/h_pad.c b/contrib/netbsd-tests/dev/audio/h_pad.c index dd481ac..b760d04 100644 --- a/contrib/netbsd-tests/dev/audio/h_pad.c +++ b/contrib/netbsd-tests/dev/audio/h_pad.c @@ -1,4 +1,4 @@ -/* $NetBSD: h_pad.c,v 1.1 2010/08/04 13:15:15 pooka Exp $ */ +/* $NetBSD: h_pad.c,v 1.2 2016/10/15 07:08:06 nat Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -56,14 +56,14 @@ main(int argc, char *argv[]) ssize_t n; rump_init(); - audiofd = rump_sys_open("/dev/audio0", O_RDWR); - if (audiofd == -1) - err(1, "open audio"); - padfd = rump_sys_open("/dev/pad0", O_RDONLY); if (padfd == -1) err(1, "open pad"); + audiofd = rump_sys_open("/dev/audio0", O_RDWR); + if (audiofd == -1) + err(1, "open audio"); + if ((n = rump_sys_write(audiofd, musa, sizeof(musa))) != sizeof(musa)) err(1, "write"); diff --git a/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue b/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue index e0cbf52..969ad9c 100644 --- a/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue +++ b/contrib/netbsd-tests/dev/audio/t_pad_output.bz2.uue @@ -1,1035 +1,1040 @@ begin 644 t_pad_output.bz2 -M0EIH.3%!629369%IQ#X`<IM_____________________________________ -M________X)OO)A21(@B``4"A15``"A2!1E]V5*%%*`!0JJ7"HT*HVT6^LZTT -M13<F#E#=<'#>MT#FU'+1O7<;MT;NYNNYW<[N[OO;K>W7+>^Y[M;[LV]??=M] -MYZ[MMMO>WO;6=W.KIOKNUF:EFEJVK5I"+:J;8:B5K1JJIJVUJV,K6IK5MJJ6 -M--%5FJLS55K158M5K:U5FU4RVMJ(K0BK-6Q0-L+6JVLJ6MK559M5556*M54J -MJMIMFS-"U6LJRUBRJJRV;55::M6U[G=0JI5-4W66J=KVZ]LNW=]W=FW=S;YM -MDO<]LW>Z[WW%E@WUOD-[G!SN<'=W$CD8@[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/Q<!`KK(JEA&&H<WD=ITJD`(#*(Y" +MLF&_<S+-.ZM8<$A2G`/IRP-/W_$]))$!B6;M.$@Q:U+5/T]*"+)+&[40F`\/ +M[D8+OS*]>I=\_Y(5TRD@`E6_MV&KS%1I_M<N1O)X)3`S0J'#-Z/<1+G.H2(F +MB/?XCB'U0-84@>!!;Z,JUFJ07_E],9`K_8=._^^O$]@_T6;`9K+P7A[JFLEQ +M(2)4E`Y;&DU,7U0]BB(@SF,#?$X"S:[ZWZ;?##S]/:.EM;R+\[!7)6`)*;Y) +MO\9Q?9T)`@D,8&,8P,8))[<?/)JL`JR]5M$@RQ@1/.BAL7VWT+^WAAU?9.T% +M">Y5(@3H#&,8P,PF(Z[H9MWSG1Z`MWE3#(#!(0Z[^<"%UJ_/$N7C^=F=5,B) +9@#N8461T+A7W1J)TTW_Q=R13A0D`S39&D(#! ` end diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c b/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c new file mode 100644 index 0000000..91e81f4 --- /dev/null +++ b/contrib/netbsd-tests/dev/cgd/t_cgd_3des.c @@ -0,0 +1,913 @@ +/* $NetBSD: t_cgd_3des.c,v 1.1 2016/11/11 07:39:58 alnsn Exp $ */ +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Alexander Nasonov. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/sysctl.h> + +#include <atf-c.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <util.h> + +#include <dev/cgdvar.h> + +#include <rump/rump.h> +#include <rump/rump_syscalls.h> + +#include "../../h_macros.h" + +#define SECSIZE 512 + +struct testvec { + unsigned int blkno; + const uint8_t *ptxt; /* PlainText */ + const uint8_t *ctxt; /* CipherText */ +}; + +/* + * 192 bits CBC key, NUL terminated. + */ +static const char c3des_cbc_192_key[25] = { + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, /* ABCDEFGH */ + 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, /* IJKLMNOP */ + 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* QRSTUVWX */ + 0 +}; + +static const uint8_t c3des_cbc_ptxt[SECSIZE] = + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop"; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t c3des_cbc_192_encblkno1_vec0_ctxt[SECSIZE] = { + 0x19, 0x92, 0xc8, 0xce, 0xdf, 0xa3, 0x14, 0xef, + 0xff, 0x88, 0x9f, 0x01, 0xfa, 0x6f, 0xfa, 0xa6, + 0xdd, 0x2b, 0x43, 0x67, 0xfa, 0xce, 0x37, 0x95, + 0x73, 0x4d, 0x18, 0x33, 0x0c, 0x29, 0xb6, 0xbb, + 0x37, 0x77, 0x31, 0x74, 0xf6, 0x62, 0x03, 0xd2, + 0x78, 0x13, 0x55, 0xf6, 0x58, 0x49, 0xaf, 0x2a, + 0x15, 0x4c, 0xc2, 0x4a, 0x55, 0x99, 0x82, 0xb9, + 0xfb, 0x8b, 0x4f, 0x92, 0xe3, 0xbc, 0x9b, 0x09, + 0x42, 0x7b, 0x5f, 0x54, 0xed, 0xf0, 0xcb, 0x5d, + 0x93, 0xba, 0x09, 0x4b, 0x20, 0xf3, 0xe6, 0x44, + 0x30, 0x5e, 0x9e, 0xfc, 0x7a, 0x3c, 0x7d, 0x11, + 0x63, 0xea, 0x40, 0x94, 0xaa, 0xd0, 0xa9, 0xf6, + 0xc7, 0x1e, 0x8f, 0xc8, 0xa6, 0x2c, 0xf7, 0xeb, + 0x51, 0x26, 0xdc, 0xf8, 0x73, 0xf9, 0xb4, 0xa8, + 0x80, 0x4a, 0xe5, 0x6f, 0xb6, 0x33, 0x13, 0x6b, + 0x1b, 0x7d, 0x00, 0xde, 0x44, 0x7e, 0x26, 0xa2, + 0x82, 0xa7, 0x80, 0x16, 0x34, 0xde, 0xb9, 0x82, + 0x4c, 0x42, 0x8e, 0x0d, 0x48, 0x7e, 0x38, 0xbd, + 0x1d, 0x7d, 0x98, 0xbb, 0x11, 0x8a, 0x72, 0x14, + 0x4e, 0xaa,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+/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t c3des_cbc_192_encblkno1_vec1_ctxt[SECSIZE] = { + 0x1d, 0x65, 0xdf, 0x01, 0x9b, 0x24, 0xa5, 0x10, + 0x94, 0x9a, 0x5b, 0x81, 0x96, 0x4e, 0xa3, 0x42, + 0x42, 0xd5, 0x05, 0x52, 0xab, 0x3c, 0x67, 0x40, + 0x79, 0xf9, 0x4b, 0x58, 0x39, 0xf6, 0xd0, 0x97, + 0x48, 0xf4, 0x77, 0xb8, 0xac, 0xe2, 0x10, 0x66, + 0xa8, 0x04, 0x0a, 0x1e, 0xa6, 0xbb, 0x4c, 0xd9, + 0x5d, 0x0c, 0x11, 0xb5, 0xe0, 0x26, 0x84, 0x50, + 0x10, 0x80, 0xbf, 0xd6, 0xdc, 0x82, 0x53, 0x0a, + 0xcf, 0xf6, 0xd3, 0x07, 0x45, 0xb0, 0x8e, 0x36, + 0x2e, 0x60, 0x0f, 0xd0, 0xc1, 0xb9, 0xd8, 0x29, + 0x6e, 0x13, 0x8e, 0xc1, 0xa8, 0x63, 0x20, 0xe0, + 0x8d, 0x47, 0x8b, 0xf9, 0xa0, 0x60, 0x55, 0x53, + 0x1d, 0xaf, 0x43, 0x46, 0xe5, 0x10, 0xd5, 0xcd, + 0x91, 0x9e, 0x11, 0x4a, 0x6f, 0x6a, 0x13, 0xdf, + 0xee, 0x7a, 0x88, 0xbe, 0x59, 0x96, 0xdb, 0x65, + 0x25, 0x57, 0x9e, 0x82, 0xad, 0xc2, 0xd6, 0x28, + 0x96, 0xb3, 0x7f, 0x57, 0x5d, 0xb2, 0xfa, 0x60, + 0x43, 0x22, 0xa5, 0x33, 0x14, 0x99, 0x8f, 0x68, + 0x5a, 0x7f, 0xaf, 0x9e, 0xe9, 0x23, 0x57, 0x9b, + 0x52, 0xe9, 0x20, 0x59, 0x26, 0x89, 0x9b, 0x59, + 0xb0, 0xee, 0xe8, 0x6d, 0x06, 0x8c, 0x01, 0xc2, + 0xea, 0xbc, 0x7d, 0x93, 0x3f, 0x79, 0x7f, 0xeb, + 0x57, 0xc9, 0x0a, 0xca, 0x37, 0x81, 0xa7, 0x82, + 0xde, 0x37, 0x7d, 0x69, 0x01, 0xaa, 0x19, 0x98, + 0x26, 0xfe, 0x06, 0x83, 0xeb, 0x9d, 0x26, 0xdc, + 0x04, 0x5d, 0xc9, 0x05, 0xee, 0x1a, 0xd3, 0xeb, + 0x20, 0x8c, 0xb7, 0x99, 0x75, 0xe0, 0x19, 0x98, + 0xca, 0x83, 0xae, 0x94, 0x28, 0xbf, 0x47, 0x42, + 0x92, 0x05, 0x8c, 0xaa, 0xeb, 0x99, 0x0f, 0xcc, + 0x33, 0x79, 0x24, 0x62, 0xa0, 0x7a, 0x65, 0xcb, + 0x53, 0xb7, 0x86, 0x0d, 0xcb, 0x44, 0x2d, 0xbf, + 0xe8, 0x5d, 0x62, 0xeb, 0x21, 0x4d, 0x35, 0x86, + 0x56, 0x6c, 0x51, 0xff, 0xa3, 0x45, 0xcc, 0x88, + 0x09, 0x43, 0x08, 0x97, 0x13, 0x7d, 0x00, 0xd8, + 0x82, 0x2d, 0xbe, 0xbe, 0x44, 0x0c, 0x2c, 0xa4, + 0x4f, 0x84, 0x07, 0x20, 0x9c, 0x3f, 0xf6, 0x5b, + 0x9e, 0xe8, 0x68, 0x40, 0xd3, 0x64, 0x8f, 0xb4, + 0x9e, 0xac, 0xc6, 0x41, 0x11, 0xda, 0xf2, 0x60, + 0xfa, 0x29, 0x9d, 0x26, 0x68, 0x5b, 0x79, 0x3a, + 0xd1, 0x66, 0x78, 0xca, 0x80, 0x87, 0xae, 0xab, + 0x7b, 0x29, 0x3c, 0xb0, 0xe6, 0xa2, 0x6b, 0x24, + 0x81, 0xeb, 0x51, 0xf9, 0xcb, 0x4a, 0x08, 0x37, + 0x2a, 0x75, 0xb5, 0xd3, 0xb3, 0x8f, 0x3d, 0x13, + 0x11, 0x0c, 0xa9, 0xf7, 0xf6, 0x57, 0x7e, 0xb7, + 0xa6, 0x22, 0xe8, 0x13, 0xfd, 0xf1, 0x6a, 0xe9, + 0xc1, 0x94, 0xa6, 0xf5, 0xa5, 0xec, 0xfa, 0x31, + 0xd2, 0x66, 0x8f, 0xe3, 0x6e, 0x9a, 0xaa, 0xb0, + 0xe3, 0x04, 0x09, 0x00, 0x1e, 0x67, 0x3c, 0xbe, + 0x2a, 0x8c, 0xd5, 0x1f, 0x4f, 0x55, 0x2c, 0x1d, + 0x26, 0x7f, 0xc9, 0x27, 0x00, 0x88, 0x7d, 0x45, + 0x4e, 0xe1, 0x36, 0xf6, 0xf5, 0xa8, 0xd4, 0xef, + 0x8b, 0x26, 0x76, 0x41, 0x28, 0x87, 0xf4, 0x51, + 0x14, 0x36, 0xad, 0x60, 0x8d, 0xe9, 0xe2, 0x9d, + 0x3c, 0xea, 0x09, 0x51, 0x3c, 0x81, 0xdf, 0x1a, + 0xc2, 0xc2, 0xf6, 0x45, 0xe1, 0x73, 0xac, 0xae, + 0x85, 0x74, 0x83, 0x8f, 0x56, 0x3c, 0x36, 0x1c, + 0xe0, 0x07, 0xc6, 0x6a, 0x48, 0xe4, 0x34, 0xe9, + 0x81, 0x53, 0xb7, 0x53, 0x95, 0xa7, 0x94, 0x21, + 0x7e, 0x32, 0x53, 0xda, 0x83, 0xd8, 0x57, 0x92, + 0xd1, 0x15, 0x45, 0x86, 0x40, 0xac, 0xf1, 0x6f, + 0x3c, 0x29, 0xef, 0x8d, 0x12, 0xe1, 0x9d, 0x04, + 0x17, 0x3a, 0xcc, 0xa6, 0xc5, 0xe4, 0x27, 0x41, + 0xcb, 0xfb, 0x5e, 0x77, 0x73, 0x5a, 0x2c, 0x03, + 0xe9, 0x2b, 0x76, 0x4e, 0x69, 0xea, 0xcb, 0xb3, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t c3des_cbc_192_encblkno1_vec2_ctxt[SECSIZE] = { + 0x87, 0xb1, 0x3c, 0xd6, 0x60, 0xa0, 0x5a, 0x35, + 0xf7, 0xe1, 0x6b, 0x87, 0xa0, 0x90, 0x2f, 0xc7, + 0x8c, 0xed, 0x53, 0xda, 0x93, 0x32, 0x78, 0x5d, + 0x24, 0x23, 0x42, 0xdd, 0x93, 0x5b, 0x2e, 0x40, + 0xa1, 0xb1, 0x3b, 0xbb, 0xf0, 0x50, 0xb4, 0x61, + 0xea, 0x15, 0x37, 0xf3, 0x49, 0xe1, 0xa0, 0x32, + 0x88, 0x85, 0x81, 0xfd, 0xb7, 0x96, 0xd7, 0x9d, + 0xd7, 0x29, 0x4b, 0x14, 0xf9, 0x18, 0x6a, 0xf6, + 0x46, 0xae, 0x69, 0xdf, 0x63, 0x9a, 0xe0, 0x0b, + 0x2c, 0x53, 0xd7, 0x82, 0x6f, 0xe5, 0xa0, 0x95, + 0x2f, 0x61, 0x7f, 0x15, 0xff, 0xc7, 0xe8, 0x83, + 0xfc, 0xfc, 0x16, 0x1c, 0x37, 0x0f, 0x9b, 0xbb, + 0x14, 0xb2, 0xe2, 0xb7, 0x1f, 0x85, 0xb7, 0x07, + 0x8a, 0x18, 0xed, 0xf7, 0x5f, 0x27, 0xff, 0x2f, + 0x07, 0xf9, 0x9d, 0xe3, 0x79, 0x45, 0x1f, 0x51, + 0x08, 0x54, 0x0f, 0x56, 0x84, 0xee, 0x87, 0x9a, + 0xa9, 0x46, 0xb8, 0x77, 0x85, 0x40, 0x46, 0x50, + 0xc1, 0x58, 0x07, 0xfd, 0xfa, 0x2b, 0x20, 0xd6, + 0x4e, 0xba, 0x08, 0x02, 0x59, 0x3d, 0x23, 0x3b, + 0x5d, 0xf9, 0x5e, 0x2f, 0xac, 0x9e, 0xa0, 0xd7, + 0x3f, 0x9a, 0xdf, 0x50, 0x66, 0xcc, 0x28, 0xce, + 0x93, 0xc8, 0x11, 0x5c, 0x74, 0xe2, 0x4f, 0xfd, + 0xaf, 0x33, 0xbb, 0xce, 0x96, 0x1f, 0xb3, 0x46, + 0x6e, 0xcd, 0xe4, 0xef, 0xfa, 0x2f, 0x93, 0xb1, + 0xe5, 0x7c, 0x54, 0xbc, 0x17, 0x1f, 0xd5, 0x31, + 0x0e, 0x88, 0xe7, 0xcd, 0xb0, 0xb5, 0x2e, 0x1e, + 0x9e, 0x40, 0x36, 0xa5, 0xbb, 0xa7, 0x4e, 0xc8, + 0x11, 0x6c, 0xae, 0x1c, 0x2d, 0xdb, 0x55, 0xd8, + 0x14, 0x40, 0x02, 0xad, 0xaf, 0x19, 0x28, 0x59, + 0xd7, 0x4f, 0x81, 0xd0, 0xc1, 0x54, 0x63, 0x73, + 0x0e, 0xfb, 0x26, 0xf2, 0xa6, 0x80, 0xca, 0x2e, + 0xf3, 0xca, 0x1e, 0xa4, 0x62, 0x07, 0x22, 0x10, + 0x11, 0x6a, 0x57, 0x28, 0x45, 0x80, 0xdf, 0x34, + 0x88, 0xe5, 0xf1, 0x23, 0xe0, 0xb6, 0x44, 0x51, + 0x54, 0xd8, 0xb3, 0x66, 0xac, 0x46, 0x4d, 0xdf, + 0xa2, 0x8e, 0x72, 0x3a, 0x1c, 0x87, 0x2a, 0x43, + 0xfe, 0xdb, 0x00, 0xff, 0xb7, 0x1c, 0x13, 0xc3, + 0x18, 0xfc, 0x71, 0x13, 0xe3, 0xd1, 0x1f, 0xde, + 0x16, 0x63, 0x73, 0xf5, 0x0e, 0xf7, 0x18, 0xe5, + 0x48, 0x8d, 0x30, 0xd9, 0x26, 0x20, 0x6d, 0xa1, + 0xba, 0xde, 0xe8, 0x7d, 0x77, 0x02, 0x33, 0x0d, + 0x73, 0xb2, 0xab, 0x35, 0xfd, 0xa5, 0x6e, 0x4c, + 0x5c, 0x27, 0xc7, 0x7e, 0x4a, 0x28, 0xf8, 0xf5, + 0x00, 0xbe, 0x4c, 0xd7, 0x2c, 0x27, 0x83, 0x16, + 0x37, 0xda, 0x0c, 0xb1, 0xd7, 0x89, 0xd8, 0x8f, + 0x17, 0x69, 0x1b, 0x6b, 0x48, 0x2b, 0xce, 0x9c, + 0xbd, 0xf4, 0x0d, 0xb5, 0x4d, 0x12, 0x11, 0x36, + 0x49, 0xd3, 0x8b, 0x52, 0xce, 0x7e, 0x47, 0xb0, + 0xb5, 0x54, 0x77, 0xef, 0x90, 0xb8, 0x0e, 0xaf, + 0x6f, 0x97, 0x88, 0xde, 0x6b, 0x37, 0x24, 0xdd, + 0x91, 0x84, 0x00, 0x51, 0xab, 0x06, 0x96, 0x3c, + 0x82, 0x73, 0xcf, 0xae, 0x8d, 0x23, 0x86, 0x59, + 0x62, 0x5b, 0xeb, 0x2a, 0xaf, 0x40, 0x17, 0xed, + 0x2b, 0x60, 0x73, 0x7d, 0x99, 0x95, 0x3f, 0xd6, + 0x6c, 0xca, 0x1e, 0xf3, 0xb0, 0xcd, 0xd5, 0x1d, + 0x53, 0xe0, 0xd2, 0x8b, 0x57, 0x7b, 0xac, 0x67, + 0x5a, 0x5a, 0x0a, 0x64, 0x82, 0xab, 0x8f, 0x5a, + 0x36, 0xe2, 0x45, 0x50, 0xec, 0x3e, 0x14, 0x80, + 0x7c, 0xfd, 0x0c, 0xa9, 0x94, 0xfb, 0xfe, 0x72, + 0xec, 0x47, 0x71, 0x2e, 0x90, 0x97, 0xf6, 0x33, + 0xbd, 0x7d, 0x7e, 0x77, 0x8f, 0xad, 0xd4, 0x1d, + 0x1d, 0x53, 0x0f, 0x28, 0x39, 0x77, 0x06, 0x1a, + 0x75, 0xfc, 0x12, 0xe6, 0x45, 0xfc, 0x87, 0xe1, + 0x46, 0xac, 0xb0, 0x73, 0xca, 0x24, 0x7c, 0x71, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t c3des_cbc_192_encblkno1_vec3_ctxt[SECSIZE] = { + 0xb1, 0xef, 0x7c, 0xd0, 0xa0, 0x6b, 0xe4, 0x88, + 0x5c, 0xd7, 0xf1, 0xbf, 0x5f, 0xce, 0xda, 0x19, + 0x81, 0x32, 0xbb, 0x96, 0x7e, 0xb9, 0x6e, 0xa1, + 0x43, 0xde, 0x53, 0x66, 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x7c, 0xb4, 0xde, 0xa7, + 0x96, 0x81, 0x12, 0xff, 0x2c, 0xec, 0x5c, 0x03, + 0x2a, 0x8c, 0x76, 0xc4, 0xed, 0x09, 0xe6, 0x00, + 0x28, 0xdb, 0x9b, 0x44, 0xb0, 0xb4, 0x7b, 0x57, + 0x3b, 0xb6, 0x4f, 0x0b, 0xff, 0xf2, 0xf5, 0x02, + 0x56, 0xcf, 0xd5, 0xbf, 0x71, 0xe6, 0x66, 0xf3, + 0x08, 0x8e, 0x8b, 0x15, 0x57, 0x07, 0x41, 0xa3, + 0x91, 0xc1, 0xe4, 0x64, 0x92, 0x89, 0xed, 0x22, + 0x88, 0x8f, 0x17, 0x91, 0xde, 0xea, 0x0c, 0xa6, + 0x86, 0x8e, 0x4c, 0xd9, 0x63, 0xc9, 0xe5, 0xdc, + 0xd6, 0xd3, 0x7b, 0x2b, 0x65, 0xfa, 0x36, 0x47, + 0x20, 0xa4, 0xe7, 0x0b, 0x52, 0xfa, 0xa6, 0xeb, + 0x1d, 0x20, 0xd0, 0x4b, 0xfd, 0x88, 0x8c, 0xbb, + 0x52, 0x9c, 0x2f, 0xb7, 0xba, 0x8b, 0xdd, 0x10, + 0x2d, 0x7d, 0x77, 0x79, 0x40, 0xa7, 0xed, 0xf9, + 0xbd, 0x2a, 0x55, 0x1f, 0x87, 0x1e, 0x3c, 0xfc, +}; + +const struct testvec c3des_cbc_192_1_vectors[] = { + { + .blkno = 0, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t c3des_cbc_192_encblkno8_vec0_ctxt[SECSIZE] = { + 0x9e, 0x5d, 0x35, 0x56, 0xa7, 0xcc, 0xc0, 0x1c, + 0x60, 0x4c, 0x42, 0x90, 0x35, 0xf3, 0xc1, 0x20, + 0xf2, 0x07, 0x6f, 0xf8, 0x7c, 0x33, 0x6a, 0x74, + 0xdc, 0x85, 0xbc, 0x9c, 0xa2, 0x29, 0xc6, 0x69, + 0x0e, 0xef, 0x0f, 0xa9, 0x6e, 0xec, 0xf2, 0x23, + 0x2f, 0x9a, 0xbe, 0x1a, 0x89, 0x22, 0x00, 0xc4, + 0x5a, 0xaf, 0x4a, 0xa0, 0x4f, 0x30, 0x8f, 0x99, + 0xd2, 0x93, 0x6d, 0xfa, 0xcd, 0x2f, 0xad, 0x19, + 0x10, 0x14, 0x90, 0x3a, 0x4b, 0xab, 0x17, 0x2e, + 0x2c, 0xe1, 0x26, 0xe5, 0x76, 0xf1, 0xd1, 0x1d, + 0x4c, 0x77, 0x68, 0xfb, 0x45, 0x9a, 0x3e, 0x19, + 0xe0, 0xfb, 0xdc, 0xd4, 0x0e, 0x29, 0x7c, 0x06, + 0xd3, 0x45, 0xa8, 0xf7, 0x39, 0x91, 0xe6, 0x18, + 0x0f, 0x81, 0xe6, 0x7d, 0x6c, 0x65, 0x2e, 0x16, + 0x24, 0xa4, 0x16, 0x96, 0x0a, 0x7b, 0x5f, 0x3a, + 0x0c, 0xe9, 0x0e, 0x3f, 0x34, 0x38, 0xb0, 0xe1, + 0x39, 0x23, 0x5c, 0x3c, 0x00, 0xb4, 0xa0, 0xf7, + 0x42, 0x18, 0x70, 0x25, 0x82, 0x13, 0x24, 0x49, + 0xbb, 0x3f, 0xfb, 0xef, 0xb6, 0xc6, 0x7f, 0x3d, + 0x8c, 0x17, 0x62, 0x60, 0x6f, 0xd5, 0xda, 0x2c, + 0xf8, 0x85, 0xee, 0xa7, 0xc2, 0x76, 0x5d, 0x34, + 0x4c, 0xe1, 0x0d, 0x36, 0x6e, 0x02, 0xdd, 0x08, + 0x85, 0xe4, 0x90, 0xfe, 0x1f, 0x81, 0x4a, 0x06, + 0xa6, 0x72, 0x81, 0x79, 0x47, 0xd7, 0x6d, 0x92, + 0x8f, 0xb7, 0xb2, 0xfd, 0xd0, 0x60, 0x6c, 0x06, + 0x44, 0xcd, 0x20, 0x28, 0xef, 0x16, 0xc3, 0x01, + 0x19, 0x14, 0x34, 0x39, 0xad, 0x87, 0x9f, 0xde, + 0x76, 0xb9, 0xb9, 0x87, 0x1a, 0xbd, 0x8e, 0x2c, + 0xe6, 0xb3, 0xe7, 0xb6, 0x80, 0xf8, 0xc5, 0x22, + 0x5f, 0x53, 0xed, 0x03, 0xfe, 0x09, 0x2c, 0x9d, + 0xb6, 0x61, 0x4a, 0xbb, 0x07, 0x5d, 0xbd, 0x68, + 0x74, 0xab, 0x02, 0x81, 0x64, 0x7b, 0x97, 0xa3, + 0xad, 0x15, 0x99, 0x7a, 0x04, 0x33, 0xbd, 0x50, + 0x94, 0x11, 0xcc, 0xf7, 0x8b, 0x77, 0x88, 0x78, + 0x80, 0xfe, 0x5f, 0xa1, 0x63, 0xbc, 0xb0, 0x65, + 0xcb, 0x9d, 0x4c, 0xfe, 0x66, 0x4e, 0xff, 0xe3, + 0x43, 0x61, 0x99, 0x88, 0x88, 0x4c, 0xbc, 0x8a, + 0xf1, 0x69, 0x00, 0xc2, 0xe5, 0xb9, 0x65, 0x8b, + 0x10, 0xdf, 0x38, 0x3e, 0x9e, 0x9f, 0x87, 0xed, + 0x84, 0x71, 0xe7, 0xf2, 0xb5, 0xb6, 0x11, 0xed, + 0x1e, 0xd4, 0xc0, 0x6d, 0x77, 0x08, 0x4b, 0xfd, + 0x95, 0xd5, 0xc0, 0xbe, 0xa6, 0xcc, 0x3b, 0xea, + 0x11, 0x38, 0xa5, 0x59, 0x36, 0x2a, 0xf4, 0x98, + 0x52, 0x9d, 0x3b, 0x8c, 0x8a, 0x19, 0xbd, 0xfb, + 0x49, 0xcb, 0xb0, 0x57, 0x91, 0xc7, 0xf8, 0x2a, + 0x89, 0xa8, 0x85, 0x03, 0xdf, 0x6e, 0xad, 0xf4, + 0x8a, 0x88, 0x9a, 0x2b, 0x5d, 0xe8, 0xca, 0xa9, + 0x8f, 0x18, 0xa3, 0x6a, 0x37, 0x84, 0xa9, 0x24, + 0x5b, 0xce, 0xd6, 0xbe, 0x7e, 0x40, 0x86, 0x6a, + 0xc3, 0x47, 0x28, 0x66, 0xf0, 0x8c, 0x2d, 0x69, + 0x22, 0x64, 0x61, 0x36, 0x6a, 0x0c, 0xc4, 0x18, + 0x5f, 0xd7, 0xff, 0xbc, 0xf1, 0x94, 0x16, 0xfb, + 0x26, 0xa7, 0x80, 0xa4, 0x2d, 0x72, 0xc6, 0x9d, + 0xa7, 0xed, 0x04, 0x13, 0x0f, 0xe7, 0xf8, 0x93, + 0x57, 0x6b, 0xd5, 0xa4, 0xad, 0x9a, 0x97, 0xeb, + 0x97, 0xe7, 0x60, 0x01, 0x89, 0x3f, 0x88, 0xf2, + 0xee, 0xf3, 0x79, 0xd6, 0x5a, 0x03, 0x94, 0x07, + 0xd3, 0x33, 0xc8, 0xda, 0x15, 0x17, 0x0a, 0x8f, + 0xbd, 0x58, 0x1b, 0xfe, 0x3d, 0x77, 0x5d, 0x8f, + 0x4e, 0x0e, 0x98, 0x7d, 0x02, 0x63, 0x94, 0x73, + 0x4a, 0x58, 0x47, 0xed, 0x52, 0xfc, 0x85, 0x19, + 0x5d, 0x2f, 0xfa, 0x07, 0x44, 0xbd, 0x8e, 0xcb, + 0x20, 0x63, 0x9d, 0x2b, 0x61, 0x5c, 0x19, 0x71, + 0x80, 0xe5, 0x25, 0x5b, 0x2e, 0xc5, 0xfe, 0x1a, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t c3des_cbc_192_encblkno8_vec1_ctxt[SECSIZE] = { + 0xf4, 0xb0, 0xb0, 0xcb, 0x79, 0xcc, 0x8c, 0x0a, + 0x3b, 0xc7, 0x43, 0x4e, 0x62, 0x9d, 0xde, 0xb4, + 0xab, 0xa5, 0x62, 0x63, 0x32, 0xa7, 0x18, 0x2b, + 0xe3, 0xee, 0x44, 0xc6, 0x6f, 0xb2, 0xdc, 0x21, + 0xc5, 0xc8, 0x9e, 0x32, 0x71, 0x4c, 0x7a, 0x82, + 0x8d, 0xe0, 0xad, 0x91, 0x88, 0x0c, 0x41, 0x83, + 0x28, 0x0d, 0xed, 0xa7, 0xeb, 0x48, 0xb1, 0x31, + 0xfa, 0x40, 0xd9, 0x44, 0x19, 0xee, 0x8d, 0x2c, + 0x7d, 0xe2, 0x39, 0xa0, 0x39, 0xaa, 0x86, 0xab, + 0xb5, 0x68, 0xe5, 0x83, 0x06, 0x61, 0xec, 0xe6, + 0xc2, 0x85, 0xb2, 0x46, 0xf4, 0x5b, 0x0e, 0x34, + 0x7e, 0x0c, 0xa0, 0xda, 0xef, 0x58, 0x9c, 0x39, + 0x95, 0xa2, 0xca, 0xd3, 0x3b, 0x4d, 0x76, 0xe3, + 0x34, 0x6d, 0x08, 0xa4, 0xba, 0x88, 0x58, 0x39, + 0xb4, 0xe4, 0x6b, 0xb6, 0x32, 0x50, 0x2c, 0xe2, + 0x0a, 0x37, 0xbc, 0x98, 0x38, 0x32, 0x17, 0x1b, + 0x12, 0xef, 0xdc, 0x9d, 0x91, 0x09, 0x8e, 0xd8, + 0xc3, 0xf8, 0x7b, 0x35, 0x41, 0x3b, 0xf8, 0xf5, + 0x37, 0x48, 0x04, 0xf7, 0x94, 0xbf, 0x54, 0x8d, + 0x79, 0x49, 0x8f, 0xf0, 0x3f, 0xb7, 0x90, 0x76, + 0x14, 0x09, 0xc6, 0x8c, 0xba, 0x1a, 0x30, 0x1b, + 0xbb, 0xd9, 0xe2, 0xb5, 0xe8, 0xd9, 0x9b, 0x68, + 0x60, 0x90, 0xd3, 0x4a, 0xe8, 0x65, 0x7b, 0xaa, + 0xb0, 0xda, 0x69, 0x1d, 0x45, 0x78, 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0x48, 0x43, 0x84, 0xec, 0x79, 0xc8, + 0x7f, 0x4f, 0xa8, 0xc0, 0xb4, 0xde, 0x8b, 0x79, + 0xcb, 0x9c, 0x42, 0x81, 0x49, 0xdc, 0x39, 0xb5, + 0x31, 0xa6, 0x22, 0xba, 0x71, 0xb8, 0x2d, 0x1d, + 0xc8, 0x17, 0xd8, 0x9d, 0x26, 0x2b, 0xd5, 0xcf, + 0x57, 0x46, 0x0a, 0x61, 0x7e, 0xb7, 0xc3, 0x9c, + 0xa6, 0x44, 0x60, 0x2d, 0x30, 0xb8, 0x10, 0x47, + 0x7d, 0x7e, 0x87, 0x76, 0xc1, 0x4e, 0x85, 0x77, + 0xbc, 0x30, 0x32, 0x56, 0x0a, 0x5b, 0x1c, 0xd0, + 0xf6, 0x47, 0x48, 0x22, 0xf4, 0x6e, 0x38, 0xc5, + 0xab, 0xe2, 0xd0, 0x4d, 0x40, 0x27, 0xab, 0x8f, + 0x43, 0xb1, 0x60, 0x29, 0x07, 0xd0, 0xf5, 0x25, + 0xe5, 0xfa, 0xe7, 0x46, 0x32, 0x37, 0xb9, 0xae, + 0x2e, 0x02, 0x8c, 0x94, 0x15, 0x69, 0xd6, 0x74, + 0xb4, 0x36, 0xdd, 0x94, 0x70, 0xa7, 0x16, 0x7b, + 0x4c, 0xd3, 0x48, 0x83, 0xc5, 0xb2, 0xb0, 0x6a, + 0xfe, 0x7e, 0xd4, 0xe5, 0x6d, 0xa5, 0x96, 0x20, + 0x08, 0x59, 0xbd, 0x0c, 0x3d, 0x55, 0xa5, 0x03, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t c3des_cbc_192_encblkno8_vec2_ctxt[SECSIZE] = { + 0xea, 0x7c, 0x8c, 0x8e, 0x3e, 0x61, 0x34, 0x3d, + 0xe0, 0x7f, 0xd3, 0xe1, 0x3a, 0xb9, 0xc8, 0xf2, + 0x98, 0xdc, 0x59, 0x26, 0xd2, 0xd8, 0xa7, 0x7f, + 0x41, 0x98, 0x24, 0xa8, 0x28, 0x0c, 0x88, 0x55, + 0x91, 0xdb, 0x29, 0x17, 0x70, 0xd7, 0x03, 0xff, + 0xbd, 0x0e, 0xbf, 0xf8, 0x73, 0x92, 0x19, 0xe9, + 0x92, 0x67, 0xdb, 0x08, 0x94, 0x77, 0x71, 0x2d, + 0x00, 0xad, 0x26, 0x42, 0x2d, 0xac, 0x8c, 0x67, + 0x6f, 0xb3, 0x8e, 0x36, 0x22, 0xeb, 0x1f, 0x8c, + 0xd4, 0x9b, 0x9f, 0xa6, 0xa9, 0xb1, 0x52, 0x65, + 0x9a, 0xfe, 0xcc, 0x92, 0x48, 0x75, 0xf6, 0xb8, + 0x59, 0xfe, 0x0e, 0x67, 0x93, 0xce, 0x3b, 0x7e, + 0x51, 0x74, 0xe5, 0x24, 0x35, 0x08, 0x68, 0x21, + 0x6a, 0x7f, 0xdd, 0x8c, 0xfd, 0xcd, 0x6d, 0x90, + 0xc5, 0x3b, 0x26, 0x9e, 0x00, 0xf4, 0x1e, 0x70, + 0xd3, 0xe7, 0xe8, 0x2f, 0x52, 0x87, 0x76, 0x84, + 0xbb, 0x5c, 0x76, 0x5a, 0xc8, 0xea, 0x74, 0xe2, + 0x9e, 0x85, 0xf6, 0x53, 0x85, 0x1a, 0x6e, 0x02, + 0x0d, 0x32, 0x11, 0xc4, 0xec, 0xee, 0x79, 0x27, + 0xda, 0xca, 0xc0, 0x0b, 0x8e, 0x2d, 0xb7, 0x7d, + 0x8c, 0x6e, 0xfb, 0xa3, 0xa8, 0x24, 0x24, 0x62, + 0xc8, 0xdd, 0xc7, 0x16, 0x09, 0x33, 0x0f, 0xe5, + 0xc8, 0x60, 0x3d, 0xb6, 0xbf, 0x6c, 0x28, 0xd2, + 0x0b, 0x9c, 0xd9, 0xcb, 0x64, 0x49, 0xe4, 0x80, + 0x72, 0x58, 0xaa, 0xaa, 0x7e, 0x1d, 0x9f, 0xd7, + 0x29, 0x15, 0x65, 0xfc, 0xfd, 0x3f, 0xe1, 0x82, + 0x25, 0x3c, 0xd4, 0xbe, 0x59, 0x79, 0x63, 0xd1, + 0xd6, 0x0e, 0xda, 0x00, 0xf3, 0xaa, 0x13, 0xd3, + 0xed, 0xef, 0xca, 0x8b, 0x97, 0x15, 0x2d, 0x10, + 0x6f, 0xcf, 0xee, 0xc7, 0x21, 0xad, 0xe3, 0xe4, + 0xd8, 0x95, 0x21, 0x1f, 0xc0, 0x06, 0x3a, 0xbc, + 0xbb, 0x2a, 0x92, 0x78, 0x76, 0x9d, 0x1e, 0x7b, + 0xb5, 0x29, 0xaf, 0x96, 0x75, 0x2b, 0x41, 0xbd, + 0xae, 0x79, 0x28, 0x72, 0xe7, 0x54, 0xc4, 0x08, + 0xd3, 0xd2, 0xac, 0x96, 0xd0, 0x0f, 0x9b, 0x68, + 0x7d, 0x3f, 0xc2, 0xdd, 0x3d, 0xfc, 0xca, 0xcd, + 0x11, 0x71, 0xd9, 0x48, 0x53, 0x9f, 0xd3, 0x79, + 0x7d, 0x47, 0x71, 0x2a, 0x6d, 0x9e, 0xa9, 0x47, + 0xa1, 0xf7, 0x97, 0x80, 0x83, 0x70, 0x6b, 0xfe, + 0x10, 0x11, 0x6a, 0x0e, 0xdd, 0xde, 0x22, 0x3c, + 0x19, 0x30, 0x73, 0x73, 0x2e, 0x4b, 0x54, 0x17, + 0xc3, 0x2e, 0xe9, 0xce, 0xe0, 0xe3, 0xa0, 0x1a, + 0x28, 0xd1, 0x50, 0xa8, 0xd2, 0x40, 0xe2, 0x1b, + 0xfa, 0x49, 0x06, 0x49, 0x8b, 0x4b, 0xd9, 0xd5, + 0xf5, 0x50, 0xae, 0x64, 0x19, 0xe1, 0xd9, 0x4e, + 0xbb, 0x29, 0x70, 0x66, 0x46, 0xa8, 0x7e, 0x5b, + 0xdc, 0xe2, 0xd5, 0x9d, 0x56, 0x6d, 0x4c, 0xe6, + 0x0e, 0x6b, 0x71, 0x40, 0x82, 0xf7, 0xb3, 0xad, + 0x23, 0x17, 0xe3, 0x1c, 0x61, 0x1d, 0x3b, 0x71, + 0xfc, 0x06, 0x17, 0xec, 0x6c, 0x77, 0x98, 0x27, + 0xc7, 0x4b, 0x65, 0x17, 0x81, 0xe7, 0xcb, 0xce, + 0x09, 0x76, 0x82, 0x82, 0x4a, 0x53, 0x67, 0xa0, + 0x05, 0x25, 0x4c, 0xc4, 0xa7, 0xad, 0xa7, 0xaf, + 0xa0, 0x11, 0xd7, 0x73, 0x3b, 0x30, 0xbf, 0x53, + 0x50, 0x9b, 0xd8, 0xf3, 0x32, 0x15, 0xdd, 0x36, + 0x88, 0xc2, 0x39, 0x51, 0xb6, 0xb8, 0x0d, 0x5c, + 0x20, 0x4e, 0x24, 0xee, 0x95, 0x32, 0x61, 0x25, + 0xda, 0x73, 0x0d, 0x8a, 0x58, 0xe6, 0xcc, 0xad, + 0x79, 0x3d, 0xef, 0x29, 0x0c, 0x9f, 0xe1, 0xa7, + 0x22, 0x1e, 0xea, 0x7a, 0x4f, 0xfb, 0xc1, 0x1f, + 0x17, 0xca, 0x69, 0xd6, 0xa4, 0xce, 0x6e, 0xc0, + 0x70, 0xa3, 0x08, 0x32, 0x87, 0xb4, 0x6b, 0x80, + 0x5c, 0x7f, 0x88, 0x5c, 0xbf, 0x07, 0xd8, 0xe9, + 0xdd, 0xd2, 0x76, 0xa9, 0xaa, 0xd9, 0x55, 0x48, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t c3des_cbc_192_encblkno8_vec3_ctxt[SECSIZE] = { + 0xf3, 0x49, 0xda, 0x5c, 0xde, 0x9d, 0x3e, 0x9d, + 0xb9, 0xc2, 0x6e, 0x96, 0xa9, 0x93, 0x10, 0x73, + 0x0e, 0x26, 0x39, 0xd6, 0x9f, 0x04, 0x5f, 0x69, + 0x54, 0xa3, 0x7c, 0x46, 0x7b, 0x18, 0x93, 0xc0, + 0xbb, 0x0c, 0x96, 0x6f, 0xb0, 0xbf, 0xce, 0x67, + 0x33, 0x3e, 0x56, 0xe8, 0x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 0xf3, 0x73, 0xce, 0xac, 0x76, 0xdf, 0x75, 0x2a, + 0x3e, 0x8f, 0x47, 0xff, 0x76, 0xfe, 0xea, 0xd4, + 0x4a, 0xa9, 0x36, 0x9d, 0x12, 0x45, 0xb7, 0x99, + 0x81, 0xb6, 0x77, 0x98, 0x13, 0xfb, 0x5a, 0xe5, + 0x40, 0x87, 0x61, 0x0d, 0x10, 0x76, 0xf6, 0x3e, + 0x48, 0xac, 0xc4, 0x27, 0x87, 0xcd, 0x07, 0xde, + 0x0b, 0x23, 0x97, 0x61, 0x3d, 0x18, 0x64, 0x7f, + 0xbf, 0xd6, 0x87, 0xc1, 0x11, 0xfb, 0xf9, 0xda, + 0x14, 0xa1, 0x01, 0xf8, 0x7e, 0xea, 0x5b, 0x5b, + 0xdd, 0x09, 0xf9, 0x31, 0x80, 0x3c, 0xee, 0x34, + 0x2d, 0xda, 0x71, 0xd9, 0x32, 0x7d, 0x45, 0xb2, + 0x53, 0xea, 0xd5, 0x7c, 0x85, 0x45, 0xce, 0x1d, + 0x2b, 0xe9, 0xd7, 0x95, 0xf8, 0x8c, 0x08, 0xe4, + 0xd0, 0x2f, 0x60, 0x75, 0x02, 0xf3, 0xde, 0xeb, + 0x46, 0x40, 0xa8, 0xd2, 0x37, 0xd6, 0xca, 0x5d, + 0xb9, 0xf4, 0x51, 0x31, 0x8a, 0x1a, 0x82, 0xbd, + 0x6f, 0x6d, 0x88, 0x2b, 0x63, 0x0f, 0xe1, 0xf0, + 0xcf, 0x13, 0x79, 0x1d, 0x78, 0x82, 0x66, 0xa1, + 0xef, 0xdb, 0x34, 0x50, 0xd2, 0x71, 0x47, 0x49, + 0x41, 0x74, 0xd9, 0x0b, 0x14, 0x38, 0x1f, 0xc3, + 0x09, 0x4d, 0xb3, 0xa6, 0x03, 0x3f, 0x56, 0x67, + 0xd7, 0x51, 0x4c, 0x8a, 0x1d, 0x37, 0x99, 0xfb, + 0xe1, 0x84, 0x57, 0x55, 0x9b, 0xf8, 0x73, 0x63, + 0x68, 0x73, 0x89, 0x52, 0x06, 0xe7, 0x34, 0xe7, + 0x1a, 0x15, 0x7e, 0xd9, 0x84, 0xa3, 0x0e, 0x68, + 0x14, 0x1c, 0xe8, 0x23, 0x9e, 0xe3, 0x8f, 0x71, + 0x02, 0x9b, 0x87, 0xd4, 0xd9, 0x1b, 0xd1, 0x9e, + 0x9e, 0xa0, 0x7e, 0x49, 0x8e, 0xaa, 0x89, 0xb5, + 0x16, 0x48, 0x07, 0xb3, 0x3d, 0x9e, 0x4c, 0x35, + 0x3e, 0x94, 0xa9, 0xf8, 0x82, 0x50, 0x6a, 0x41, + 0x28, 0x3e, 0x9f, 0x9a, 0x1a, 0x5d, 0x02, 0x7c, + 0xd0, 0x32, 0x52, 0xa5, 0xee, 0x09, 0x27, 0x2d, + 0x49, 0x17, 0xf7, 0x92, 0xa1, 0x63, 0x9d, 0x2a, + 0xfd, 0x53, 0x26, 0x14, 0x7c, 0x92, 0x72, 0xa6, + 0x38, 0x18, 0x8f, 0xb5, 0x54, 0xb3, 0x69, 0x63, + 0x6a, 0xdc, 0xb1, 0x5a, 0x12, 0x7a, 0x0b, 0xa3, +}; + +const struct testvec c3des_cbc_192_8_vectors[] = { + { + .blkno = 0, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = c3des_cbc_ptxt, + .ctxt = c3des_cbc_192_encblkno8_vec3_ctxt, + }, +}; + +static int +open_disk(const char *devpath, const char *imgpath, size_t size) +{ + int fd; + + fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600); + if (fd < 0) + return -1; + + if (ftruncate(fd, size) < 0) + goto fail; + + if (rump_pub_etfs_register_withsize(devpath, + imgpath, RUMP_ETFS_BLK, 0, size) < 0) { + goto fail; + } + + unlink(imgpath); + return fd; +fail: + close(fd); + unlink(imgpath); + return -1; +} + +static int +open_cgd(int devno) +{ + char devpath[32]; + + sprintf(devpath, "/dev/rcgd%d%c", devno, getrawpartition() + 'a'); + + return rump_sys_open(devpath, O_RDWR, 0); +} + +static int +configure_cgd(int fd, const char *dkpath, const char *alg, + const char *ivmethod, const char *key, size_t keylen) +{ + struct cgd_ioctl ci; + + memset(&ci, 0, sizeof(ci)); + ci.ci_disk = dkpath; + ci.ci_alg = alg; + ci.ci_ivmethod = ivmethod; + ci.ci_keylen = 8 * keylen - 8; /* Exclude the NUL terminator. */ + ci.ci_key = key; + ci.ci_blocksize = 64; + + return rump_sys_ioctl(fd, CGDIOCSET, &ci); +} + +static int +unconfigure_cgd(int fd) +{ + struct cgd_ioctl ci; + + return rump_sys_ioctl(fd, CGDIOCCLR, &ci); +} + +static int +write_testvec(int cgdfd, const struct testvec *tv) +{ + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + return -1; + + if (rump_sys_write(cgdfd, tv->ptxt, SECSIZE) != SECSIZE) + return -1; + + return 0; +} + +static int +read_testvec(int cgdfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ptxt, SECSIZE); +fail: + free(buf); + return res; +} + +static int +check_testvec(int dkfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (read(dkfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ctxt, SECSIZE); +fail: + free(buf); + return res; +} + +ATF_TC(cgd_3des_cbc_192_encblkno1); +ATF_TC_HEAD(cgd_3des_cbc_192_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test 3des-cbc with 192 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_3des_cbc_192_encblkno1, tc) +{ + const char imgpath[] = "3des-cbc-192-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "3des-cbc", "encblkno1", + c3des_cbc_192_key, sizeof(c3des_cbc_192_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_1_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_1_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_1_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "3des-cbc", "encblkno1", + c3des_cbc_192_key, sizeof(c3des_cbc_192_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_3des_cbc_192_encblkno8); +ATF_TC_HEAD(cgd_3des_cbc_192_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test 3des-cbc with 192 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_3des_cbc_192_encblkno8, tc) +{ + const char imgpath[] = "3des-cbc-192-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "3des-cbc", "encblkno8", + c3des_cbc_192_key, sizeof(c3des_cbc_192_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_8_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_8_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_8_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &c3des_cbc_192_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "3des-cbc", "encblkno8", + c3des_cbc_192_key, sizeof(c3des_cbc_192_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &c3des_cbc_192_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &c3des_cbc_192_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, cgd_3des_cbc_192_encblkno1); + ATF_TP_ADD_TC(tp, cgd_3des_cbc_192_encblkno8); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c b/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c new file mode 100644 index 0000000..9416333 --- /dev/null +++ b/contrib/netbsd-tests/dev/cgd/t_cgd_aes.c @@ -0,0 +1,3606 @@ +/* $NetBSD: t_cgd_aes.c,v 1.5 2016/12/11 00:23:44 alnsn Exp $ */ +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * Copyright (c) 2007 The Institute of Electrical and Electronics Engineers, Inc + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Alexander Nasonov. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/sysctl.h> + +#include <atf-c.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <util.h> + +#include <dev/cgdvar.h> + +#include <rump/rump.h> +#include <rump/rump_syscalls.h> + +#include "../../h_macros.h" + +#define SECSIZE 512 + +struct testvec { + unsigned int blkno; + const uint8_t *ptxt; /* PlainText */ + const uint8_t *ctxt; /* CipherText */ +}; + +/* + * 128 bits CBC key, NUL terminated. + */ +static const char aes_cbc_128_key[17] = { + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */ + 0 +}; + +/* + * 192 bits CBC key, NUL terminated. + */ +static const char aes_cbc_192_key[25] = { + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, /* ABCDEFGH */ + 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, /* IJKLMNOP */ + 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* QRSTUVWX */ + 0 +}; + +/* + * 256 bits CBC key, NUL terminated. + */ +static const char aes_cbc_256_key[33] = { + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, /* 89abcdef */ + 0 +}; + +static const uint8_t aes_cbc_ptxt[SECSIZE] = + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop"; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t aes_cbc_128_encblkno1_vec0_ctxt[SECSIZE] = { + 0x1e, 0x95, 0x12, 0x15, 0xf6, 0xe0, 0xa7, 0x56, + 0x95, 0xa0, 0xa7, 0x35, 0x77, 0xf4, 0xdd, 0xdc, + 0x37, 0xc0, 0x28, 0x20, 0x00, 0x79, 0xa0, 0x35, + 0xe0, 0x83, 0x23, 0x95, 0x4e, 0xea, 0x8d, 0xa2, + 0x11, 0xbf, 0x9a, 0xd5, 0x21, 0x1e, 0x15, 0xb9, + 0xd1, 0x2e, 0xd2, 0xd9, 0xa5, 0xcc, 0x26, 0x75, + 0xba, 0x3e, 0x30, 0x11, 0xb2, 0x40, 0xdd, 0x1d, + 0x07, 0x3b, 0xe6, 0x00, 0xa7, 0x31, 0x9e, 0x58, + 0x41, 0xf3, 0x02, 0xf5, 0xad, 0x35, 0x79, 0x9a, + 0x9e, 0x03, 0xc8, 0x7a, 0x9d, 0x1d, 0x58, 0x9f, + 0x98, 0x67, 0xe2, 0x49, 0x81, 0x0c, 0x23, 0x90, + 0xd8, 0xc6, 0xf0, 0xc5, 0x73, 0x46, 0xd5, 0x14, + 0x1d, 0x78, 0x24, 0x7c, 0x9f, 0x5c, 0x8c, 0xe6, + 0x5d, 0x85, 0x7a, 0x5f, 0x76, 0xcc, 0xd8, 0xe9, + 0x03, 0xff, 0xfd, 0xd4, 0x12, 0x3f, 0xcb, 0xb0, + 0xfe, 0xfd, 0x86, 0x00, 0x0c, 0xe3, 0xdd, 0xa6, + 0x89, 0x92, 0xfe, 0xc8, 0x07, 0x5a, 0x94, 0x55, + 0x75, 0xae, 0x68, 0x47, 0xba, 0x84, 0x75, 0x58, + 0x33, 0x30, 0x2c, 0x16, 0x5b, 0xe9, 0x3f, 0x2a, + 0x09, 0xf9, 0x69, 0x23, 0x77, 0xd7, 0x2b, 0x95, + 0x4b, 0x78, 0x59, 0xcc, 0xfa, 0xf5, 0x79, 0xd2, + 0x05, 0x87, 0x66, 0x57, 0x93, 0xbf, 0x05, 0x90, + 0x4d, 0x6d, 0xd2, 0x72, 0x92, 0x24, 0xec, 0x14, + 0xe7, 0xbf, 0x82, 0x57, 0xbb, 0x14, 0x51, 0xe6, + 0xce, 0x3f, 0xa1, 0xfc, 0x63, 0x75, 0xee, 0xde, + 0xf9, 0x31, 0xd3, 0xa0, 0x07, 0xcd, 0x4d, 0x8f, + 0x83, 0x7d, 0x65, 0xe1, 0xc6, 0x60, 0x9e, 0x5c, + 0x51, 0x76, 0xfa, 0x64, 0xdf, 0xdc, 0xaf, 0x38, + 0xee, 0xe9, 0x8f, 0x4b, 0xa0, 0x3a, 0x21, 0xdf, + 0x58, 0x3b, 0x73, 0xf5, 0x30, 0xbb, 0x29, 0xe0, + 0xff, 0x60, 0xf0, 0x05, 0x5e, 0x37, 0xbc, 0x78, + 0x95, 0x3f, 0xa8, 0xd4, 0xb4, 0x82, 0x0d, 0xe1, + 0x10, 0xe3, 0xa7, 0x61, 0x37, 0x58, 0x28, 0x14, + 0x22, 0x57, 0x32, 0x28, 0x80, 0x98, 0x3e, 0x5f, + 0x71, 0xcf, 0x34, 0xb8, 0x6d, 0x6b, 0xc0, 0x23, + 0xc1, 0x9e, 0x58, 0x4f, 0xd5, 0xa4, 0x14, 0x03, + 0x2a, 0xed, 0xc4, 0xa7, 0x77, 0x7c, 0x4f, 0x94, + 0x91, 0x1d, 0x47, 0x34, 0x82, 0xe8, 0x9d, 0x32, + 0x5c, 0xc7, 0x38, 0xe9, 0x92, 0xcd, 0x35, 0xfd, + 0x1c, 0xcc, 0x3c, 0x28, 0x75, 0x6f, 0xff, 0xd5, + 0xe8, 0xbf, 0x90, 0x92, 0x34, 0x13, 0x11, 0x89, + 0xe0, 0xa2, 0x25, 0xeb, 0x82, 0x63, 0x31, 0x80, + 0x50, 0x6c, 0x99, 0xaa, 0x97, 0x0e, 0x59, 0x45, + 0x64, 0xb8, 0x77, 0x78, 0x6b, 0x24, 0xac, 0xc0, + 0xc9, 0xa9, 0xbc, 0x13, 0xd1, 0x5e, 0x50, 0x9a, + 0x91, 0x1a, 0x08, 0xf7, 0xc5, 0x18, 0x9f, 0x87, + 0x97, 0x9c, 0x0a, 0x27, 0xf1, 0x66, 0xf8, 0x09, + 0x52, 0x09, 0x41, 0x07, 0xc1, 0xa1, 0x91, 0xa4, + 0x59, 0x09, 0x75, 0x57, 0x5b, 0x53, 0x79, 0x58, + 0xa2, 0x9e, 0x49, 0xa2, 0x5e, 0xf7, 0x28, 0x1c, + 0x43, 0xa6, 0xcb, 0x88, 0x46, 0x84, 0xc9, 0x7f, + 0x84, 0xdb, 0x45, 0x0c, 0xb3, 0x7f, 0x01, 0x40, + 0x71, 0x3e, 0x48, 0x12, 0x1f, 0xbc, 0x1e, 0xdf, + 0x41, 0x50, 0xb2, 0x11, 0x67, 0x83, 0x19, 0x04, + 0x0e, 0x21, 0xd5, 0xf2, 0x54, 0x99, 0xfb, 0x47, + 0xf2, 0x5e, 0x02, 0x4b, 0x61, 0x6d, 0xef, 0x78, + 0x29, 0xe4, 0x3a, 0x56, 0x14, 0x20, 0x6f, 0x70, + 0x82, 0xea, 0x5d, 0xbc, 0x48, 0x89, 0x34, 0x69, + 0xdb, 0x4a, 0x06, 0xa7, 0xd6, 0xc7, 0xb7, 0x06, + 0x8e, 0x64, 0x21, 0x3e, 0xa6, 0x32, 0x61, 0x59, + 0x03, 0xea, 0xc3, 0x71, 0xf0, 0x26, 0x02, 0xe0, + 0x71, 0x95, 0x38, 0x11, 0x32, 0xe6, 0x3b, 0x25, + 0x53, 0x14, 0x24, 0x34, 0xe8, 0x8c, 0xa8, 0xef, + 0x52, 0xfe, 0x06, 0x2c, 0x20, 0x88, 0x4f, 0xa6, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t aes_cbc_128_encblkno1_vec1_ctxt[SECSIZE] = { + 0x2f, 0x69, 0x3e, 0x95, 0x87, 0x91, 0x99, 0xd4, + 0xd9, 0x5d, 0xf2, 0x52, 0x32, 0x54, 0x2a, 0x80, + 0xa0, 0x77, 0x6e, 0x73, 0x15, 0xb4, 0xc9, 0x13, + 0x85, 0xed, 0x79, 0x9b, 0x84, 0x0a, 0x7e, 0xdb, + 0xee, 0x09, 0x78, 0x11, 0x28, 0xd5, 0x26, 0xec, + 0x1d, 0x52, 0xba, 0x33, 0x26, 0xeb, 0x91, 0xc6, + 0x4b, 0xf0, 0x38, 0xdf, 0x9f, 0x9d, 0x6c, 0xd8, + 0x49, 0x83, 0x88, 0xbe, 0x62, 0x2d, 0x5e, 0x88, + 0xc0, 0x35, 0xe4, 0xc3, 0xc9, 0x9f, 0x62, 0x59, + 0x16, 0xa7, 0x2e, 0xc0, 0xda, 0x3c, 0x2e, 0x10, + 0x53, 0xf0, 0x84, 0x27, 0x38, 0xd0, 0xf4, 0xb5, + 0x7c, 0x4a, 0x63, 0x04, 0x51, 0x22, 0xae, 0xf3, + 0xe7, 0x97, 0x53, 0xee, 0xe6, 0xaf, 0xc3, 0x49, + 0x3a, 0x5a, 0x74, 0x83, 0x18, 0xa3, 0x6b, 0xf3, + 0x6a, 0x3b, 0xe2, 0x1b, 0xd4, 0x64, 0x41, 0xdf, + 0xd1, 0xd2, 0xdd, 0x22, 0xa8, 0x66, 0xbd, 0x8e,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 0x9a, 0x9c, 0x37, 0x3d, 0xbf, + 0xd3, 0xab, 0xd7, 0x70, 0x03, 0x28, 0x5c, 0x3b, + 0xb7, 0x08, 0x38, 0x3d, 0x69, 0xa9, 0xcb, 0x63, + 0x04, 0x95, 0x8a, 0x16, 0x4c, 0xff, 0x9f, 0x0c, + 0xe2, 0x51, 0x95, 0x44, 0x52, 0x3b, 0x59, 0x9d, + 0x0b, 0x77, 0xa0, 0x39, 0x40, 0xea, 0x33, 0x25, + 0xc8, 0xc5, 0x90, 0x47, 0x23, 0xe3, 0x03, 0x8c, + 0x6a, 0xe0, 0x4f, 0x76, 0xe7, 0x72, 0x82, 0xcc, + 0xb2, 0xfd, 0xfb, 0x82, 0x1a, 0x28, 0x30, 0x89, + 0x0e, 0x25, 0xa7, 0x63, 0x85, 0x2e, 0x9b, 0xa6, + 0x0b, 0xa0, 0xb5, 0x34, 0xa2, 0x2e, 0x7f, 0xd4, + 0xe5, 0xd6, 0x95, 0xe8, 0x09, 0x3d, 0x4d, 0xdf, + 0xd9, 0xc0, 0x63, 0x17, 0xa5, 0x9c, 0xf6, 0xa3, + 0x59, 0x17, 0xc0, 0xf8, 0xa2, 0x11, 0x14, 0x88, + 0xf0, 0x1e, 0x4a, 0x4b, 0x13, 0xf6, 0xd6, 0x09, + 0xac, 0xf8, 0x39, 0x5d, 0x4c, 0x68, 0x69, 0x99, + 0x08, 0xd4, 0xf5, 0x39, 0x6d, 0x78, 0xde, 0xb5, + 0x6f, 0x34, 0xc4, 0x28, 0x73, 0x6c, 0x29, 0xa1, + 0xef, 0xfe, 0xed, 0x56, 0xb2, 0x70, 0x7b, 0xd5, + 0x5b, 0xd1, 0x09, 0x6a, 0x9a, 0x59, 0xe9, 0x79, + 0xe9, 0xee, 0xa4, 0x03, 0xc1, 0x67, 0xce, 0x62, + 0xf6, 0x4f, 0x04, 0xa5, 0x04, 0x71, 0x13, 0xeb, + 0x3d, 0x0a, 0x65, 0x2f, 0x57, 0xb0, 0xc0, 0xa4, + 0xf2, 0x8d, 0x78, 0x90, 0xeb, 0xc9, 0x5e, 0x8b, + 0xd8, 0xfb, 0xbc, 0x74, 0x1a, 0x70, 0x94, 0x2c, + 0xeb, 0xf2, 0x5e, 0x6d, 0xbb, 0x96, 0x7a, 0x2c, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t aes_cbc_128_encblkno1_vec2_ctxt[SECSIZE] = { + 0xbc, 0x49, 0x35, 0x2c, 0xe3, 0x10, 0x12, 0x65, + 0x7a, 0xf4, 0xde, 0xd3, 0xf8, 0xe1, 0x49, 0x97, + 0x0a, 0x07, 0x93, 0x6c, 0xf8, 0x0e, 0xb7, 0xdf, + 0x53, 0xba, 0x1e, 0x8e, 0x14, 0xbd, 0xf6, 0x81, + 0xd6, 0xf6, 0x3d, 0xb2, 0xe7, 0x6a, 0x9d, 0x50, + 0x68, 0xc2, 0x75, 0x8e, 0xfb, 0x44, 0xfa, 0xc8, + 0x9f, 0x30, 0x15, 0xd5, 0xbe, 0xce, 0x04, 0xc1, + 0x99, 0xde, 0x3d, 0x2b, 0xc1, 0xc4, 0x8a, 0xb1, + 0xc5, 0x54, 0x47, 0x52, 0xf6, 0x38, 0x11, 0xcb, + 0x11, 0xf6, 0xb7, 0xbd, 0x4d, 0x24, 0xa1, 0xac, + 0x04, 0x17, 0x7e, 0x3c, 0xbc, 0x3b, 0xa0, 0x8d, + 0xfb, 0x22, 0x82, 0x56, 0xa2, 0xbe, 0xfe, 0xe7, + 0xde, 0xa4, 0xe9, 0xeb, 0xa0, 0x7a, 0x45, 0xc9, + 0x18, 0x0b, 0x14, 0xd5, 0xff, 0x4c, 0xe5, 0x86, + 0xac, 0xac, 0xaa, 0xb4, 0x70, 0x0c, 0x4a, 0x20, + 0xb6, 0xd8, 0x2d, 0xac, 0x09, 0xd8, 0xf6, 0x24, + 0xdf, 0xa5, 0x62, 0xef, 0x8c, 0x01, 0xa8, 0x1d, + 0x8f, 0x52, 0xee, 0xa6, 0x2f, 0x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f5, 0x27, 0x48, 0xe4, 0x31, 0x0f, 0xc5, 0xdf, + 0x29, 0x56, 0xed, 0x62, 0xf3, 0xef, 0xca, 0xa6, + 0x58, 0xd1, 0x84, 0x99, 0xd3, 0x34, 0x67, 0x92, + 0x6a, 0xb2, 0xd1, 0xd1, 0x50, 0x1f, 0xe9, 0xd8, + 0x3c, 0xbe, 0x12, 0x97, 0x7c, 0x4f, 0xc0, 0xbe, + 0x91, 0x32, 0x15, 0xd5, 0xf2, 0x5e, 0xe6, 0x13, + 0x86, 0xfa, 0xc6, 0xde, 0xd8, 0xe1, 0x70, 0xb4, + 0xf7, 0x5b, 0x9f, 0x79, 0x55, 0x22, 0x7a, 0xe1, + 0x54, 0x40, 0x39, 0x11, 0xe1, 0x78, 0x01, 0x01, + 0xc0, 0x44, 0xeb, 0x92, 0xb9, 0x01, 0xdd, 0x56, + 0xb9, 0x7e, 0xa0, 0x50, 0x41, 0x58, 0xb2, 0x13, + 0x12, 0x44, 0xd2, 0x39, 0xf2, 0x76, 0x3c, 0x53, + 0x36, 0xfe, 0x17, 0x74, 0x91, 0x8d, 0xbe, 0xc5, + 0x40, 0xf7, 0xa2, 0xe9, 0x65, 0xd9, 0xdf, 0x80, + 0x7b, 0xd9, 0xc3, 0x1f, 0xb4, 0xfc, 0x9f, 0x8d, + 0x7a, 0x4e, 0x1e, 0x32, 0x6d, 0xb1, 0x82, 0x1e, + 0x0c, 0xb6, 0x0b, 0xe6, 0x15, 0x82, 0x5c, 0xcc, + 0xc8, 0x4a, 0x73, 0x56, 0x9d, 0x11, 0xfa, 0xcd, + 0x21, 0x95, 0x23, 0x71, 0xe8, 0xfe, 0x06, 0x43, + 0xf6, 0x17, 0x51, 0x28, 0x0d, 0xfb, 0x0a, 0x49, + 0x1b, 0x35, 0x1e, 0x4a, 0x38, 0x08, 0x6b, 0xcd, + 0x67, 0x21, 0x94, 0x09, 0x28, 0xca, 0x0a, 0x18, + 0xdf, 0x6c, 0x86, 0x47, 0x10, 0x29, 0x81, 0x9a, + 0x73, 0xba, 0x78, 0xbd, 0xc0, 0x61, 0xee, 0x23, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t aes_cbc_128_encblkno1_vec3_ctxt[SECSIZE] = { + 0x29, 0x9f, 0xb1, 0x0f, 0x7d, 0xb4, 0xd9, 0xbb, + 0xf9, 0x06, 0x60, 0xdc, 0xb9, 0xeb, 0x73, 0x6e, + 0xfe, 0xdb, 0x99, 0x29, 0xe8, 0x42, 0x46, 0xe7, + 0x49, 0xcf, 0x90, 0x2d, 0x08, 0xd7, 0xd5, 0xbf, + 0x0f, 0x4f, 0x66, 0xce, 0xcd, 0xb1, 0x8a, 0xc7, + 0x47, 0xc9, 0x8e, 0xe3, 0x9f, 0x80, 0x79, 0xc6, + 0xa8, 0xe5, 0x20, 0x66, 0x58, 0xde, 0xab, 0x87, + 0x5e, 0x7e, 0xcd, 0x55, 0x81, 0x09, 0x40, 0xd9, + 0x8b, 0x7e, 0xd3, 0xf9, 0x16, 0x55, 0x72, 0x7d, + 0xe8, 0x36, 0x76, 0x06, 0x77, 0x47, 0xa5, 0xdc, + 0x80, 0x33, 0x7d, 0x88, 0x5f, 0x56, 0x48, 0x0f, + 0x66, 0xb5, 0x91, 0x9d, 0xf8, 0xdb, 0x83, 0x0d, + 0xd4, 0xc6, 0x13, 0xfc, 0xd4, 0xe5, 0x34, 0x81, + 0x70, 0x4d, 0x96, 0x82, 0x5d, 0xb2, 0x36, 0x37, + 0xdf, 0xd2, 0x5e, 0x31, 0xf0, 0x9d, 0x6d, 0xb7, + 0xf9, 0x2d, 0xcb, 0x77, 0xb8, 0x59, 0xa0, 0xbb, + 0x4f, 0x8d, 0xa0, 0xd1, 0x49, 0x17, 0x93, 0x3c, + 0xf0, 0x4e, 0x72, 0xdd, 0x99, 0x9a, 0x87, 0xf1, + 0x01, 0x89, 0xdf, 0xef, 0xed, 0x04, 0x86, 0x3d, + 0x9b, 0xab, 0x6c, 0xa7, 0xef, 0x1b, 0xbb, 0x24, + 0xbc, 0x65, 0x01, 0x06, 0x12, 0x3f, 0x7e, 0x9f, + 0x83, 0xf3, 0xd4, 0x43, 0x18, 0x03, 0xa3, 0x07, + 0xbc, 0x85, 0xe8, 0xdb, 0x6c, 0x8f, 0xaf, 0x70, + 0x71, 0x5d, 0xbc, 0x6d, 0x14, 0x05, 0xdf, 0xce, + 0x9f, 0xe2, 0xa3, 0x51, 0x66, 0x92, 0x52, 0x19, + 0x98, 0xbd, 0xb2, 0x68, 0x79, 0xf4, 0x5d, 0x71, + 0xcb, 0xa0, 0x1b, 0x77, 0x34, 0x46, 0x69, 0x3c, + 0xa4, 0x0f, 0x72, 0xf5, 0x73, 0xf6, 0xa0, 0xe9, + 0x72, 0xef, 0xa1, 0xcc, 0x43, 0xfc, 0xb7, 0xf3, + 0x59, 0xeb, 0x40, 0x61, 0x02, 0x26, 0x9b, 0x71, + 0x57, 0x17, 0x36, 0xac, 0xc8, 0xd5, 0x9d, 0xcb, + 0x4d, 0x4f, 0xf7, 0xc1, 0x58, 0xce, 0xbf, 0x73, + 0xe7, 0xd0, 0x58, 0x0d, 0x08, 0x01, 0x8f, 0x68, + 0x1b, 0x3f, 0x3a, 0x7b, 0xdb, 0x9e, 0xa7, 0x33, + 0x59, 0x91, 0xa8, 0xe3, 0x58, 0x22, 0x3f, 0x97, + 0xe1, 0xdb, 0xd6, 0x99, 0x0e, 0xdd, 0x76, 0xcd, + 0x4d, 0x02, 0x28, 0x43, 0x8a, 0xdd, 0x10, 0xad, + 0x55, 0xe0, 0x62, 0xf7, 0x44, 0xbc, 0x3f, 0x99, + 0x3c, 0x09, 0x25, 0xfb, 0xfd, 0x1e, 0x4c, 0x45, + 0x0e, 0x6e, 0x75, 0x15, 0x48, 0x19, 0x08, 0xc3, + 0x2b, 0x81, 0x60, 0x5f, 0x19, 0x09, 0x74, 0x0a, + 0xbd, 0x0d, 0x8d, 0x94, 0x55, 0x04, 0x2b, 0x8e, + 0x0d, 0x10, 0x60, 0x64, 0x0d, 0x7f, 0x63, 0x2e, + 0x89, 0x0b, 0xfc, 0x1c, 0xbc, 0xf3, 0x66, 0xc5, + 0x80, 0x93, 0x3a, 0x74, 0x15, 0x11, 0xd5, 0xba, + 0xbc, 0x06, 0x3f, 0x85, 0xcc, 0x6c, 0xd3, 0xf2, + 0x74, 0xc6, 0x10, 0x15, 0x0a, 0x02, 0x66, 0xa4, + 0xa8, 0x93, 0x0b, 0x5c, 0xe7, 0x13, 0x96, 0x90, + 0xdd, 0xe3, 0x25, 0x22, 0x46, 0x7b, 0x49, 0xde, + 0x72, 0x55, 0xf3, 0x30, 0x62, 0x5f, 0x7a, 0x2a, + 0x37, 0x88, 0xea, 0x57, 0x99, 0x64, 0x50, 0x2d, + 0xd3, 0x6a, 0x09, 0x4b, 0xd6, 0x61, 0xf2, 0x22, + 0x53, 0x36, 0xf7, 0x42, 0x21, 0xde, 0xda, 0xcb, + 0x8b, 0x6f, 0xf3, 0x4e, 0x2c, 0x16, 0xfb, 0xfc, + 0x13, 0xa7, 0xd1, 0xd8, 0xfd, 0x16, 0x39, 0x20, + 0xe0, 0xb2, 0xb4, 0xd5, 0x40, 0x93, 0x30, 0xf3, + 0xab, 0x88, 0xe3, 0xfb, 0xbe, 0xb8, 0x02, 0x3a, + 0x78, 0x2d, 0x56, 0x4b, 0x92, 0x5b, 0x0a, 0x8d, + 0x18, 0xa4, 0x5b, 0x11, 0x60, 0x0b, 0x45, 0xad, + 0x0b, 0x64, 0x96, 0x7d, 0x84, 0xf2, 0x20, 0xa8, + 0x95, 0x78, 0xb3, 0xb5, 0x98, 0x1f, 0xa7, 0x3e, + 0x30, 0x77, 0x43, 0xd2, 0x8c, 0x20, 0xc5, 0x5e, + 0x76, 0xcd, 0x2c, 0x7c, 0xfa, 0x34, 0x36, 0xda, + 0x39, 0x00, 0x2e, 0x69, 0x4a, 0xb3, 0x0f, 0x6f, +}; + +const struct testvec aes_cbc_128_1_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t aes_cbc_128_encblkno8_vec0_ctxt[SECSIZE] = { + 0xa6, 0x64, 0xef, 0x0f, 0xc4, 0x45, 0xcc, 0x5e, + 0xf8, 0x27, 0x42, 0x5e, 0xbd, 0x93, 0x99, 0xcd, + 0x79, 0xa8, 0x7d, 0x72, 0xc4, 0x02, 0x99, 0xa6, + 0xe4, 0x69, 0x57, 0x82, 0xdf, 0x32, 0x4e, 0x67, + 0x2a, 0xd9, 0x58, 0x8c, 0x9f, 0xfc, 0x4d, 0xcf, + 0x7b, 0xa4, 0xa1, 0xfa, 0xd9, 0x4d, 0xb5, 0x67, + 0x06, 0x4a, 0x9e, 0x6d, 0xe8, 0xaa, 0xdd, 0xae, + 0x8c, 0xda, 0xcf, 0x26, 0xd5, 0x94, 0x8d, 0x12, + 0xf8, 0xdd, 0x21, 0x4c, 0xcb, 0xc8, 0x5d, 0xd1, + 0x6a, 0x89, 0x37, 0xd0, 0x32, 0xe4, 0x87, 0xbc, + 0x5d, 0xef, 0xca, 0x38, 0xd5, 0x08, 0xfb, 0xcf, + 0xb7, 0x8d, 0x65, 0x52, 0x13, 0xea, 0x2d, 0x30, + 0xd3, 0x9a, 0xe8, 0x9c, 0x76, 0x25, 0x44, 0x2a, + 0xf1, 0xe1, 0xbb, 0xcd, 0xbc, 0x9c, 0xf5, 0xa3, + 0xfb, 0x23, 0x53, 0x95, 0x61, 0xea, 0x46, 0x97, + 0xf6, 0xbf, 0xdf, 0xf9, 0xb7, 0x94, 0x73, 0xa8, + 0xc1, 0xaa, 0x64, 0xfb, 0x66, 0x26, 0x0f, 0x4c, + 0xee, 0x3c, 0xb6, 0x3f, 0x13, 0x88, 0xaa, 0x7d, + 0x91, 0x01, 0x1a, 0x95, 0x3b, 0xb5, 0x7e, 0x1f, + 0xc1, 0x84, 0xa6, 0x83, 0x99, 0xe6, 0xaf, 0x21, + 0x33, 0xff, 0x2e, 0xc9, 0xfe, 0xf2, 0xa1, 0x37, + 0xed, 0x91, 0x73, 0x70, 0x4f, 0xb4, 0x69, 0x69, + 0x98, 0x1d, 0x6d, 0xd4, 0xa4, 0xac, 0x73, 0x61, + 0x04, 0xf5, 0x13, 0x50, 0x2a, 0xa9, 0xf7, 0x61, + 0x78, 0xf5, 0x87, 0x26, 0xc5, 0x4a, 0x30, 0xbb, + 0x94, 0x55, 0x51, 0xb4, 0xa0, 0x83, 0x30, 0xe6, + 0xf7, 0xc7, 0x89, 0x61, 0x73, 0xd9, 0xbd, 0xe1, + 0x4e, 0x14, 0x8a, 0x02, 0x3d, 0x7a, 0x58, 0x92, + 0x41, 0xe7, 0x90, 0x8d, 0xd7, 0x67, 0x62, 0xf8, + 0x99, 0xa7, 0x9d, 0x55, 0xec, 0x18, 0x6b, 0x42, + 0xaf, 0x27, 0x97, 0xe5, 0x51, 0xa9, 0x10, 0x27, + 0x5e, 0x3f, 0xac, 0xda, 0xd3, 0xb5, 0x2b, 0x43, + 0x2e, 0x10, 0xdc, 0xd9, 0xe2, 0x2f, 0x4f, 0xfe, + 0xf3, 0x0d, 0x06, 0x76, 0xf9, 0x25, 0xcd, 0x26, + 0xef, 0x8e, 0x9b, 0xc2, 0xb3, 0x20, 0x2b, 0x00, + 0xb6, 0xe6, 0x2e, 0xf7, 0x17, 0xc7, 0xa8, 0x3c, + 0x00, 0xfc, 0x78, 0x8d, 0x10, 0x38, 0xd1, 0x11, + 0x94, 0xed, 0xb4, 0x22, 0x13, 0xcb, 0x52, 0x0f, + 0x0f, 0xd7, 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cd, 0x15, + 0x32, 0xa6, 0x01, 0x8d, 0x24, 0x1b, 0x4b, 0x1f, + 0xa3, 0xfc, 0x38, 0x82, 0x3a, 0xa1, 0xb5, 0x52, + 0x53, 0xc7, 0x2b, 0x30, 0x7c, 0x65, 0xb9, 0x7d, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t aes_cbc_128_encblkno8_vec1_ctxt[SECSIZE] = { + 0x63, 0x45, 0x16, 0x0c, 0xe4, 0x4f, 0x51, 0xde, + 0x74, 0xf8, 0x7b, 0xf5, 0x05, 0x17, 0x13, 0x1e, + 0xa5, 0x3d, 0x84, 0xfa, 0x35, 0x5a, 0x2d, 0x3c, + 0xb7, 0x61, 0x68, 0xff, 0xcd, 0x33, 0x1f, 0x0b, + 0x53, 0x79, 0xf2, 0x2f, 0xbc, 0x8d, 0xac, 0xb9, + 0xf9, 0xb7, 0x9c, 0x0a, 0x9d, 0xa1, 0x4d, 0x78, + 0x9e, 0x4e, 0xfa, 0xe8, 0xc8, 0x46, 0x4b, 0x99, + 0x91, 0x7e, 0x33, 0x6e, 0x18, 0x24, 0x01, 0xc3, + 0x9f, 0x8c, 0x43, 0xb5, 0x15, 0x7e, 0xdd, 0xf9, + 0x1b, 0xb0, 0xf2, 0xc3, 0x97, 0x1f, 0x7c, 0x3f, + 0x43, 0x4c, 0x9f, 0x93, 0x29, 0x83, 0x8f, 0xad, + 0xd1, 0x5e, 0x92, 0x1a, 0x17, 0xd1, 0xa0, 0x05, + 0x6e, 0x62, 0x59, 0x80, 0x50, 0x6d, 0xe3, 0x28, + 0x9a, 0x43, 0xdc, 0x81, 0x4f, 0x49, 0xc4, 0x98, + 0xcd, 0x6d, 0x28, 0xb4, 0x86, 0xe4, 0x83, 0x45, + 0xd4, 0x43, 0x52, 0x8a, 0xd6, 0xc8, 0x1c, 0x90, + 0xeb, 0xf0, 0xe7, 0x76, 0xb4, 0x43, 0x9b, 0x56, + 0x48, 0x73, 0xdd, 0x01, 0x50, 0x1c,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x8e, 0xcf, 0x47, 0xe2, 0xf2, 0xad, 0x06, + 0x00, 0x9a, 0x3a, 0x55, 0xf5, 0x9e, 0xbf, 0x5a, + 0x2e, 0x5a, 0x6c, 0x2b, 0x8f, 0x33, 0x71, 0x2c, + 0x56, 0x43, 0xd1, 0x8b, 0xd2, 0x98, 0x14, 0xb7, + 0x5a, 0xdc, 0x8b, 0xbc, 0xfe, 0x50, 0x99, 0x84, + 0x48, 0x5f, 0xcd, 0xed, 0xce, 0x61, 0x6f, 0xa6, + 0x83, 0xa3, 0x34, 0xbe, 0xf2, 0x66, 0xf3, 0x09, + 0xf3, 0xd3, 0x97, 0xd4, 0xee, 0x66, 0x9a, 0x81, + 0x62, 0x84, 0x85, 0x7f, 0x79, 0x18, 0xd2, 0x82, + 0xd6, 0x96, 0x09, 0x61, 0x1e, 0x53, 0x97, 0x80, + 0x0a, 0x81, 0x4b, 0x93, 0xf0, 0x03, 0x65, 0x18, + 0x93, 0x5b, 0x60, 0x2f, 0xb5, 0xfe, 0x82, 0xaf, + 0x85, 0xb7, 0x79, 0x7c, 0xee, 0xad, 0xea, 0xfa, + 0x9b, 0xad, 0xca, 0x38, 0x21, 0x3d, 0x46, 0x8a, + 0x5b, 0xa7, 0x55, 0x3d, 0x88, 0x4a, 0x52, 0xdb, + 0xf2, 0x07, 0xed, 0xd6, 0x3c, 0x9f, 0x1b, 0x42, + 0xb4, 0x14, 0x12, 0xb7, 0x00, 0xfc, 0x6a, 0x79, + 0x61, 0x0b, 0x43, 0xaa, 0x44, 0x48, 0x30, 0x15, + 0x48, 0x76, 0x27, 0x32, 0x7a, 0x2e, 0x25, 0x6a, + 0x8c, 0x8c, 0x64, 0x67, 0x86, 0x54, 0x4a, 0x93, + 0x14, 0xfe, 0x81, 0xf5, 0xcf, 0x98, 0x92, 0xd3, + 0x92, 0xf5, 0x6a, 0x74, 0x28, 0x10, 0x6b, 0xd4, + 0x1d, 0x64, 0x7e, 0x05, 0x32, 0xba, 0xf7, 0x4c, + 0xe9, 0xa8, 0xa9, 0xc5, 0x35, 0x34, 0x26, 0x41, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t aes_cbc_128_encblkno8_vec2_ctxt[SECSIZE] = { + 0x64, 0x7b, 0x62, 0x7a, 0xa6, 0xa9, 0xb3, 0x47, + 0xbc, 0x03, 0x14, 0x3d, 0x9b, 0x56, 0xfc, 0x13, + 0x08, 0x32, 0x81, 0xe3, 0x57, 0x3c, 0x0d, 0xbb, + 0x85, 0x44, 0x47, 0x12, 0xc4, 0x80, 0x35, 0x37, + 0xe1, 0xb4, 0x3f, 0x35, 0x98, 0x7c, 0xb0, 0x3b, + 0x85, 0xab, 0x3d, 0x0b, 0xd3, 0x6f, 0xf9, 0x92, + 0x00, 0x6b, 0x18, 0xe7, 0x31, 0x8b, 0x77, 0x4c, + 0xd0, 0x7b, 0x1d, 0xfc, 0x95, 0xe6, 0x02, 0x01, + 0x9c, 0x17, 0x4d, 0x9b, 0x3a, 0x1d, 0x12, 0x23, + 0xd4, 0x24, 0xf8, 0x47, 0x5e, 0x2d, 0xfd, 0xc8, + 0x74, 0x28, 0xb4, 0x3a, 0x99, 0x6b, 0xcc, 0xba, + 0xe5, 0x51, 0x0b, 0xab, 0x4d, 0x63, 0xfc, 0x6d, + 0x2d, 0xd9, 0x2b, 0x4f, 0xa4, 0x26, 0xc7, 0x8d, + 0x9d, 0x12, 0x7f, 0xc7, 0x6b, 0x15, 0x8b, 0x4a, + 0x41, 0xf8, 0x50, 0x32, 0x76, 0x10, 0xca, 0x8e, + 0xfe, 0x08, 0x7d, 0x9a, 0xb5, 0x1a, 0xdb, 0x10, + 0xb3, 0x6a, 0x5f, 0xd9, 0x0a, 0x5f, 0x31, 0x19, + 0x3e, 0xa9, 0xa1, 0x72, 0x1f, 0x6c, 0x97, 0x20, + 0xd4, 0xab, 0xb8, 0xad, 0xf7, 0x70, 0x12, 0xd0, + 0x8f, 0x70, 0x24, 0x58, 0x2e, 0x99, 0xcd, 0xd4, + 0xf4, 0xcd, 0xef, 0x93, 0xfb, 0x4f, 0x9a, 0x40, + 0x46, 0x92, 0x6b, 0xd0, 0x25, 0x24, 0xec, 0x4d, + 0x4c, 0x42, 0x50, 0x61, 0xb6, 0x21, 0xa6, 0x2e, + 0xc1, 0x42, 0x9e, 0x86, 0x9f, 0x57, 0x2a, 0x2c, + 0x82, 0xbd, 0xc2, 0x25, 0xb6, 0x9f, 0x2d, 0x9f, + 0xba, 0xe0, 0xa6, 0x06, 0x04, 0x08, 0xc5, 0x1d, + 0x8c, 0x0f, 0xbf, 0x21, 0x85, 0x6d, 0x61, 0x4d, + 0x93, 0xc0, 0xa2, 0x8b, 0xca, 0x07, 0xd0, 0x88, + 0x74, 0xf9, 0x42, 0x92, 0xd5, 0x0d, 0x0c, 0x34, + 0xa6, 0xa5, 0x86, 0x51, 0xcf, 0x40, 0x36, 0x66, + 0x35, 0x9f, 0xa8, 0x95, 0x0b, 0xfb, 0x0c, 0xe8, + 0xdc, 0x12, 0x78, 0x4c, 0x52, 0xf4, 0xfc, 0x4a, + 0x77, 0xdd, 0x77, 0x34, 0xf7, 0x35, 0x94, 0x7a, + 0x31, 0x16, 0x86, 0x44, 0x50, 0x30, 0x1c, 0x6d, + 0x9f, 0x66, 0x49, 0xb5, 0xe6, 0x71, 0x00, 0x83, + 0xd1, 0xa0, 0x01, 0xff, 0xc3, 0x27, 0xaa, 0x9a, + 0xdb, 0xad, 0x24, 0xdb, 0xbd, 0xde, 0xfd, 0xa6, + 0xaa, 0x87, 0x98, 0x98, 0xde, 0x90, 0xd5, 0x40, + 0x20, 0x8f, 0xe9, 0xdd, 0xa8, 0xec, 0xd3, 0x18, + 0x20, 0x85, 0x5e, 0xd5, 0xe7, 0x50, 0x58, 0x15, + 0x69, 0x03, 0xa5, 0xe8, 0xa9, 0x7a, 0x0f, 0xd1, + 0x7d, 0x22, 0x8a, 0xe0, 0xc6, 0x17, 0x33, 0x00, + 0x57, 0xcb, 0xf6, 0x8d, 0xf0, 0xc1, 0x7b, 0xb5, + 0x96, 0x0f, 0x08, 0x84, 0x5b, 0x7e, 0xa6, 0x1e, + 0xd8, 0x5e, 0x0c, 0xca, 0x30, 0x4b, 0xe0, 0x87, + 0x2f, 0xbc, 0x07, 0x83, 0x35, 0x76, 0x36, 0x17, + 0xcf, 0xdb, 0x27, 0x53, 0x43, 0xf5, 0x07, 0xd0, + 0x91, 0x83, 0xa1, 0xaa, 0x8d, 0xdb, 0x00, 0x2b, + 0xd1, 0x88, 0xe5, 0x59, 0x47, 0x17, 0xf0, 0xe8, + 0xce, 0x3b, 0xa0, 0x73, 0x1f, 0x22, 0x9b, 0x1b, + 0x59, 0x02, 0xe6, 0xaf, 0x3f, 0xdd, 0xfe, 0xba, + 0xc3, 0x6b, 0xe5, 0x82, 0x02, 0x92, 0x0c, 0x5e, + 0x5a, 0x87, 0x88, 0x91, 0x00, 0xb5, 0x30, 0x37, + 0xf5, 0xc6, 0xdf, 0x0a, 0x7f, 0x03, 0x1c, 0x1f, + 0x20, 0xf1, 0xd4, 0x5f, 0x94, 0xc3, 0x6f, 0x21, + 0x5e, 0xf2, 0x77, 0x5a, 0x42, 0xfd, 0xd3, 0xc4, + 0x31, 0xaf, 0xd6, 0x6c, 0x6c, 0xde, 0x8c, 0x50, + 0x01, 0x8f, 0x57, 0x90, 0x88, 0x43, 0xf9, 0x44, + 0x09, 0x4d, 0x27, 0x58, 0x9f, 0xae, 0x50, 0x28, + 0x12, 0x47, 0x20, 0x79, 0x2b, 0xe4, 0x02, 0x97, + 0xcd, 0xab, 0x53, 0x28, 0x8f, 0x8f, 0xe3, 0x3b, + 0xd6, 0xc9, 0xc8, 0xff, 0xbf, 0x18, 0x3b, 0x75, + 0xdb, 0xcf, 0x07, 0x8c, 0xfe, 0x58, 0xee, 0x75, + 0x01, 0x98, 0x98, 0xe4, 0x60, 0xfe, 0xe6, 0x7f, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t aes_cbc_128_encblkno8_vec3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, 0x18, 0xee, 0xa9, 0x56, 0x9c, + 0x3c, 0xc3, 0x67, 0x84, 0x57, 0x77, 0x8d, 0xff, + 0xea, 0x34, 0x3c, 0xf9, 0x58, 0xb8, 0xdc, 0x4e, + 0xa1, 0x92, 0x2d, 0x9a, 0x91, 0x61, 0x23, 0x6a, + 0xd9, 0xb7, 0x41, 0xc5, 0x0d, 0xb6, 0x57, 0x58, + 0x42, 0x39, 0x4a, 0x86, 0x7e, 0x9d, 0xeb, 0x7d, + 0xa8, 0x14, 0x1a, 0x5c, 0xa1, 0x54, 0x34, 0xb6, + 0xb6, 0xbc, 0x1f, 0xf5, 0xe2, 0xb5, 0xe4, 0xa8, + 0x42, 0xe3, 0x3d, 0x06, 0x6b, 0x50, 0xbb, 0xa1, + 0x6b, 0x63, 0xe5, 0x60, 0x28, 0x07, 0x49, 0x06, + 0x61, 0x0e, 0xa3, 0x6c, 0xc3, 0xc8, 0x3e, 0x5a, + 0x9c, 0xa5, 0xb3, 0x9b, 0x8d, 0x46, 0xb9, 0xf5, + 0x4a, 0x4d, 0xbe, 0xc0, 0xc1, 0x24, 0x92, 0x09, + 0x7c, 0x9a, 0x21, 0x2c, 0x08, 0x8a, 0x0d, 0xfc, + 0xff, 0xda, 0xdc, 0xf1, 0x45, 0x66, 0xf9, 0xcd, + 0x64, 0x7c, 0x2f, 0x0e, 0x95, 0x5e, 0xec, 0x92, + 0xd1, 0x03, 0x03, 0xa0, 0xcc, 0x73, 0x92, 0x15, + 0x74, 0x42, 0x54, 0x48, 0x77, 0xbe, 0x96, 0xfb, + 0x1f, 0x0c, 0x7a, 0x25, 0x67, 0x6b, 0x85, 0x71, + 0x06, 0x15, 0xd3, 0x11, 0xfe, 0xf7, 0xa9, 0xb1, +}; + +const struct testvec aes_cbc_128_8_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_128_encblkno8_vec3_ctxt, + }, +}; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t aes_cbc_192_encblkno1_vec0_ctxt[SECSIZE] = { + 0x7c, 0xc4, 0xec, 0x89, 0x7c, 0x13, 0xac, 0x99, + 0x49, 0xa9, 0x96, 0xe7, 0xb1, 0x1a, 0xd6, 0xb0, + 0xeb, 0x89, 0x27, 0x0f, 0x8b, 0x1b, 0xab, 0x8e, + 0x2c, 0xd4, 0x00, 0x66, 0x12, 0x3a, 0x9a, 0x03, + 0xc4, 0x49, 0xa4, 0xf0, 0xc1, 0x90, 0xf9, 0x38, + 0xb2, 0x5c, 0xa5, 0x0d, 0x1b, 0x60, 0x94, 0xf6, + 0x31, 0x4a, 0x72, 0xdb, 0xfc, 0xe1, 0x3c, 0xd6, + 0x9d, 0x03, 0x07, 0x45, 0xdb, 0xad, 0xdb, 0xb3, + 0x86, 0xfa, 0xce, 0x2c, 0xeb, 0xa2, 0xac, 0x05, + 0xd9, 0x52, 0xb8, 0xae, 0xa9, 0x91, 0x86, 0x4b, + 0xbb, 0xf8, 0x03, 0xb0, 0x6c, 0x40, 0xcc, 0xbf, + 0xa3, 0x76, 0x60, 0xf7, 0x29, 0x03, 0xe6, 0x44, + 0xcc, 0x2a, 0xe7, 0x74, 0x8e, 0x62, 0xfe, 0x99, + 0x6a, 0x6d, 0x04, 0x1b, 0xe7, 0xf7, 0x9f, 0x13, + 0xa7, 0x1d, 0x93, 0x0e, 0x8f, 0xe0, 0x77, 0x9b, + 0xe3, 0x91, 0x67, 0x12, 0x33, 0x12, 0x42, 0x55, + 0x28, 0x04, 0x2d, 0x01, 0x2b, 0xd2, 0xda, 0xbe, + 0x7c, 0x83, 0xf2, 0x87, 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 0x45, 0x67, 0x12, 0xc8, 0x99, 0x85, 0x08, 0x2a, + 0x37, 0x40, 0x0b, 0xb5, 0xd9, 0xa3, 0xf7, 0xc8, + 0x87, 0xb1, 0xe6, 0x87, 0x2f, 0x86, 0xd8, 0x9c, + 0x7b, 0xec, 0xcf, 0xa4, 0xe5, 0xd5, 0x50, 0x3f, + 0xdf, 0xc9, 0xb7, 0x29, 0x97, 0xd6, 0x33, 0xba, + 0xf0, 0x72, 0xf0, 0x76, 0x12, 0xd3, 0x99, 0x4f, + 0x1b, 0x36, 0xda, 0xa1, 0x83, 0xfe, 0xf5, 0x94, + 0x9e, 0x61, 0x82, 0x62, 0xe0, 0x08, 0x3a, 0xbd, + 0xba, 0x8b, 0x3d, 0xd6, 0xbd, 0x16, 0x5f, 0xd7, + 0x1d, 0x6c, 0x0e, 0x92, 0x89, 0x8c, 0x38, 0x62, + 0x80, 0xee, 0x7e, 0x63, 0x82, 0x88, 0x0b, 0xbf, + 0xdd, 0x9f, 0xbc, 0xba, 0xa7, 0x5a, 0xc6, 0x0d, + 0x87, 0x59, 0xbf, 0x0a, 0x85, 0x06, 0xa3, 0xb4, + 0x66, 0x63, 0xda, 0x12, 0x29, 0x5f, 0x2e, 0x4d, + 0x60, 0xfd, 0x85, 0x76, 0xaf, 0xf7, 0x87, 0xed, + 0x1f, 0x46, 0xc2, 0xd6, 0x6c, 0x98, 0x6b, 0x4b, + 0x60, 0x04, 0xed, 0x89, 0x3b, 0x85, 0x6c, 0xe9, + 0x46, 0xd9, 0xfa, 0x35, 0x61, 0xe8, 0x0c, 0x84, + 0x1b, 0x93, 0xc0, 0xfe, 0x5d, 0x29, 0x14, 0xe1, + 0x1c, 0x66, 0x73, 0xc8, 0x0b, 0x98, 0xff, 0x1a, + 0x78, 0x2b, 0x6a, 0x93, 0x7a, 0x29, 0xd8, 0x7b, + 0xb1, 0x39, 0xf0, 0xad, 0x93, 0x4d, 0x2d, 0xab, + 0x67, 0x3c, 0xa4, 0xa1, 0x08, 0x36, 0x0b, 0xe9, + 0x77, 0xd0, 0xe3, 0x45, 0x7d, 0x99, 0x75, 0xc3, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t aes_cbc_192_encblkno1_vec1_ctxt[SECSIZE] = { + 0xe6, 0x41, 0x75, 0xd6, 0x80, 0xdf, 0x44, 0x37, + 0xa7, 0xa2, 0xb2, 0x29, 0x0d, 0xf0, 0x02, 0x78, + 0x92, 0xb2, 0x06, 0x5f, 0x86, 0xd3, 0x9c, 0xa3, + 0xd0, 0xc5, 0x08, 0x03, 0x6d, 0x41, 0x9d, 0x61, + 0xb4, 0xb9, 0xa1, 0x69, 0x6e, 0x3a, 0x78, 0xd7, + 0x04, 0x94, 0xf2, 0x53, 0xed, 0xd1, 0xf6, 0xd8, + 0x98, 0xe2, 0x49, 0x75, 0x15, 0x85, 0xe0, 0x78, + 0x5b, 0x28, 0x5e, 0xe6, 0xfa, 0x60, 0x3d, 0x4b, + 0x8c, 0xf1, 0x1a, 0xfd, 0x1f, 0xe8, 0xad, 0xb4, + 0xa1, 0xe7, 0xd3, 0x71, 0x16, 0xdf, 0xc6, 0x95, + 0xd4, 0x43, 0xaf, 0x92, 0xab, 0x74, 0x0f, 0x77, + 0x75, 0x4d, 0xd7, 0x13, 0x97, 0x18, 0xea, 0x43, + 0x92, 0x0d, 0x88, 0xc8, 0x41, 0xf7, 0x15, 0x34, + 0x0f, 0x63, 0xbf, 0x50, 0x18, 0xbe, 0x9d, 0x3b, + 0xfc, 0x17, 0x7d, 0x03, 0x39, 0xc2, 0x39, 0x28, + 0xb2, 0x23, 0x1c, 0x7f, 0x3f, 0x19, 0x6c, 0x2f, + 0x64, 0xbd, 0xc9, 0x7d, 0xbe, 0x98, 0xe0, 0x83, + 0xa4, 0x48, 0xfc, 0x89, 0xe7, 0xe0, 0x93, 0x93, + 0x7b, 0x15, 0x35, 0xaf, 0xf8, 0x00, 0x81, 0xcc, + 0x04, 0x80, 0x8b, 0x20, 0xc8, 0x6a, 0xb7, 0x5e, + 0x95, 0xce, 0x69, 0x50, 0x39, 0x88, 0x90, 0x41, + 0x3f, 0xa8, 0x62, 0x42, 0xf1, 0xa9, 0x56, 0xce, + 0x25, 0x53, 0x1d, 0x97, 0x5d, 0x3a, 0x4e, 0x6b, + 0x1f, 0xd6, 0xea, 0x20, 0x81, 0x6c, 0xe5, 0xa1, + 0x0d, 0x9a, 0xd9, 0x3c, 0xbb, 0xbc, 0xc1, 0x77, + 0xe2, 0xf4, 0x9c, 0x11, 0x3a, 0x2f, 0xd0, 0x77, + 0x10, 0xa6, 0x36, 0xd1, 0xbf, 0x3b, 0x50, 0x39, + 0x4b, 0x2c, 0x62, 0x06, 0x1a, 0xe4, 0x18, 0xc0, + 0x35, 0x7c, 0xc3, 0xd0, 0x22, 0xf8, 0xee, 0x19, + 0xa5, 0x3d, 0x69, 0xa9, 0x34, 0xe6, 0x29, 0xf9, + 0xf1, 0xff, 0x26, 0x7a, 0x66, 0x13, 0x1a, 0xa2, + 0xc6, 0xac, 0x84, 0xf6, 0x6b, 0x09, 0xbd, 0x32, + 0x6f, 0x26, 0x37, 0x7c, 0x7d, 0x74, 0xe4, 0xa0, + 0xeb, 0x85, 0x7a, 0xa1, 0x92, 0x19, 0x2e, 0x64, + 0x82, 0x7c, 0x89, 0x1b, 0x14, 0x92, 0xd1, 0xf4, + 0x1f, 0x29, 0x84, 0x04, 0x70, 0x09, 0x13, 0x4c, + 0x62, 0x9a, 0xb4, 0xf7, 0xc1, 0x7b, 0x83, 0xd1, + 0x2d, 0x1a, 0xbe, 0x83, 0x9b, 0x73, 0xba, 0x8d, + 0xbb, 0xb0, 0xf2, 0x5c, 0x72, 0x75, 0x01, 0x0b, + 0xa6, 0x43, 0x6b, 0x76, 0x56, 0x4e, 0x71, 0x1b, + 0xb2, 0x34, 0x1f, 0x70, 0x44, 0xe6, 0xfb, 0x67, + 0xd1, 0x4d, 0x63, 0xce, 0x17, 0x46, 0x9b, 0x11, + 0xda, 0x93, 0xf8, 0x03, 0x11, 0x8f, 0x90, 0xff, + 0x80, 0x85, 0x02, 0x1f, 0xb6, 0x6a, 0x28, 0x3f, + 0x01, 0xa8, 0x36, 0x2e, 0xc7, 0x42, 0xd4, 0x02, + 0x26, 0xea, 0xb5, 0x84, 0x6c, 0x9f, 0xa0, 0x4a, + 0x73, 0x49, 0xea, 0x91, 0x4d, 0x62, 0xf8, 0x23, + 0xe4, 0x3d, 0x91, 0xfb, 0x53, 0x2c, 0x8c, 0xa4, + 0xfe, 0x81, 0x05, 0x5d, 0x4b, 0x9a, 0x75, 0x29, + 0xf8, 0xbe, 0x3f, 0x05, 0xb4, 0x8f, 0xdc, 0xcc, + 0xfa, 0xcc, 0xd7, 0xb2, 0x06, 0x03, 0xd4, 0xf3, + 0x8e, 0x09, 0x09, 0x80, 0xf8, 0xc3, 0x3b, 0x66, + 0xe9, 0x9c, 0x5b, 0x16, 0xed, 0x2d, 0x35, 0x1c, + 0x99, 0x3b, 0x1f, 0x0e, 0x04, 0x30, 0x23, 0x3a, + 0x83, 0x0c, 0xec, 0x76, 0xf2, 0x5d, 0x13, 0x54, + 0x15, 0x62, 0x36, 0x26, 0x6b, 0x21, 0x62, 0xdd, + 0xb4, 0x1a, 0x57, 0x16, 0xfd, 0xa0, 0x9c, 0xfa, + 0x37, 0xb3, 0xda, 0xe0, 0x46, 0x91, 0xb3, 0x20, + 0xe7, 0xe2, 0xf3, 0x0e, 0x20, 0x3c, 0x98, 0x1b, + 0xe4, 0xc2, 0xd3, 0xa9, 0x97, 0xaf, 0x12, 0x69, + 0x23, 0x97, 0x62, 0x6e, 0xae, 0x54, 0x9c, 0x82, + 0x92, 0x50, 0x74, 0x07, 0x4a, 0xb1, 0xdc, 0xcf, + 0x53, 0x1d, 0xc8, 0x29, 0x1f, 0x6e, 0xf1, 0x13, + 0xec, 0xb6, 0x60, 0xb1, 0x4c, 0x9d, 0xd7, 0x77, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t aes_cbc_192_encblkno1_vec2_ctxt[SECSIZE] = { + 0x33, 0xfd, 0xfa, 0x44, 0x64, 0x75, 0x22, 0x7e, + 0xe3, 0xb3, 0xa0, 0x75, 0x99, 0x96, 0xc0, 0xec, + 0x56, 0x06, 0x7d, 0x19, 0x0b, 0x66, 0x89, 0xe0, + 0x69, 0x1d, 0x93, 0x91, 0xd7, 0x0f, 0xf8, 0xf5, + 0x5a, 0x39, 0x30, 0xad, 0x64, 0x42, 0x06, 0xa3, + 0xce, 0x3f, 0x67, 0xd6, 0x6e, 0xcd, 0x3b, 0xf5, + 0x03, 0x2b, 0x07, 0x83, 0x18, 0x1a, 0x4f, 0x4c, + 0xe7, 0x6b, 0xe8, 0xf9, 0x19, 0xa5, 0x23, 0x8f, + 0x46, 0x35, 0x13, 0x7b, 0x61, 0x05, 0xfc, 0x7d, + 0x17, 0x39, 0x03, 0xa8, 0xec, 0x7a, 0xd2, 0x5f, + 0x91, 0xa7, 0x26, 0x07, 0x9d, 0xd7, 0x0c, 0xd7, + 0xd4, 0x8e, 0x37, 0xf3, 0x1a, 0x3c, 0x04, 0x83, + 0x04, 0x71, 0x06, 0xa6, 0x5f, 0x82, 0xe0, 0x6d, + 0x87, 0x5c, 0x7c, 0x03, 0x25, 0x03, 0x4b, 0x24, + 0x07, 0x40, 0xad, 0xe4, 0x1d, 0x1d, 0xcb, 0x34, + 0xc2, 0x53, 0x1d, 0x13, 0xc5, 0x87, 0xab, 0xa7, + 0x95, 0x11, 0x8b, 0xbb, 0xf0, 0xc3, 0x00, 0xeb, + 0xe5, 0xb0, 0x9e, 0x88, 0x8b, 0xad, 0xca, 0xcb, + 0x17, 0xf8, 0x92, 0x4d, 0x00, 0xb0, 0x08, 0x74, + 0x08, 0xb9, 0x8b, 0x95, 0x96, 0xd9, 0x36, 0x35, + 0x31, 0x92, 0x89, 0xf6, 0x35, 0x33, 0xfb, 0x18, + 0x5b, 0x84, 0xa1, 0xfe, 0xe1, 0x62, 0x04, 0x6f, + 0x3c, 0xc1, 0xd2, 0xc2, 0x10, 0xd7, 0x97, 0xba, + 0x29, 0x7c, 0xe3, 0x85, 0xee, 0x59, 0x90, 0xaf, + 0x7f, 0x6f, 0x97, 0x97, 0xa2, 0x41, 0x18, 0x7f, + 0x2f, 0x06, 0x15, 0xb2, 0x46, 0x82, 0x49, 0x39, + 0xd0, 0xfb, 0xa8, 0x48, 0x44, 0x28, 0x58, 0xff, + 0xd8, 0xf2, 0x65, 0xf9, 0x4f, 0x2c, 0xbe, 0xec, + 0xb6, 0xdf, 0x27, 0x1a, 0xf2, 0x05, 0x15, 0x5e, + 0xe3, 0x2a, 0x98, 0x29, 0x92, 0x4a, 0x1b, 0x5d, + 0x5c, 0x2c, 0x70, 0xf6, 0x41, 0xd4, 0xbe, 0x64, + 0xa1, 0xd9, 0x79, 0xf1, 0x11, 0x16, 0xda, 0xa2, + 0xaf, 0xdd, 0x4d, 0xa8, 0xed, 0xec, 0xbe, 0x7d, + 0x49, 0x6c, 0x30, 0xf2, 0xf5, 0x36, 0x3c, 0xae, + 0x4b, 0xa7, 0x77, 0xa3, 0xca, 0x22, 0xa5, 0xe2, + 0x4d, 0x44, 0xcb, 0x36, 0xd5, 0x3f, 0x20, 0x13, + 0xb6, 0xfb, 0xcd, 0x79, 0xd7, 0x42, 0xf9, 0x75, + 0x09, 0x45, 0x28, 0x9e, 0xf2, 0xbd, 0x15, 0x57, + 0xf8, 0x4b, 0xc0, 0xd3, 0xb3, 0xb8, 0xde, 0x55, + 0x9e, 0x11, 0x67, 0xab, 0xc5, 0x5d, 0x58, 0xdb, + 0x4d, 0x20, 0x34, 0x77, 0x33, 0x9c, 0x46, 0x76, + 0x9b, 0x1e, 0x0e, 0x6b, 0x4e, 0xd9, 0x63, 0x68, + 0x78, 0x5e, 0x7c, 0x52, 0xa2, 0x64, 0xa9, 0xfc, + 0x21, 0x35, 0x17, 0x93, 0x18, 0x9e, 0x10, 0xcf, + 0x95, 0x6b, 0xf0, 0x55, 0x46, 0xc3, 0x4b, 0xfc, + 0x86, 0x8b, 0x0d, 0x3b, 0x5c, 0x30, 0xcc, 0xf1, + 0x4c, 0x43, 0xf0, 0xd6, 0xf6, 0x3b, 0x0b, 0x68, + 0x6f, 0x21, 0xd1, 0x61, 0xda, 0x35, 0x92, 0x94, + 0xa5, 0x5d, 0x47, 0x39, 0x96, 0x50, 0x5f, 0xbd, + 0x57, 0x22, 0xd2, 0x65, 0x73, 0x05, 0x8f, 0x2b, + 0xf2, 0x96, 0x53, 0x6b, 0x8e, 0xd3, 0x1e, 0xe7, + 0x92, 0xd4, 0xea, 0x41, 0xee, 0x92, 0x4d, 0x10, + 0x9f, 0x68, 0xd8, 0xe9, 0xac, 0x1f, 0x38, 0x0b, + 0x12, 0xa4, 0x1c, 0xb2, 0x63, 0x2b, 0x87, 0x07, + 0xb8, 0x1e, 0x02, 0x2b, 0x4d, 0xad, 0x99, 0xdf, + 0xe3, 0x98, 0x69, 0x29, 0x11, 0xe3, 0x77, 0x45, + 0x9a, 0xe9, 0x6c, 0x47, 0x4e, 0xc0, 0x85, 0x15, + 0x68, 0x58, 0x41, 0x37, 0xab, 0x96, 0x11, 0x94, + 0x9e, 0xbb, 0xa8, 0x5d, 0x51, 0x05, 0x93, 0xdd, + 0x2e, 0xb8, 0xdf, 0xcf, 0x83, 0xbc, 0xf6, 0x53, + 0x95, 0x93, 0x27, 0xda, 0xa5, 0x20, 0x1b, 0x7d, + 0x1d, 0xd9, 0x0c, 0xde, 0xe5, 0x3f, 0xc8, 0x60, + 0x16, 0x32, 0x95, 0x24, 0xa7, 0x2b, 0x74, 0xf1, + 0x67, 0xf9, 0xf2, 0x49, 0xda, 0x12, 0x97, 0xdd, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t aes_cbc_192_encblkno1_vec3_ctxt[SECSIZE] = { + 0xa5, 0x81, 0x86, 0x78, 0x4a, 0xd7, 0x5b, 0x83, + 0xcf, 0xbf, 0x7e, 0x3c, 0xd7, 0xcd, 0xaf, 0xfa, + 0x82, 0x18, 0xce, 0xbd, 0x8b, 0xe6, 0xd9, 0x39, + 0x22, 0x2d, 0x1e, 0x75, 0x65, 0xee, 0x61, 0xf2, + 0xc3, 0x8b, 0xf4, 0x40, 0x03, 0x73, 0x8a, 0x21, + 0x9f, 0xf3, 0xcc, 0x93, 0x08, 0x3d, 0xff, 0x8a, + 0xbc, 0x0f, 0x19, 0xa1, 0x9f, 0xc8, 0x73, 0xe8, + 0xa6, 0x14, 0x2e, 0x43, 0x19, 0x79, 0x61, 0x35, + 0x8d, 0x55, 0x06, 0xeb, 0x96, 0xe7, 0xf5, 0x4b, + 0x95, 0x5f, 0x9b, 0xb2, 0x18, 0x0d, 0x13, 0xc2, + 0x96, 0x79, 0x50, 0x78, 0x98, 0x50, 0x88, 0x2b, + 0xab, 0x05, 0x66, 0xa1, 0x3a, 0x25, 0x85, 0xe2, + 0xd0, 0xe2, 0xac, 0xb5, 0x26, 0xde, 0x95, 0x04, + 0x45, 0xe7, 0x22, 0x71, 0x02, 0xb3, 0x84, 0x4c, + 0xb5, 0xad, 0x64, 0x5c, 0x27, 0x5c, 0x71, 0xcd, + 0x0b, 0x62, 0x91, 0xd6, 0x84, 0x00, 0x62, 0x52, + 0x54, 0xbd, 0x22, 0xc8, 0x57, 0xa7, 0x41, 0xac, + 0xc7, 0xa8, 0x56, 0x6f, 0x1b, 0x7e, 0xce, 0x02, + 0x29, 0x3b, 0xc0, 0x5d, 0x8e, 0x11, 0xa9, 0x54, + 0xc2, 0xf2, 0xf0, 0x81, 0x6c, 0x9a, 0x24, 0x5b, + 0x81, 0x7d, 0xf3, 0x84, 0x93, 0xc6, 0x2a, 0xd4, + 0xd3, 0x1a, 0x2f, 0x97, 0x2e, 0x31, 0x8a, 0x62, + 0x43, 0xcb, 0xc7, 0x3d, 0x73, 0x8e, 0xd6, 0x86, + 0x17, 0x8f, 0x63, 0xd4, 0xb1, 0x50, 0x92, 0xce, + 0x90, 0x37, 0x91, 0xce, 0x37, 0x13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x07, 0x49, 0x56, 0xfb, 0xec, 0xa9, 0x4c, + 0x68, 0x28, 0x41, 0x81, 0x80, 0x05, 0x88, 0x58, + 0xf5, 0xdc, 0x42, 0x99, 0xd8, 0xb7, 0x47, 0xd9, + 0xf7, 0x0e, 0x2c, 0x0f, 0x95, 0x04, 0xb3, 0xc8, + 0x8a, 0xe2, 0x21, 0x57, 0x8d, 0x64, 0x54, 0x40, + 0xf6, 0xd0, 0x3c, 0x97, 0xcf, 0x22, 0xce, 0xcd, + 0xbf, 0x05, 0x15, 0xaa, 0x89, 0xd9, 0x2b, 0x48, + 0xaf, 0x34, 0xe0, 0xf5, 0xe3, 0x58, 0x06, 0xd7, + 0x49, 0x00, 0x95, 0x3a, 0xb3, 0xc8, 0xcd, 0x2b, + 0x3e, 0xe8, 0x1b, 0x60, 0xe8, 0xea, 0xaf, 0x09, + 0xbb, 0xee, 0xce, 0xbc, 0xa0, 0x9b, 0x17, 0x90, + 0x42, 0x40, 0x18, 0x35, 0x2e, 0x17, 0xa0, 0x6e, + 0x43, 0xe7, 0xac, 0x89, 0x96, 0x3c, 0x16, 0xe0, + 0xdb, 0x09, 0x51, 0x4a, 0x45, 0x33, 0x63, 0xe9, + 0x4e, 0x3f, 0x32, 0x34, 0x36, 0x43, 0xd5, 0x0c, + 0x5a, 0x2e, 0x0e, 0x8b, 0x80, 0xb7, 0xf4, 0xe4, + 0x99, 0x9b, 0x05, 0xf5, 0xb2, 0xe4, 0x03, 0xe4, +}; + +const struct testvec aes_cbc_192_1_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t aes_cbc_192_encblkno8_vec0_ctxt[SECSIZE] = { + 0x87, 0x9c, 0x05, 0xd6, 0x25, 0xb9, 0xe0, 0xbe, + 0x78, 0x21, 0x85, 0x81, 0x8e, 0x2f, 0x13, 0x5e, + 0xf2, 0x73, 0x11, 0xfa, 0x73, 0x77, 0x93, 0x5e, + 0x71, 0x16, 0x98, 0x68, 0x6f, 0xe8, 0x22, 0x34, + 0xf5, 0x11, 0xfa, 0x61, 0xe6, 0x1a, 0xfb, 0x42, + 0xa7, 0xa3, 0x2e, 0x0d, 0xc1, 0x9d, 0x7d, 0xd9, + 0xfb, 0xbb, 0xc5, 0x08, 0x9d, 0xc2, 0xab, 0x5c, + 0xdf, 0x9b, 0x3c, 0x1a, 0xbd, 0x66, 0x5a, 0x91, + 0x1c, 0x00, 0x59, 0x2e, 0x92, 0xe9, 0x23, 0xf6, + 0x90, 0x3d, 0x5b, 0x72, 0x76, 0x78, 0xd9, 0xa2, + 0x48, 0x33, 0x29, 0xe2, 0xfd, 0x77, 0x14, 0xda, + 0x01, 0x92, 0x63, 0xdd, 0x8c, 0x1c, 0x2e, 0xf7, + 0x61, 0xfb, 0xc5, 0x76, 0xec, 0x7f, 0xef, 0xdc, + 0xbe, 0x2d, 0x3b, 0x69, 0x30, 0xb9, 0x08, 0x00, + 0xe8, 0x37, 0x09, 0xaa, 0x2a, 0x02, 0x80, 0x11, + 0x91, 0x16, 0x94, 0x7d, 0xb5, 0xdc, 0x9f, 0xb3, + 0xb0, 0x26, 0x72, 0x85, 0x93, 0x85, 0x19, 0x08, + 0x97, 0xef, 0x97, 0x57, 0xa8, 0x76, 0x0e, 0x85, + 0xb1, 0x1d, 0x79, 0xe3, 0x7a, 0xe8, 0x06, 0x3b, + 0xc4, 0x00, 0xbd, 0xaa, 0xd9, 0x17, 0x81, 0x37, + 0x12, 0x86, 0x52, 0xea, 0x04, 0xb2, 0x11, 0x0f, + 0x5a, 0x08, 0x68, 0xcb, 0x48, 0xca, 0x2f, 0xda, + 0xa3, 0x0a, 0x60, 0x57, 0xc7, 0x80, 0x36, 0x60, + 0x05, 0xce, 0xd5, 0x43, 0xc9, 0xbc, 0x6c, 0xe6, + 0x63, 0x38, 0x2e, 0x81, 0x90, 0x34, 0x11, 0x2c, + 0x84, 0x0c, 0x62, 0x68, 0xde, 0x17, 0x57, 0x43, + 0x19, 0xa5, 0x92, 0x9d, 0x91, 0x2b, 0xa2, 0x95, + 0x7c, 0x20, 0x72, 0xaa, 0x83, 0x24, 0x54, 0x94, + 0x10, 0x80, 0xd4, 0x3f, 0x58, 0xb9, 0x7b, 0x74, + 0x68, 0xd5, 0xfb, 0x3e, 0xdd, 0xb4, 0xdf, 0x65, + 0x72, 0x88, 0x45, 0x8a, 0xd0, 0x93, 0x6e, 0x99, + 0x84, 0xad, 0x39, 0x73, 0x16, 0x88, 0xdc, 0x89, + 0x33, 0x34, 0xd7, 0xd8, 0x97, 0xfb, 0x90, 0xd2, + 0xc5, 0x8e, 0x94, 0xc4, 0xf1, 0xfe, 0xbe, 0x23, + 0xf1, 0x3a, 0x10, 0x1c, 0x42, 0x6b, 0xf5, 0xee, + 0xe4, 0x78, 0x8a, 0x7e, 0x13, 0x02, 0x25, 0xcb, + 0xd1, 0x61, 0x1f, 0xab, 0x45, 0x1f, 0x90, 0x88, + 0x0f, 0x6b, 0xff, 0x61, 0xba, 0xf3, 0xac, 0x8e, + 0x13, 0xc2, 0xfb, 0xca, 0x41, 0xed, 0xfe, 0x6c, + 0xcb, 0xdf, 0x97, 0x60, 0x29, 0x8a, 0x72, 0x8d, + 0x7d, 0xad, 0x6e, 0xe9, 0x7b, 0xc4, 0x92, 0x14, + 0x5e, 0x33, 0x27, 0xe2, 0xda, 0x2f, 0x95, 0x5f, + 0x40, 0x27, 0xeb, 0xdb, 0x0d, 0x1e, 0xc5, 0xd4, + 0x43, 0x50, 0x1a, 0x62, 0x82, 0xbe, 0x24, 0x7f, + 0xb7, 0x46, 0xa8, 0x70, 0x10, 0x33, 0xb6, 0x3f, + 0xbf, 0xa8, 0xa8, 0x85, 0xab, 0x1d, 0xb4, 0x3f, + 0x84, 0x06, 0x91, 0xd6, 0x18, 0x3d, 0xeb, 0x8b, + 0x3f, 0x9b, 0x37, 0x9e, 0x2e, 0xd2, 0xec, 0xe5, + 0x2d, 0xf0, 0x3f, 0x45, 0xd5, 0x9d, 0xb9, 0x28, + 0x89, 0xe4, 0x0c, 0xa9, 0x38, 0xca, 0x22, 0x56, + 0x53, 0xdf, 0x49, 0xba, 0x5d, 0x99, 0xd6, 0x4b, + 0x1d, 0x0d, 0x6d, 0xee, 0x7c, 0xf2, 0x6f, 0x50, + 0x04, 0xf1, 0xf8, 0x49, 0xd1, 0x2f, 0x50, 0x3e, + 0xf1, 0x08, 0x49, 0x17, 0x08, 0xd2, 0xac, 0x5d, + 0x58, 0xe7, 0x27, 0xe6, 0x59, 0x02, 0x9f, 0x1c, + 0x40, 0xff, 0x6c, 0x67, 0xae, 0x49, 0x1a, 0x2a, + 0xab, 0xd9, 0x63, 0x25, 0x2d, 0x9b, 0xd8, 0x1a, + 0x41, 0xa6, 0xea, 0x72, 0xfd, 0x56, 0xa1, 0x57, + 0x59, 0xdd, 0xf5, 0xa3, 0xb2, 0x2f, 0x64, 0xb1, + 0xc5, 0xfe, 0x8d, 0x9b, 0x93, 0xd1, 0x51, 0x77, + 0x13, 0x50, 0x74, 0x30, 0x28, 0xe4, 0x7a, 0x06, + 0x69, 0xd4, 0xa8, 0x0a, 0xae, 0x02, 0x4a, 0x61, + 0x24, 0xc2, 0xcd, 0xc8, 0xd3, 0x12, 0x2e, 0xac, + 0x9a, 0x0c, 0x24, 0x06, 0xb8, 0x1e, 0x3d, 0x29, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t aes_cbc_192_encblkno8_vec1_ctxt[SECSIZE] = { + 0x1e, 0x3b, 0x66, 0x76, 0xd9, 0x9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2, 0x80, 0x41, + 0x4d, 0xa0, 0xbc, 0x00, 0xaf, 0x30, 0xe4, 0x34, + 0x61, 0xda, 0xb4, 0xff, 0x2a, 0x85, 0x8b, 0x1a, + 0xbf, 0xb5, 0xe4, 0x7f, 0x27, 0xee, 0xf3, 0x25, + 0xe6, 0x52, 0x2a, 0x83, 0xbe, 0xe4, 0x64, 0xc3, + 0x67, 0x0c, 0x9e, 0x0f, 0xba, 0xb4, 0x67, 0xd1, + 0x1b, 0x4a, 0xb0, 0xb2, 0xb4, 0xf2, 0x8a, 0x1b, + 0x21, 0x34, 0x3c, 0x97, 0x5a, 0xdb, 0x92, 0x8b, + 0x2d, 0xe9, 0x94, 0x4e, 0x11, 0xfb, 0xd4, 0x2e, + 0xc2, 0xed, 0xf9, 0x75, 0xfd, 0x1a, 0xef, 0x3b, + 0x98, 0x5d, 0xa9, 0x75, 0xd5, 0x14, 0x0a, 0xe3, + 0xda, 0x07, 0xa6, 0x20, 0x7b, 0x49, 0x47, 0x87, + 0xff, 0xf0, 0xe8, 0x7e, 0xcf, 0xc4, 0x2c, 0x02, + 0xdd, 0x53, 0xe9, 0x79, 0xc7, 0x6d, 0x16, 0x9f, + 0x2b, 0xd7, 0x1a, 0x36, 0x25, 0x5c, 0xba, 0x5c, + 0xdb, 0x44, 0x88, 0x99, 0x32, 0x2e, 0xb6, 0x3f, + 0xb4, 0xdd, 0x15, 0xeb, 0xec, 0x2a, 0x9e, 0xc5, + 0x37, 0x30, 0x2a, 0xd5, 0xc4, 0x2a, 0x9b, 0x40, + 0x97, 0x83, 0x94, 0xe7, 0x79, 0x79, 0x63, 0x4b, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t aes_cbc_192_encblkno8_vec2_ctxt[SECSIZE] = { + 0x34, 0x07, 0x20, 0x14, 0x64, 0x0b, 0xa2, 0x2c, + 0xed, 0xba, 0x46, 0x24, 0xa0, 0xe6, 0x99, 0x8a, + 0x20, 0x75, 0x5f, 0x9f, 0x2a, 0x10, 0xa6, 0x1c, + 0x52, 0x60, 0x18, 0x67, 0xd6, 0x0d, 0x90, 0x4e, + 0xbc, 0x25, 0x5f, 0x81, 0xb4, 0x10, 0xdb, 0xd9, + 0xaf, 0x36, 0x84, 0x5c, 0x20, 0x25, 0x25, 0xbf, + 0x0d, 0xfa, 0xc5, 0x75, 0x2b, 0xec, 0xf2, 0xa6, + 0x69, 0x5c, 0xfe, 0xee, 0x21, 0xd8, 0x87, 0xdf, + 0xe3, 0x83, 0xeb, 0xb3, 0x3f, 0x5b, 0xda, 0x37, + 0x11, 0x05, 0xf7, 0xd8, 0xe0, 0x94, 0x08, 0x2b, + 0x75, 0x6b, 0xf3, 0x40, 0x53, 0x85, 0xde, 0x7a, + 0x64, 0xb1, 0x0e, 0x5f, 0x01, 0xb5, 0xfb, 0x74, + 0x48, 0x9a, 0xd4, 0x41, 0x33, 0x70, 0x9b, 0x08, + 0x7e, 0x34, 0x60, 0xfc, 0xfa, 0xe6, 0x2c, 0xec, + 0x0e, 0xb7, 0x1a, 0xf1, 0x49, 0x48, 0x0c, 0xd4, + 0xd7, 0xbc, 0x60, 0x28, 0xdb, 0x57, 0xa4, 0x29, + 0x55, 0x2d, 0x92, 0xa6, 0xca, 0x9a, 0xaf, 0x4d, + 0x7f, 0xb8, 0x29, 0x9f, 0x50, 0x98, 0x21, 0x94, + 0x7a, 0x94, 0x44, 0x3d, 0xd1, 0xcf, 0xf4, 0x6f, + 0xad, 0xb4, 0x58, 0x66, 0x74, 0x01, 0x2c, 0x5b, + 0x8f, 0x1b, 0xa6, 0x09, 0xd0, 0x3f, 0x79, 0xc9, + 0x4f, 0x3b, 0x37, 0x0d, 0xb8, 0x07, 0xb0, 0x61, + 0xbc, 0x5a, 0x40, 0x3a, 0x10, 0x3c, 0x12, 0xe6, + 0x04, 0xc7, 0xd1, 0xe1, 0x18, 0x6f, 0xde, 0x72, + 0xf5, 0xcf, 0x24, 0x58, 0x76, 0xe1, 0xcd, 0x62, + 0x90, 0xc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x80, 0xc3, 0xf3, + 0xce, 0x5e, 0xfc, 0x56, 0xd9, 0x45, 0xdd, 0x81, + 0xe3, 0x48, 0x22, 0xc9, 0xb8, 0x13, 0xc1, 0x48, + 0x6c, 0x95, 0x97, 0xc0, 0x91, 0x37, 0xf5, 0x8a, + 0x11, 0x3b, 0xab, 0xce, 0x7a, 0xb0, 0xb4, 0x4c, + 0xba, 0xc0, 0x91, 0x7f, 0x3c, 0x27, 0xe9, 0xc0, + 0x58, 0x92, 0x70, 0x67, 0xf4, 0x80, 0x40, 0x92, + 0x51, 0x80, 0x8e, 0x9d, 0x2d, 0x87, 0x89, 0x8e, + 0xe7, 0xd1, 0xb5, 0xc5, 0x4f, 0xd0, 0x86, 0x31, + 0x7f, 0x90, 0x77, 0x05, 0x35, 0xfe, 0xa7, 0xcb, + 0x9d, 0x94, 0xf3, 0xf8, 0xbb, 0x4f, 0xe1, 0xb3, + 0x48, 0x57, 0xbf, 0xd1, 0x77, 0xe8, 0x72, 0x31, + 0x4d, 0x2f, 0xe8, 0xa0, 0xf4, 0x7c, 0x25, 0x9c, + 0xcd, 0xa5, 0x7e, 0xd3, 0x30, 0xda, 0x46, 0xf5, + 0x48, 0x9e, 0x39, 0x34, 0x94, 0xd6, 0x24, 0x10, + 0xfc, 0x74, 0x2b, 0x6d, 0xcc, 0x00, 0x76, 0x3e, + 0x3b, 0x85, 0xfa, 0xef, 0x87, 0x70, 0x53, 0x4e, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t aes_cbc_192_encblkno8_vec3_ctxt[SECSIZE] = { + 0xfe, 0xad, 0xf3, 0x4a, 0x9d, 0x64, 0x4e, 0x5d, + 0xaf, 0xa8, 0x44, 0x7e, 0xc9, 0x75, 0xe8, 0xd0, + 0x87, 0x73, 0x66, 0x4c, 0x77, 0x00, 0xfb, 0x7b, + 0x04, 0xe7, 0xd8, 0x82, 0x75, 0xe3, 0xa5, 0xbc, + 0xf3, 0x80, 0xae, 0x7c, 0xc9, 0x75, 0x9a, 0xc1, + 0x73, 0x49, 0x69, 0xf6, 0xa0, 0x49, 0x6e, 0x77, + 0x5f, 0x9b, 0x95, 0x9b, 0x9f, 0x41, 0x54, 0x57, + 0x0e, 0x3c, 0xe5, 0x2c, 0xbb, 0xbf, 0xd5, 0x76, + 0xf6, 0xb6, 0x05, 0xaa, 0x20, 0x5b, 0xdb, 0xcb, + 0x81, 0xad, 0x0c, 0x8a, 0x68, 0x94, 0x7d, 0x88, + 0xdc, 0x15, 0x6c, 0x89, 0x97, 0x53, 0x30, 0x96, + 0x4a, 0x54, 0xf9, 0x88, 0x00, 0xf7, 0x3b, 0x99, + 0xfc, 0x82, 0xe3, 0x48, 0xd2, 0x16, 0x2b, 0xba, + 0xd4, 0xba, 0x24, 0xd0, 0xd1, 0xb0, 0x8e, 0xcd, + 0x77, 0xdc, 0x01, 0xdf, 0xb2, 0x20, 0xc5, 0xa7, + 0x48, 0x2a, 0xcf, 0x56, 0xc8, 0x63, 0x6e, 0xc9, + 0xa8, 0xa4, 0xc2, 0x9c, 0x66, 0x25, 0x50, 0x77, + 0x08, 0x51, 0x92, 0xce, 0x3c, 0xaf, 0xff, 0xee, + 0x3e, 0x6d, 0x61, 0x37, 0xcd, 0x85, 0x67, 0x9c, + 0xe0, 0x7e, 0xa6, 0x17, 0x7b, 0x5f, 0x6a, 0xe2, + 0x4e, 0x76, 0xca, 0x95, 0x88, 0xdf, 0xad, 0x78, + 0x91, 0xfa, 0x9e, 0x71, 0x3e, 0xfd, 0x10, 0x78, + 0x32, 0x2b, 0x75, 0xbc, 0x3a, 0x06, 0x55, 0x8b, + 0x9b, 0xfb, 0x9c, 0x4b, 0xa1, 0x7d, 0x35, 0x3d, + 0x63, 0x80, 0x30, 0x61, 0xe0, 0x2d, 0x8a, 0x28, + 0xb4, 0x2d, 0x48, 0x9d, 0x27, 0x1a, 0x28, 0x86, + 0xfc, 0xfa, 0x93, 0xcf, 0x3e, 0x9c, 0x41, 0xc8, + 0xc5, 0x5e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0xed, 0x04, + 0x7b, 0x37, 0xa1, 0x1d, 0x9c, 0x90, 0x19, 0xb1, + 0xdd, 0xc3, 0x22, 0xc8, 0x70, 0x07, 0x26, 0xce, + 0x4a, 0xc4, 0xde, 0xee, 0x87, 0xf3, 0x62, 0x69, + 0xed, 0xb2, 0x2d, 0x10, 0xc4, 0xfa, 0x86, 0x2e, + 0xd1, 0xb8, 0x58, 0xa3, 0xa4, 0x0b, 0x30, 0x87, + 0x23, 0x62, 0xed, 0xf3, 0x7b, 0x80, 0x7e, 0x4f, + 0xc2, 0xb3, 0xe8, 0xba, 0x25, 0x3e, 0xd3, 0x12, + 0x7e, 0x27, 0xd5, 0x72, 0x3b, 0x02, 0xf4, 0xfd, + 0x2f, 0x8b, 0xc2, 0x5f, 0x44, 0x40, 0x31, 0x88, + 0x73, 0x81, 0xa3, 0xcc, 0xc4, 0x78, 0x2b, 0xfc, + 0x41, 0x2e, 0xb2, 0xd0, 0xb4, 0x00, 0x29, 0xc1, + 0x46, 0xdf, 0xc1, 0xbd, 0x15, 0x59, 0xa3, 0x6a, + 0xc8, 0x2f, 0x29, 0x28, 0x12, 0x9b, 0x1e, 0xea, + 0x4e, 0xa9, 0x80, 0xa1, 0xb8, 0x89, 0x21, 0x3b, +}; + +const struct testvec aes_cbc_192_8_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_192_encblkno8_vec3_ctxt, + }, +}; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t aes_cbc_256_encblkno1_vec0_ctxt[SECSIZE] = { + 0x1a, 0xa4, 0xe3, 0x09, 0x23, 0x2e, 0x91, 0x1b, + 0xa8, 0x3e, 0xda, 0x92, 0xb3, 0x22, 0xd2, 0xe8, + 0x8b, 0xed, 0x6c, 0xa7, 0x78, 0xe6, 0x32, 0x25, + 0xc4, 0x88, 0xd5, 0xb7, 0x6e, 0xef, 0xbf, 0x37, + 0x00, 0xd9, 0xb2, 0x55, 0x10, 0x4f, 0x7d, 0x84, + 0x3a, 0xae, 0xd2, 0xc6, 0x48, 0xdd, 0x3c, 0xd5, + 0x9b, 0xa7, 0xf8, 0xc2, 0xda, 0x6d, 0x14, 0xa2, + 0xdc, 0x54, 0x12, 0x8f, 0x1c, 0x22, 0x98, 0x6a, + 0xc0, 0x5f, 0x47, 0xa7, 0x78, 0xec, 0x79, 0x5d, + 0x04, 0xed, 0x5e, 0x20, 0x33, 0x53, 0x66, 0x40, + 0x83, 0x94, 0x5b, 0x34, 0x05, 0x25, 0x2e, 0x17, + 0xba, 0x23, 0x60, 0xb1, 0xd0, 0x27, 0xf0, 0x24, + 0xd2, 0x0b, 0xd3, 0xea, 0xa7, 0x13, 0x1e, 0xf9, + 0x56, 0xe1, 0xd4, 0xa2, 0x89, 0x5a, 0xaa, 0x42, + 0xa9, 0xd7, 0x85, 0x64, 0x9e, 0x44, 0x71, 0xa2, + 0xf9, 0xc3, 0xf4, 0x81, 0xbd, 0xa0, 0x40, 0xed, + 0x33, 0xeb, 0x09, 0x0f, 0x7f, 0x78, 0xe4, 0xd5, + 0x7b, 0x61, 0x42, 0xee, 0x65, 0x25, 0xcc, 0xba, + 0xc6, 0x99, 0x29, 0x25, 0x71, 0x9a, 0xf0, 0x0e, + 0x98, 0x3f, 0x12, 0xf2, 0xf9, 0x4d, 0x00, 0x3c, + 0xbe, 0x9f, 0x2b, 0x83, 0x1e, 0x5b, 0xab, 0x80, + 0x4c, 0x81, 0x82, 0x29, 0xbb, 0xeb, 0xc0, 0x89, + 0x07, 0x43, 0xdd, 0x69, 0xd3, 0x02, 0x6c, 0x1c, + 0x4b, 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0x68, 0xec, 0x74, + 0x67, 0xee, 0xbd, 0xb8, 0xc6, 0x12, 0x91, 0x0f, + 0xf6, 0xd9, 0x4f, 0x34, 0x96, 0xa9, 0xe7, 0x52, + 0x7b, 0xe0, 0x08, 0x57, 0x0a, 0x8b, 0x09, 0xcb, + 0xd3, 0x3e, 0x4e, 0x64, 0xca, 0x38, 0x50, 0x07, + 0x0e, 0x7b, 0x95, 0x69, 0x1b, 0x82, 0xba, 0x50, + 0x93, 0x4f, 0x9a, 0x8e, 0x11, 0x9b, 0x64, 0xf5, + 0x6a, 0xd4, 0x81, 0xf0, 0x1f, 0xb8, 0x85, 0x90, + 0x9c, 0x79, 0xde, 0xcb, 0x50, 0xba, 0xa9, 0x56, + 0x66, 0xd1, 0x1e, 0x78, 0xa8, 0x6a, 0xd5, 0xa5, + 0x83, 0x73, 0xe2, 0x88, 0xf2, 0x04, 0x33, 0x61, + 0xdf, 0x89, 0xd5, 0x3d, 0x03, 0x4e, 0x94, 0xb0, + 0x0f, 0x8d, 0x4d, 0xb4, 0x09, 0xb2, 0xf1, 0xb0, + 0xe7, 0xfe, 0xb0, 0x18, 0xe2, 0xfc, 0x92, 0xeb, + 0x2d, 0x7d, 0x56, 0x29, 0xbd, 0x34, 0x20, 0x7c, + 0xb6, 0xe7, 0x7b, 0xd7, 0x95, 0xa5, 0x0d, 0x10, + 0xbc, 0x7d, 0x9d, 0xd9, 0xbe, 0xc7, 0x23, 0x44, + 0x37, 0xb3, 0x98, 0x36, 0x33, 0x1a, 0x11, 0xfe, + 0x41, 0xea, 0x59, 0x48, 0x75, 0x34, 0xf6, 0xc4, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t aes_cbc_256_encblkno1_vec1_ctxt[SECSIZE] = { + 0x58, 0xfc, 0x1e, 0x48, 0x66, 0x7d, 0x91, 0xc7, + 0x56, 0xa3, 0x41, 0x89, 0xe8, 0x1e, 0x02, 0x77, + 0x93, 0x38, 0x12, 0x99, 0x06, 0x0d, 0xf3, 0x6d, + 0x2a, 0x5d, 0x3d, 0x7b, 0x4e, 0x05, 0x4f, 0x8f, + 0xe3, 0x86, 0x76, 0xfe, 0x11, 0x9d, 0xde, 0xd4, + 0x83, 0xd9, 0x47, 0x8d, 0x51, 0xdf, 0x4a, 0x24, + 0x2d, 0x11, 0xf0, 0xbd, 0xde, 0x17, 0x7e, 0x52, + 0x20, 0xc7, 0x17, 0x88, 0x2e, 0xa4, 0xd5, 0xa0, + 0x1e, 0xbc, 0x61, 0x15, 0x1e, 0x52, 0xa1, 0x8b, + 0xe9, 0xe4, 0x1f, 0x81, 0x49, 0x64, 0x17, 0xd4, + 0xef, 0xb6, 0x40, 0x05, 0x2f, 0x36, 0xf7, 0x39, + 0x03, 0x05, 0x80, 0xff, 0xf2, 0x1a, 0x15, 0xf1, + 0xfc, 0xaf, 0x71, 0x51, 0x73, 0xc5, 0x9e, 0x2f, + 0xd1, 0x7a, 0x2d, 0xd7, 0xed, 0x90, 0x11, 0xd2, + 0x80, 0x49, 0x46, 0x9f, 0x13, 0xa7, 0x32, 0x33, + 0x24, 0x39, 0x59, 0xf1, 0xed, 0x64, 0x75, 0x61, + 0xc3, 0x14, 0x68, 0x48, 0xf7, 0xc7, 0xbd, 0xe0, + 0x21, 0x59, 0x91, 0x07, 0x70, 0x83, 0x8f, 0xfc, + 0x59, 0x72, 0xca, 0xdd, 0x60, 0xa0, 0xbb, 0xb1, + 0x2f, 0xb8, 0x98, 0x8d, 0xf2, 0x4d, 0x3a, 0x19, + 0xbc, 0x6b, 0x37, 0xad, 0xd2, 0xb5, 0x7d, 0x1c, + 0x4a, 0x7b, 0x58, 0x76, 0x2e, 0xf5, 0x6b, 0xaf, + 0x4c, 0x92, 0x00, 0x8a, 0xb4, 0xa3, 0x86, 0x66, + 0x07, 0xc7, 0xfc, 0x57, 0x3c, 0x73, 0xf4, 0x8b, + 0xef, 0xb6, 0xae, 0x01, 0xfb, 0x88, 0x13, 0x04, + 0xa8, 0xc7, 0xec, 0x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 0x16, + 0x45, 0x55, 0x21, 0xbc, 0x7c, 0x52, 0x87, 0x0f, + 0xb9, 0xbf, 0x71, 0x7c, 0x3a, 0x81, 0x72, 0x97, + 0xf8, 0x86, 0x61, 0x20, 0x17, 0xd8, 0xc8, 0xe0, + 0xfc, 0x42, 0x0f, 0x5b, 0xd6, 0x7e, 0x99, 0x81, + 0x5c, 0x2e, 0x2e, 0x3e, 0xe8, 0xce, 0x12, 0xcf, + 0x2c, 0xe6, 0x7a, 0x00, 0x5d, 0x36, 0x00, 0x92, + 0x60, 0xc5, 0xc0, 0xfd, 0xe0, 0xa3, 0xb9, 0x3e, + 0x92, 0xf8, 0x8f, 0xe2, 0x0f, 0xe5, 0xb4, 0x6a, + 0xd6, 0x5b, 0xa4, 0x5d, 0xf9, 0xef, 0x7e, 0xae, + 0xdd, 0xd0, 0x5d, 0x40, 0xfe, 0xa7, 0xed, 0xda, + 0xa9, 0x48, 0x1d, 0x6f, 0xc2, 0xd3, 0x35, 0x65, + 0xd8, 0x67, 0xc2, 0x9d, 0xed, 0xf7, 0x9f, 0x7b, + 0x7c, 0xd4, 0x03, 0xe0, 0xa6, 0xf9, 0x3c, 0xd0, + 0x21, 0x98, 0x60, 0xa6, 0x59, 0x86, 0xbd, 0x40, + 0x17, 0x47, 0x82, 0xb9, 0xe1, 0x11, 0x8d, 0x4b, + 0xcd, 0x1f, 0x54, 0x96, 0x17, 0x42, 0x22, 0x44, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t aes_cbc_256_encblkno1_vec2_ctxt[SECSIZE] = { + 0x1d, 0x65, 0xb2, 0x4e, 0xfa, 0x3f, 0xdb, 0xab, + 0x34, 0x9d, 0x37, 0x03, 0x17, 0x44, 0xed, 0x5b, + 0xf7, 0x1b, 0x6b, 0xc0, 0x5c, 0xfe, 0x5b, 0xcd, + 0xf0, 0xaf, 0x26, 0x82, 0x97, 0x12, 0xb8, 0x4f, + 0x76, 0x3d, 0x07, 0xd8, 0x29, 0x56, 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, 0x00, 0x77, + 0x3b, 0x60, 0x75, 0x04, 0x06, 0x4a, 0x5a, 0x64, + 0x6f, 0x2f, 0x58, 0x77, 0x27, 0x9a, 0xc5, 0x90, + 0x37, 0xa7, 0xf3, 0x89, 0x72, 0x47, 0x4e, 0x08, + 0xa5, 0x79, 0x11, 0x2f, 0x22, 0x5a, 0xbb, 0xcf, + 0x76, 0xb9, 0x28, 0xc8, 0xc4, 0x5a, 0xe5, 0x90, + 0xf7, 0x02, 0xe4, 0xf9, 0x0c, 0x4c, 0x9a, 0xb1, + 0xa7, 0x99, 0x34, 0xd4, 0x77, 0x66, 0xff, 0x3c, + 0x50, 0x9a, 0xff, 0x13, 0x49, 0xd6, 0x5a, 0xf6, + 0x17, 0x6f, 0xca, 0x1a, 0xef, 0x0a, 0x2d, 0xf1, + 0xdf, 0xd0, 0xa5, 0x6f, 0xa6, 0x22, 0x3c, 0x1f, + 0xcf, 0xe7, 0xec, 0x23, 0x39, 0x6e, 0xc0, 0x37, + 0x31, 0x84, 0xff, 0xe2, 0x5a, 0xd6, 0x88, 0x74, + 0x15, 0x15, 0x46, 0x21, 0x00, 0xe4, 0x13, 0x9a, + 0xfa, 0xb2, 0x49, 0x7e, 0x79, 0xfb, 0x8a, 0x2a, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t aes_cbc_256_encblkno1_vec3_ctxt[SECSIZE] = { + 0xc1, 0x4a, 0x3c, 0x90, 0xba, 0xd4, 0x9c, 0xe7, + 0xf2, 0x5b, 0x3a, 0xc4, 0xce, 0x4a, 0x26, 0x4a, + 0x9c, 0x3f, 0xe5, 0x7a, 0x15, 0xbb, 0xbd, 0x3e, + 0xc6, 0x49, 0x47, 0x04, 0x4e, 0x8b, 0x73, 0xa6, + 0x02, 0x3a, 0xc1, 0xa3, 0xfa, 0x1a, 0xd0, 0x03, + 0xf7, 0x26, 0x9f, 0xad, 0x06, 0x8f, 0x86, 0xdc, + 0xb8, 0x73, 0x87, 0xa2, 0x82, 0xc6, 0x80, 0xe1, + 0xac, 0x3d, 0x16, 0x4c, 0xc3, 0x7c, 0x86, 0x01, + 0xa5, 0x7a, 0x1c, 0x4b, 0x56, 0x68, 0xf6, 0x06, + 0x99, 0x32, 0x42, 0x40, 0xf1, 0xb7, 0x44, 0x4b, + 0xd1, 0xdb, 0xad, 0x4e, 0xa6, 0xc2, 0x5f, 0xee, + 0x21, 0x1d, 0x58, 0xc6, 0xd5, 0x02, 0xef, 0xb2, + 0x38, 0xef, 0x29, 0x25, 0xfd, 0x28, 0x8a, 0x5b, + 0x8b, 0x36, 0x1a, 0xd6, 0x68, 0xf8, 0x77, 0xed, + 0xba, 0xb3, 0xa5, 0x6f, 0x76, 0x5e, 0xb5, 0xd4, + 0xc3, 0xb8, 0xf9, 0x67, 0x7a, 0x18, 0x43, 0xb6, + 0x65, 0x07, 0x48, 0x1d, 0x56, 0x20, 0x11, 0xe1, + 0x62, 0x6b, 0x70, 0xc9, 0x18, 0xa9, 0xa7, 0x36, + 0xbf, 0x31, 0x74, 0xe3, 0x33, 0x02, 0x96, 0x7a, + 0xf5, 0xd9, 0x8d, 0x05, 0x2b, 0xfd, 0x85, 0x4f, + 0x03, 0x0f, 0xe1, 0xfb, 0x1a, 0x57, 0xaf, 0xdc, + 0xff, 0xff, 0x5a, 0x96, 0x27, 0xca, 0xf3, 0x0c, + 0xd8, 0x39, 0x3e, 0xbe, 0x41, 0x5a, 0x21, 0x95, + 0x66, 0xe0, 0x69, 0x14, 0x2b, 0x18, 0xf2, 0x9b, + 0xf4, 0x22, 0xdf, 0xa9, 0xe4, 0x7d, 0x32, 0x5d, + 0x98, 0xa0, 0xe0, 0xe1, 0xe1, 0xbe, 0xae, 0x58, + 0x63, 0xbe, 0x4b, 0x97, 0x83, 0xaa, 0x67, 0xd3, + 0x1a, 0x70, 0xca, 0x82, 0x98, 0x77, 0x74, 0x1a, + 0xf2, 0x3d, 0x6a, 0x7b, 0x8e, 0xc8, 0xca, 0x34, + 0x44, 0xb8, 0xc0, 0xd0, 0x77, 0x8c, 0x4a, 0x5c, + 0xae, 0xd3, 0x17, 0x7c, 0x12, 0x47, 0x3e, 0xe2, + 0x2e, 0x51, 0xe0, 0x52, 0x88, 0x8e, 0xe9, 0x68, + 0xb6, 0x13, 0xf8, 0x69, 0xc9, 0x4b, 0xdd, 0x91, + 0x27, 0xb0, 0x22, 0x0c, 0x7d, 0xad, 0xb0, 0x75, + 0xe8, 0x76, 0x34, 0xc2, 0xd9, 0xf3, 0x20, 0xf7, + 0x1d, 0x0f, 0x07, 0x61, 0xc2, 0xb8, 0x7d, 0x00, + 0xa6, 0x68, 0xad, 0xd4, 0x0b, 0xa4, 0xa0, 0x32, + 0x6d, 0xa5, 0xc0, 0x07, 0x65, 0xae, 0xda, 0x2e, + 0xd6, 0xb7, 0xd3, 0x99, 0x8b, 0x37, 0x08, 0x13, + 0x6a, 0x94, 0xe9, 0xe4, 0xea, 0x34, 0xee, 0x07, + 0xee, 0x77, 0xb1, 0x3f, 0x54, 0x05, 0xbe, 0x66, + 0x7f, 0xf2, 0x70, 0x34, 0x45, 0xa7, 0x4b, 0x27, + 0xef, 0xe6, 0x39, 0x2e, 0x13, 0x41, 0xdb, 0x2d, + 0x1f, 0x76, 0x11, 0x76, 0x33, 0xf3, 0x92, 0x33, + 0x69, 0x16, 0x34, 0x86, 0x23, 0xc5, 0xfa, 0xaf, + 0xff, 0xbf, 0xee, 0x84, 0x56, 0xf6, 0x1e, 0x54, + 0x37, 0x32, 0x79, 0x83, 0x45, 0x04, 0x6f, 0x0e, + 0x75, 0x75, 0xd9, 0xd6, 0x4a, 0x87, 0xfb, 0x3c, + 0xb1, 0xcf, 0x66, 0xab, 0xa4, 0xaa, 0xf6, 0x96, + 0xb0, 0xcd, 0xaf, 0xac, 0x2c, 0x6d, 0x72, 0xca, + 0x43, 0xef, 0xb7, 0xa0, 0x4c, 0x62, 0xba, 0x7e, + 0x59, 0x0b, 0xff, 0x90, 0x49, 0x63, 0xf6, 0x31, + 0x8b, 0x50, 0x20, 0x82, 0x7d, 0xf0, 0x2d, 0xe4, + 0x5b, 0xda, 0xdf, 0xb0, 0xfb, 0x07, 0x7b, 0xe3, + 0x5f, 0xac, 0xd8, 0xe5, 0xa0, 0x3e, 0xc5, 0x60, + 0x94, 0xbc, 0xf7, 0x7e, 0xdc, 0x18, 0x27, 0x20, + 0xb1, 0xdd, 0x51, 0x4a, 0xb2, 0xe0, 0xc0, 0xe7, + 0x5d, 0x0f, 0x88, 0xb2, 0xa0, 0x42, 0x73, 0xfb, + 0xc4, 0x24, 0xa7, 0x17, 0x8a, 0xc9, 0x6d, 0x34, + 0xe8, 0x7b, 0x51, 0x37, 0x32, 0x3f, 0xf8, 0x7e, + 0x92, 0xe4, 0x87, 0xd2, 0x89, 0x66, 0xb0, 0xf6, + 0xc2, 0xba, 0x2f, 0x42, 0x8f, 0x1d, 0x5d, 0x81, + 0xad, 0xfd, 0x00, 0xbc, 0xa9, 0x11, 0x96, 0xae, + 0x80, 0xf1, 0x27, 0xe0, 0xeb, 0x5b, 0x60, 0x39, +}; + +const struct testvec aes_cbc_256_1_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t aes_cbc_256_encblkno8_vec0_ctxt[SECSIZE] = { + 0xe5, 0x55, 0xd9, 0xae, 0xc0, 0x66, 0x2d, 0x2f, + 0x11, 0xb1, 0x27, 0xd2, 0xb2, 0x73, 0xe4, 0x0a, + 0x85, 0xb5, 0x3c, 0x79, 0x78, 0x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2b, 0x98, 0x3f, 0x4f, 0x97, 0xf2, 0xed, + 0xf7, 0x9b, 0x89, 0x4e, 0xd6, 0x59, 0xbb, 0x24, + 0x22, 0x44, 0x9f, 0x03, 0xb5, 0x42, 0xc8, 0x97, + 0xc7, 0xdb, 0x21, 0xfc, 0xcf, 0x33, 0xa1, 0xf1, + 0xc0, 0x1f, 0x28, 0x77, 0xee, 0xa5, 0x6a, 0x12, + 0xef, 0x8b, 0x48, 0xd1, 0xb3, 0xac, 0x65, 0x69, + 0x46, 0x04, 0x39, 0xb1, 0x9e, 0xfa, 0xab, 0x21, + 0x51, 0xa4, 0x33, 0xe9, 0x58, 0x5d, 0xf1, 0xc6, + 0x69, 0x44, 0x8c, 0x17, 0xf9, 0xaa, 0x96, 0xcb, + 0x40, 0xb4, 0x5c, 0x83, 0x76, 0x1e, 0x8a, 0x2b, + 0x5f, 0x6b, 0xc1, 0x73, 0xd4, 0x5f, 0x48, 0xa3, + 0x0e, 0x07, 0x69, 0x12, 0xc1, 0xbd, 0x13, 0xad, + 0xe2, 0xcf, 0x3d, 0x96, 0xd8, 0xaf, 0xed, 0xdc, + 0x4c, 0x72, 0xf6, 0xce, 0x15, 0x86, 0x88, 0x8c, + 0xbb, 0x60, 0xb3, 0xb9, 0xde, 0x42, 0x58, 0x6e, + 0xc4, 0x58, 0xac, 0x77, 0x8d, 0x35, 0x23, 0x5f, + 0xc3, 0xf9, 0x33, 0x46, 0x17, 0x80, 0x31, 0xfd, + 0xcd, 0x0a, 0x1e, 0x9b, 0xac, 0x42, 0xda, 0x70, + 0x54, 0x9a, 0xeb, 0x22, 0x27, 0x09, 0x0c, 0x6c, + 0x18, 0x1d, 0x1a, 0x5b, 0x86, 0x4d, 0x80, 0xca, + 0x4d, 0xda, 0x0e, 0x9a, 0x8e, 0x61, 0x04, 0x68, + 0x29, 0x08, 0x3b, 0xae, 0x14, 0x7d, 0x8e, 0x43, + 0x7a, 0xa7, 0x83, 0xcf, 0xb3, 0x95, 0xd3, 0x42, + 0x2d, 0x6b, 0xd8, 0x5c, 0x43, 0x31, 0x5b, 0x9c, + 0x18, 0x30, 0x0d, 0x61, 0x9c, 0xab, 0x29, 0x55, + 0xdd, 0x84, 0x24, 0x21, 0xec, 0x44, 0xad, 0xf3, + 0xb3, 0x70, 0x77, 0x2b, 0xfc, 0x3f, 0x99, 0xb8, + 0x50, 0x26, 0x8d, 0x96, 0xa2, 0x22, 0x99, 0x33, + 0x53, 0xa8, 0x5d, 0x84, 0x9b, 0x76, 0x26, 0x6e, + 0x75, 0x14, 0x7e, 0x63, 0xc6, 0x7a, 0x4f, 0x5c, + 0xfe, 0x4b, 0x80, 0xee, 0xb3, 0x32, 0x8d, 0x25, + 0x1c, 0x80, 0x7b, 0x3d, 0xd3, 0x84, 0x01, 0x1e, + 0x16, 0xa4, 0xca, 0x0d, 0x38, 0x40, 0x03, 0x6f, + 0x81, 0x8b, 0x5c, 0xad, 0x22, 0xfa, 0x6f, 0xeb, + 0x60, 0xa1, 0xcb, 0x2d, 0x97, 0xf8, 0xa6, 0x5e, + 0xbe, 0x93, 0xb7, 0xe6, 0x66, 0xbf, 0x9b, 0xd2, + 0x5c, 0x31, 0xcc, 0x70, 0x0c, 0xf1, 0xfb, 0x9f, + 0x09, 0x1b, 0xc2, 0x85, 0x2f, 0x22, 0x7c, 0x95, + 0x58, 0x09, 0xce, 0x9c, 0x7c, 0x50, 0xca, 0x89, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t aes_cbc_256_encblkno8_vec1_ctxt[SECSIZE] = { + 0x37, 0x4d, 0x25, 0xdb, 0x35, 0xe0, 0x8b, 0x82, + 0x5f, 0x77, 0xd2, 0x53, 0xd1, 0x1f, 0xf0, 0x91, + 0x5b, 0xd8, 0x93, 0x2f, 0xb2, 0x81, 0xbd, 0x75, + 0xf0, 0xd8, 0xff, 0x46, 0x8c, 0x9d, 0xf6, 0xe2, + 0x99, 0x1e, 0x76, 0x9d, 0x00, 0x3a, 0xe3, 0xcf, + 0x6d, 0x24, 0xa8, 0xe8, 0xb4, 0xa7, 0xa0, 0x87, + 0xa8, 0x43, 0x01, 0x21, 0x29, 0x70, 0x39, 0x2d, + 0x0b, 0x2a, 0xe9, 0x11, 0x57, 0x86, 0x13, 0xd4, + 0x1c, 0x1b, 0x59, 0x19, 0xc4, 0x7d, 0x2c, 0x94, + 0xc7, 0x01, 0xb8, 0x96, 0x01, 0xd2, 0x01, 0x17, + 0x97, 0x41, 0x68, 0xab, 0xba, 0x9c, 0xc8, 0xad, + 0x4e, 0xd7, 0xa8, 0x4c, 0x96, 0x3f, 0xf9, 0xfc, + 0x7e, 0xd7, 0x59, 0xe8, 0x25, 0x51, 0x4d, 0x1d, + 0x99, 0xfd, 0x0b, 0xe9, 0x88, 0x23, 0xd1, 0x4b, + 0x30, 0x6e, 0x18, 0x7c, 0xe3, 0x7a, 0x54, 0x2a, + 0x4f, 0x2a, 0x99, 0x8f, 0xaf, 0xd7, 0x5e, 0x25, + 0xfe, 0x9c, 0x47, 0x09, 0x63, 0x38, 0x0d, 0x5f, + 0xb3, 0x43, 0xa6, 0x66, 0x9b, 0xc5, 0x3d, 0x88, + 0x5e, 0xc7, 0x60, 0x99, 0x8e, 0xcb, 0x6a, 0x65, + 0x60, 0x92, 0x88, 0xe1, 0x2b, 0xfe, 0x83, 0x34, + 0x92, 0xa6, 0x6c, 0x22, 0x56, 0x5b, 0x75, 0x8a, + 0x93, 0xc3, 0x72, 0xca, 0xff, 0x59, 0x3b, 0xd8, + 0xa0, 0x80, 0x56, 0x98, 0x62, 0x8a, 0x70, 0xf2, + 0x5d, 0xd9, 0x40, 0x6b, 0xbf, 0x9f, 0x71, 0x8d, + 0x2e, 0x38, 0xe8, 0x06, 0x42, 0xa9, 0x95, 0x70, + 0x31, 0xd1, 0xe9, 0x6c, 0xab, 0xbb, 0xed, 0x25, + 0xe8, 0xca, 0xe8, 0xa4, 0x98, 0x82, 0xf5, 0xe3, + 0x11, 0x3c, 0xc4, 0xea, 0xea, 0x88, 0x56, 0x91, + 0xd6, 0x5d, 0xaa, 0xf7, 0xe9, 0x49, 0x2f, 0x42, + 0x5b, 0x76, 0xef, 0xed, 0x03, 0x9e, 0x5f, 0x4d, + 0x65, 0x25, 0xa5, 0xe8, 0x26, 0xba, 0x03, 0x4f, + 0x0e, 0x39, 0xd2, 0x53, 0x62, 0x98, 0x81, 0x9d, + 0x8e, 0xad, 0x50, 0x17, 0x9f, 0xcc, 0x34, 0x45, + 0x19, 0x5c, 0x1c, 0xd1, 0xbc, 0x71, 0x89, 0xaa, + 0x9a, 0x65, 0x55, 0x6f, 0x78, 0xd4, 0xd3, 0x5b, + 0x27, 0x8d, 0x94, 0x46, 0xd9, 0x95, 0xb3, 0x5f, + 0xc4, 0x35, 0x8d, 0xba, 0x1c, 0x40, 0x52, 0xd1, + 0x99, 0x27, 0x5d, 0x42, 0x28, 0xef, 0xcb, 0x9b, + 0x10, 0x7a, 0x19, 0xbf, 0x72, 0xa3, 0x4a, 0xb9, + 0x56, 0x83, 0x39, 0xa6, 0xb2, 0xcd, 0x48, 0x85, + 0xf9, 0xcc, 0x72, 0x88, 0xb3, 0x5a, 0x9b, 0x45, + 0xb2, 0xd3, 0x66, 0x2d, 0x24, 0x51, 0x68, 0x91, + 0x9d, 0x47, 0x6a, 0xb3, 0x9a, 0x60, 0xb3, 0xcd, + 0x6b, 0x43, 0x96, 0x21, 0xa0, 0x65, 0x43, 0xde, + 0x4f, 0x6e, 0xb5, 0x81, 0x50, 0x7e, 0xca, 0x4b, + 0xdb, 0x30, 0xf2, 0xcb, 0x28, 0x3b, 0x19, 0x6a, + 0x0a, 0xfa, 0x05, 0x5e, 0x61, 0xde, 0x76, 0x7e, + 0xdf, 0xd9, 0xa9, 0x1b, 0xd0, 0x8a, 0xb5, 0x04, + 0x51, 0xf5, 0x66, 0xa2, 0x32, 0x21, 0xb2, 0xa9, + 0x40, 0x78, 0x60, 0x9d, 0xdc, 0x45, 0xbe, 0xb4, + 0x3a, 0xba, 0xd1, 0xec, 0x31, 0x53, 0x24, 0x22, + 0x70, 0x99, 0xda, 0xc8, 0x17, 0x04, 0x87, 0x2c, + 0x89, 0x86, 0x24, 0xec, 0x52, 0x12, 0x6a, 0x51, + 0x1e, 0x2a, 0x5e, 0x96, 0xfb, 0xac, 0x95, 0x4a, + 0x1a, 0x06, 0x8f, 0xdf, 0xa7, 0x26, 0xeb, 0x6c, + 0x79, 0x4a, 0x77, 0xea, 0xb3, 0xb1, 0x3a, 0x19, + 0xe6, 0x5e, 0xe2, 0x26, 0x1b, 0x85, 0x3c, 0x9b, + 0x1d, 0x05, 0x1d, 0xbe, 0x5c, 0x25, 0x7f, 0x45, + 0x4c, 0x09, 0x4c, 0xc1, 0x47, 0xa5, 0x44, 0xfc, + 0x04, 0x2b, 0xad, 0x53, 0xac, 0x57, 0x22, 0x54, + 0x13, 0x7c, 0xc9, 0x96, 0x44, 0xda, 0x74, 0x95, + 0x6e, 0x8c, 0xe6, 0x6a, 0x05, 0x05, 0xf3, 0x8c, + 0x81, 0xaf, 0xbc, 0xb1, 0x91, 0xe7, 0xfd, 0x81, + 0x3f, 0x47, 0xc2, 0x6f, 0x0d, 0x62, 0xf6, 0x6e, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t aes_cbc_256_encblkno8_vec2_ctxt[SECSIZE] = { + 0x5a, 0x24, 0xfd, 0xee, 0x9a, 0x44, 0xfb, 0xac, + 0x3e, 0x46, 0x53, 0x95, 0x9e, 0xeb, 0x1f, 0xd9, + 0xfd, 0xc6, 0x4f, 0xae, 0x0b, 0xc8, 0xf2, 0xbd, + 0x77, 0x16, 0x7a, 0x2e, 0x8e, 0xec, 0x7a, 0x53, + 0xf4, 0xe0, 0x34, 0xba, 0x6e, 0xfa, 0xc4, 0x69, + 0xd7, 0x50, 0x13, 0x03, 0xfb, 0xb9, 0x66, 0x96, + 0xd4, 0x21, 0x67, 0xcc, 0x4c, 0x4d, 0x10, 0x2f, + 0x17, 0xeb, 0x41, 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 0x0d, + 0x6b, 0x0a, 0x13, 0x9f, 0x4d, 0x3d, 0x7b, 0x10, + 0x9f, 0x93, 0x43, 0x50, 0xd1, 0x17, 0x08, 0x77, + 0x23, 0x58, 0x35, 0x41, 0x23, 0xf6, 0x9c, 0x6f, + 0x2e, 0x81, 0x6e, 0x75, 0x9b, 0x9f, 0x37, 0x4f, + 0xb7, 0xa1, 0xce, 0xde, 0x0c, 0x74, 0x99, 0x31, + 0x0e, 0x27, 0x42, 0x99, 0xdd, 0x93, 0x03, 0x6b, + 0x44, 0x22, 0xd4, 0xc8, 0x67, 0xb5, 0xb2, 0x4d, + 0x11, 0x2e, 0x80, 0x09, 0xa2, 0x5b, 0xcf, 0x0c, + 0xff, 0xfa, 0x51, 0xe5, 0x9b, 0xdd, 0x11, 0xa1, + 0x17, 0x04, 0x9e, 0xc8, 0xd8, 0x1d, 0xc1, 0x5c, + 0xc3, 0xde, 0x83, 0x77, 0xa3, 0xec, 0x59, 0x7e, + 0xfb, 0xe8, 0x45, 0xff, 0xc3, 0xb3, 0xd3, 0x9e, + 0x3e, 0xc4, 0x75, 0xca, 0xc1, 0x77, 0xee, 0x1a, + 0xdc, 0x58, 0xab, 0x27, 0xc1, 0xfe, 0x21, 0x26, + 0x9a, 0xe0, 0x15, 0xab, 0x35, 0x8d, 0xbc, 0x22, + 0x37, 0xbb, 0x4e, 0xab, 0x9d, 0xa2, 0xaf, 0xf9, + 0x45, 0x17, 0xb1, 0xb8, 0xd4, 0x52, 0x1e, 0x67, + 0xeb, 0xac, 0xe0, 0x87, 0x6c, 0xe4, 0x7a, 0x03, + 0x73, 0xe4, 0x43, 0xeb, 0x3b, 0x57, 0x3f, 0x56, + 0x4b, 0x6c, 0x26, 0x81, 0x27, 0xbf, 0x7e, 0x59, + 0xcd, 0xab, 0x67, 0x8c, 0x4b, 0x6f, 0xa5, 0x47, + 0x2c, 0x45, 0x28, 0x5a, 0x3d, 0x88, 0x53, 0xf9, + 0x25, 0xdf, 0x5d, 0xba, 0xf7, 0x18, 0xa7, 0x3d, + 0x79, 0xb4, 0x43, 0x59, 0x77, 0xf9, 0xd5, 0x5d, + 0x4f, 0x31, 0x56, 0x8c, 0x21, 0xb5, 0xc0, 0xa2, + 0xca, 0x04, 0x62, 0x2c, 0xc8, 0xa8, 0x11, 0x82, + 0x1b, 0xde, 0xad, 0x20, 0x5b, 0xd2, 0x63, 0xfb, + 0x6d, 0xba, 0xd4, 0xcc, 0xb4, 0x9d, 0xe8, 0xa8, + 0xd1, 0x06, 0x81, 0xf0, 0xb9, 0xd4, 0x90, 0x30, + 0xcd, 0x0a, 0xe8, 0xd2, 0x8c, 0x7a, 0xbf, 0xf6, + 0x0d, 0xa0, 0xae, 0x1b, 0x21, 0x18, 0x93, 0x18, + 0x71, 0xe1, 0xa0, 0x63, 0x5a, 0x9d, 0x4e, 0x6a, + 0x52, 0x90, 0xaf, 0xdb, 0x26, 0x1e, 0xa9, 0xa1, + 0xc7, 0xf9, 0xf8, 0xa7, 0x3f, 0x85, 0xa1, 0xa4, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t aes_cbc_256_encblkno8_vec3_ctxt[SECSIZE] = { + 0x83, 0x77, 0xd8, 0xa8, 0x6a, 0x36, 0x41, 0x72, + 0xb6, 0x03, 0x4e, 0x5e, 0x39, 0x36, 0xe3, 0xf5, + 0xd0, 0x1b, 0x0d, 0x97, 0x78, 0x46, 0xee, 0xfd, + 0x34, 0x34, 0x16, 0xa0, 0x44, 0xcf, 0x0b, 0xdc, + 0xfb, 0x82, 0x98, 0xa2, 0x79, 0xc2, 0xe7, 0x1c, + 0x43, 0x43, 0x4c, 0x7f, 0xe7, 0xa6, 0xe6, 0x10, + 0x9e, 0x65, 0xb2, 0x09, 0xc7, 0x5f, 0xaa, 0xb7, + 0xb8, 0xad, 0x83, 0xd5, 0x9e, 0xd1, 0xb2, 0xce, + 0x4b, 0xa4, 0x5d, 0xbc, 0xd6, 0xf6, 0x0a, 0xe7, + 0x1b, 0xe9, 0x86, 0xbc, 0x72, 0xcc, 0x6f, 0xcc, + 0xf2, 0xde, 0x08, 0x48, 0xa2, 0x20, 0x31, 0x6a, + 0xdd, 0xbe, 0xc5, 0x36, 0x55, 0xff, 0xce, 0xfa, + 0xdf, 0x60, 0x26, 0x77, 0x7f, 0xd0, 0xfa, 0xd7, + 0x76, 0x70, 0x14, 0x11, 0xbf, 0x57, 0xc2, 0xdd, + 0x5f, 0xd3, 0x50, 0x49, 0xf8, 0xd1, 0xa7, 0xe2, + 0x8b, 0x89, 0xa0, 0xbc, 0x44, 0x42, 0x45, 0x10, + 0xfe, 0x66, 0x3d, 0x56, 0x09, 0x21, 0x7c, 0x49, + 0x30, 0xde, 0xe2, 0x4b, 0x26, 0x65, 0x8a, 0xe4, + 0x79, 0x08, 0x3a, 0xca, 0x36, 0x4f, 0x97, 0x3c, + 0xe4, 0x6a, 0xc3, 0xdb, 0xce, 0xac, 0x78, 0x76, + 0x25, 0x81, 0x7a, 0x01, 0x7b, 0xd8, 0xf1, 0x00, + 0x8d, 0x2e, 0xb7, 0x98, 0x3c, 0x86, 0x20, 0xa3, + 0x4c, 0x24, 0x2a, 0x78, 0x3a, 0x8d, 0xeb, 0xcd, + 0xae, 0xe1, 0x32, 0xf8, 0x21, 0x37, 0x30, 0x27, + 0xe1, 0xf3, 0x14, 0x60, 0x96, 0x77, 0x37, 0x50, + 0xa2, 0x92, 0xae, 0xe5, 0xd8, 0xea, 0x1a, 0x7e, + 0xa3, 0xd1, 0x04, 0x17, 0x03, 0x51, 0x2f, 0x21, + 0xa7, 0x00, 0x23, 0xb3, 0x24, 0xd8, 0x7d, 0xb7, + 0x4c, 0x51, 0xb1, 0xaf, 0xb0, 0x64, 0xe4, 0x62, + 0x91, 0x4c, 0xd5, 0x4b, 0xe8, 0xfb, 0x95, 0x61, + 0xa4, 0x6f, 0xf8, 0xb8, 0xea, 0xa9, 0xb2, 0x10, + 0xd3, 0x96, 0xcb, 0x1c, 0xdc, 0x86, 0x43,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 0x35, 0x68, 0x50, 0x80, 0xf9, + 0xcd, 0x3a, 0x10, 0xf6, 0x71, 0x1a, 0x94, 0xc3, + 0xec, 0xb9, 0x36, 0x84, 0x36, 0xe7, 0x3f, 0x6f, + 0x9b, 0xa9, 0x2b, 0x5c, 0x96, 0x49, 0x26, 0xda, + 0xb3, 0x08, 0x3d, 0x5e, 0x9e, 0x59, 0xdf, 0x0f, + 0xfc, 0xbe, 0xa8, 0x0b, 0xbc, 0xaa, 0x32, 0xf0, + 0xa5, 0x21, 0x50, 0x15, 0x7e, 0x46, 0xb9, 0x76, + 0x09, 0x4e, 0x4b, 0x6f, 0x9f, 0xc7, 0x8c, 0x6d, + 0x80, 0x37, 0xf9, 0xaa, 0xd1, 0x5f, 0x12, 0xb9, + 0xb3, 0x15, 0xe4, 0x96, 0xa1, 0x01, 0xd5, 0xa0, +}; + +const struct testvec aes_cbc_256_8_vectors[] = { + { + .blkno = 0, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = aes_cbc_ptxt, + .ctxt = aes_cbc_256_encblkno8_vec3_ctxt, + }, +}; + +/* + * 256 bits key from IEEE 1619/D16, NUL terminated. + */ +static const char aes_xts_256_key[33] = { + 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, + 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, + 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, + 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, + 0 +}; + +/* + * 512 bits key from IEEE 1619/D16, NUL terminated. + */ +static const char aes_xts_512_key[65] = { + 0x27, 0x18, 0x28, 0x18, 0x28, 0x45, 0x90, 0x45, + 0x23, 0x53, 0x60, 0x28, 0x74, 0x71, 0x35, 0x26, + 0x62, 0x49, 0x77, 0x57, 0x24, 0x70, 0x93, 0x69, + 0x99, 0x59, 0x57, 0x49, 0x66, 0x96, 0x76, 0x27, + 0x31, 0x41, 0x59, 0x26, 0x53, 0x58, 0x97, 0x93, + 0x23, 0x84, 0x62, 0x64, 0x33, 0x83, 0x27, 0x95, + 0x02, 0x88, 0x41, 0x97, 0x16, 0x93, 0x99, 0x37, + 0x51, 0x05, 0x82, 0x09, 0x74, 0x94, 0x45, 0x92, + 0 +}; + +/* + * Vector 4 from IEEE 1619/D16, blkno 0. + */ +static const uint8_t aes_xts_256_vec4_ptxt[SECSIZE] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74,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0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, +}; + +static const uint8_t aes_xts_256_vec4_ctxt[SECSIZE] = { + 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76, + 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2, + 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25, + 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c, + 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f, + 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00, + 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad, + 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12, + 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5, + 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5, + 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc, + 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce, + 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4, + 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84, + 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a, + 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65, + 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89, + 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51, + 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15, + 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8, + 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed, + 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91, + 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e, + 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34, + 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b, + 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5, + 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4, + 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c, + 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd, + 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3, + 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f, + 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e, + 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91, + 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19, + 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1, + 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc, + 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed, + 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde, + 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98, + 0x55, 0xef, 0x52, 0x97, 0xca,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0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea, + 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68, +}; + +/* + * Vector 5 from IEEE 1619/D16, blkno 1. + */ +static const uint8_t aes_xts_256_vec5_ptxt[SECSIZE] = { + 0x27, 0xa7, 0x47, 0x9b, 0xef, 0xa1, 0xd4, 0x76, + 0x48, 0x9f, 0x30, 0x8c, 0xd4, 0xcf, 0xa6, 0xe2, + 0xa9, 0x6e, 0x4b, 0xbe, 0x32, 0x08, 0xff, 0x25, + 0x28, 0x7d, 0xd3, 0x81, 0x96, 0x16, 0xe8, 0x9c, + 0xc7, 0x8c, 0xf7, 0xf5, 0xe5, 0x43, 0x44, 0x5f, + 0x83, 0x33, 0xd8, 0xfa, 0x7f, 0x56, 0x00, 0x00, + 0x05, 0x27, 0x9f, 0xa5, 0xd8, 0xb5, 0xe4, 0xad, + 0x40, 0xe7, 0x36, 0xdd, 0xb4, 0xd3, 0x54, 0x12, + 0x32, 0x80, 0x63, 0xfd, 0x2a, 0xab, 0x53, 0xe5, + 0xea, 0x1e, 0x0a, 0x9f, 0x33, 0x25, 0x00, 0xa5, + 0xdf, 0x94, 0x87, 0xd0, 0x7a, 0x5c, 0x92, 0xcc, + 0x51, 0x2c, 0x88, 0x66, 0xc7, 0xe8, 0x60, 0xce, + 0x93, 0xfd, 0xf1, 0x66, 0xa2, 0x49, 0x12, 0xb4, + 0x22, 0x97, 0x61, 0x46, 0xae, 0x20, 0xce, 0x84, + 0x6b, 0xb7, 0xdc, 0x9b, 0xa9, 0x4a, 0x76, 0x7a, + 0xae, 0xf2, 0x0c, 0x0d, 0x61, 0xad, 0x02, 0x65, + 0x5e, 0xa9, 0x2d, 0xc4, 0xc4, 0xe4, 0x1a, 0x89, + 0x52, 0xc6, 0x51, 0xd3, 0x31, 0x74, 0xbe, 0x51, + 0xa1, 0x0c, 0x42, 0x11, 0x10, 0xe6, 0xd8, 0x15, + 0x88, 0xed, 0xe8, 0x21, 0x03, 0xa2, 0x52, 0xd8, + 0xa7, 0x50, 0xe8, 0x76, 0x8d, 0xef, 0xff, 0xed, + 0x91, 0x22, 0x81, 0x0a, 0xae, 0xb9, 0x9f, 0x91, + 0x72, 0xaf, 0x82, 0xb6, 0x04, 0xdc, 0x4b, 0x8e, + 0x51, 0xbc, 0xb0, 0x82, 0x35, 0xa6, 0xf4, 0x34, + 0x13, 0x32, 0xe4, 0xca, 0x60, 0x48, 0x2a, 0x4b, + 0xa1, 0xa0, 0x3b, 0x3e, 0x65, 0x00, 0x8f, 0xc5, + 0xda, 0x76, 0xb7, 0x0b, 0xf1, 0x69, 0x0d, 0xb4, + 0xea, 0xe2, 0x9c, 0x5f, 0x1b, 0xad, 0xd0, 0x3c, + 0x5c, 0xcf, 0x2a, 0x55, 0xd7, 0x05, 0xdd, 0xcd, + 0x86, 0xd4, 0x49, 0x51, 0x1c, 0xeb, 0x7e, 0xc3, + 0x0b, 0xf1, 0x2b, 0x1f, 0xa3, 0x5b, 0x91, 0x3f, + 0x9f, 0x74, 0x7a, 0x8a, 0xfd, 0x1b, 0x13, 0x0e, + 0x94, 0xbf, 0xf9, 0x4e, 0xff, 0xd0, 0x1a, 0x91, + 0x73, 0x5c, 0xa1, 0x72, 0x6a, 0xcd, 0x0b, 0x19, + 0x7c, 0x4e, 0x5b, 0x03, 0x39, 0x36, 0x97, 0xe1, + 0x26, 0x82, 0x6f, 0xb6, 0xbb, 0xde, 0x8e, 0xcc, + 0x1e, 0x08, 0x29, 0x85, 0x16, 0xe2, 0xc9, 0xed, + 0x03, 0xff, 0x3c, 0x1b, 0x78, 0x60, 0xf6, 0xde, + 0x76, 0xd4, 0xce, 0xcd, 0x94, 0xc8, 0x11, 0x98, + 0x55, 0xef, 0x52, 0x97, 0xca, 0x67, 0xe9, 0xf3, + 0xe7, 0xff, 0x72, 0xb1, 0xe9, 0x97, 0x85, 0xca, + 0x0a, 0x7e, 0x77, 0x20, 0xc5, 0xb3, 0x6d, 0xc6, + 0xd7, 0x2c, 0xac, 0x95, 0x74, 0xc8, 0xcb, 0xbc, + 0x2f, 0x80, 0x1e, 0x23, 0xe5, 0x6f, 0xd3, 0x44, + 0xb0, 0x7f, 0x22, 0x15, 0x4b, 0xeb, 0xa0, 0xf0, + 0x8c, 0xe8, 0x89, 0x1e, 0x64, 0x3e, 0xd9, 0x95, + 0xc9, 0x4d, 0x9a, 0x69, 0xc9, 0xf1, 0xb5, 0xf4, + 0x99, 0x02, 0x7a, 0x78, 0x57, 0x2a, 0xee, 0xbd, + 0x74, 0xd2, 0x0c, 0xc3, 0x98, 0x81, 0xc2, 0x13, + 0xee, 0x77, 0x0b, 0x10, 0x10, 0xe4, 0xbe, 0xa7, + 0x18, 0x84, 0x69, 0x77, 0xae, 0x11, 0x9f, 0x7a, + 0x02, 0x3a, 0xb5, 0x8c, 0xca, 0x0a, 0xd7, 0x52, + 0xaf, 0xe6, 0x56, 0xbb, 0x3c, 0x17, 0x25, 0x6a, + 0x9f, 0x6e, 0x9b, 0xf1, 0x9f, 0xdd, 0x5a, 0x38, + 0xfc, 0x82, 0xbb, 0xe8, 0x72, 0xc5, 0x53, 0x9e, + 0xdb, 0x60, 0x9e, 0xf4, 0xf7, 0x9c, 0x20, 0x3e, + 0xbb, 0x14, 0x0f, 0x2e, 0x58, 0x3c, 0xb2, 0xad, + 0x15, 0xb4, 0xaa, 0x5b, 0x65, 0x50, 0x16, 0xa8, + 0x44, 0x92, 0x77, 0xdb, 0xd4, 0x77, 0xef, 0x2c, + 0x8d, 0x6c, 0x01, 0x7d, 0xb7, 0x38, 0xb1, 0x8d, + 0xeb, 0x4a, 0x42, 0x7d, 0x19, 0x23, 0xce, 0x3f, + 0xf2, 0x62, 0x73, 0x57, 0x79, 0xa4, 0x18, 0xf2, + 0x0a, 0x28, 0x2d, 0xf9, 0x20, 0x14, 0x7b, 0xea, + 0xbe, 0x42, 0x1e, 0xe5, 0x31, 0x9d, 0x05, 0x68, +}; + +static const uint8_t aes_xts_256_vec5_ctxt[SECSIZE] = { + 0x26, 0x4d, 0x3c, 0xa8, 0x51, 0x21, 0x94, 0xfe, + 0xc3, 0x12, 0xc8, 0xc9, 0x89, 0x1f, 0x27, 0x9f, + 0xef, 0xdd, 0x60, 0x8d, 0x0c, 0x02, 0x7b, 0x60, + 0x48, 0x3a, 0x3f, 0xa8, 0x11, 0xd6, 0x5e, 0xe5, + 0x9d, 0x52, 0xd9, 0xe4, 0x0e, 0xc5, 0x67, 0x2d, + 0x81, 0x53, 0x2b, 0x38, 0xb6, 0xb0, 0x89, 0xce, + 0x95, 0x1f, 0x0f, 0x9c, 0x35, 0x59, 0x0b, 0x8b, + 0x97, 0x8d, 0x17, 0x52, 0x13, 0xf3, 0x29, 0xbb, + 0x1c, 0x2f, 0xd3, 0x0f, 0x2f, 0x7f, 0x30, 0x49, + 0x2a, 0x61, 0xa5, 0x32, 0xa7, 0x9f, 0x51, 0xd3, + 0x6f, 0x5e, 0x31, 0xa7, 0xc9, 0xa1, 0x2c, 0x28, + 0x60, 0x82, 0xff, 0x7d, 0x23, 0x94, 0xd1, 0x8f, + 0x78, 0x3e, 0x1a, 0x8e, 0x72, 0xc7, 0x22, 0xca, + 0xaa, 0xa5, 0x2d, 0x8f, 0x06, 0x56, 0x57, 0xd2, + 0x63, 0x1f, 0xd2, 0x5b, 0xfd, 0x8e, 0x5b, 0xaa, + 0xd6, 0xe5, 0x27, 0xd7, 0x63, 0x51, 0x75, 0x01, + 0xc6, 0x8c, 0x5e, 0xdc, 0x3c, 0xdd, 0x55, 0x43, + 0x5c, 0x53, 0x2d, 0x71, 0x25, 0xc8, 0x61, 0x4d, + 0xee, 0xd9, 0xad, 0xaa, 0x3a, 0xca, 0xde, 0x58, + 0x88, 0xb8, 0x7b, 0xef, 0x64, 0x1c, 0x4c, 0x99, + 0x4c, 0x80, 0x91, 0xb5, 0xbc, 0xd3, 0x87, 0xf3, + 0x96, 0x3f, 0xb5, 0xbc, 0x37, 0xaa, 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 0x3f, 0xc6, 0xdb, 0x15, 0xdc, 0xd7, + 0xd8, 0x0d, 0x7d, 0x5b, 0xc4, 0x06, 0xc4, 0x97, + 0x0a, 0x34, 0x78, 0xad, 0xa8, 0x89, 0x9b, 0x32, + 0x91, 0x98, 0xeb, 0x61, 0xc1, 0x93, 0xfb, 0x62, + 0x75, 0xaa, 0x8c, 0xa3, 0x40, 0x34, 0x4a, 0x75, + 0xa8, 0x62, 0xae, 0xbe, 0x92, 0xee, 0xe1, 0xce, + 0x03, 0x2f, 0xd9, 0x50, 0xb4, 0x7d, 0x77, 0x04, + 0xa3, 0x87, 0x69, 0x23, 0xb4, 0xad, 0x62, 0x84, + 0x4b, 0xf4, 0xa0, 0x9c, 0x4d, 0xbe, 0x8b, 0x43, + 0x97, 0x18, 0x4b, 0x74, 0x71, 0x36, 0x0c, 0x95, + 0x64, 0x88, 0x0a, 0xed, 0xdd, 0xb9, 0xba, 0xa4, + 0xaf, 0x2e, 0x75, 0x39, 0x4b, 0x08, 0xcd, 0x32, + 0xff, 0x47, 0x9c, 0x57, 0xa0, 0x7d, 0x3e, 0xab, + 0x5d, 0x54, 0xde, 0x5f, 0x97, 0x38, 0xb8, 0xd2, + 0x7f, 0x27, 0xa9, 0xf0, 0xab, 0x11, 0x79, 0x9d, + 0x7b, 0x7f, 0xfe, 0xfb, 0x27, 0x04, 0xc9, 0x5c, + 0x6a, 0xd1, 0x2c, 0x39, 0xf1, 0xe8, 0x67, 0xa4, + 0xb7, 0xb1, 0xd7, 0x81, 0x8a, 0x4b, 0x75, 0x3d, + 0xfd, 0x2a, 0x89, 0xcc, 0xb4, 0x5e, 0x00, 0x1a, + 0x03, 0xa8, 0x67, 0xb1, 0x87, 0xf2, 0x25, 0xdd, +}; + +/* + * Vector 6 from IEEE 1619/D16, blkno 2. + */ +static const uint8_t aes_xts_256_vec6_ptxt[SECSIZE] = { + 0x26, 0x4d, 0x3c, 0xa8, 0x51, 0x21, 0x94, 0xfe, + 0xc3, 0x12, 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, 0x34, 0x78, 0xad, 0xa8, 0x89, 0x9b, 0x32, + 0x91, 0x98, 0xeb, 0x61, 0xc1, 0x93, 0xfb, 0x62, + 0x75, 0xaa, 0x8c, 0xa3, 0x40, 0x34, 0x4a, 0x75, + 0xa8, 0x62, 0xae, 0xbe, 0x92, 0xee, 0xe1, 0xce, + 0x03, 0x2f, 0xd9, 0x50, 0xb4, 0x7d, 0x77, 0x04, + 0xa3, 0x87, 0x69, 0x23, 0xb4, 0xad, 0x62, 0x84, + 0x4b, 0xf4, 0xa0, 0x9c, 0x4d, 0xbe, 0x8b, 0x43, + 0x97, 0x18, 0x4b, 0x74, 0x71, 0x36, 0x0c, 0x95, + 0x64, 0x88, 0x0a, 0xed, 0xdd, 0xb9, 0xba, 0xa4, + 0xaf, 0x2e, 0x75, 0x39, 0x4b, 0x08, 0xcd, 0x32, + 0xff, 0x47, 0x9c, 0x57, 0xa0, 0x7d, 0x3e, 0xab, + 0x5d, 0x54, 0xde, 0x5f, 0x97, 0x38, 0xb8, 0xd2, + 0x7f, 0x27, 0xa9, 0xf0, 0xab, 0x11, 0x79, 0x9d, + 0x7b, 0x7f, 0xfe, 0xfb, 0x27, 0x04, 0xc9, 0x5c, + 0x6a, 0xd1, 0x2c, 0x39, 0xf1, 0xe8, 0x67, 0xa4, + 0xb7, 0xb1, 0xd7, 0x81, 0x8a, 0x4b, 0x75, 0x3d, + 0xfd, 0x2a, 0x89, 0xcc, 0xb4, 0x5e, 0x00, 0x1a, + 0x03, 0xa8, 0x67, 0xb1, 0x87, 0xf2, 0x25, 0xdd, +}; + +static const uint8_t aes_xts_256_vec6_ctxt[SECSIZE] = { + 0xfa, 0x76, 0x2a, 0x36, 0x80, 0xb7, 0x60, 0x07, + 0x92, 0x8e, 0xd4, 0xa4, 0xf4, 0x9a, 0x94, 0x56, + 0x03, 0x1b, 0x70, 0x47, 0x82, 0xe6, 0x5e, 0x16, + 0xce, 0xcb, 0x54, 0xed, 0x7d, 0x01, 0x7b, 0x5e, + 0x18, 0xab, 0xd6, 0x7b, 0x33, 0x8e, 0x81, 0x07, + 0x8f, 0x21, 0xed, 0xb7, 0x86, 0x8d, 0x90, 0x1e, + 0xbe, 0x9c, 0x73, 0x1a, 0x7c, 0x18, 0xb5, 0xe6, + 0xde, 0xc1, 0xd6, 0xa7, 0x2e, 0x07, 0x8a, 0xc9, + 0xa4, 0x26, 0x2f, 0x86, 0x0b, 0xee, 0xfa, 0x14, + 0xf4, 0xe8, 0x21, 0x01, 0x82, 0x72, 0xe4, 0x11, + 0xa9, 0x51, 0x50, 0x2b, 0x6e, 0x79, 0x06, 0x6e, + 0x84, 0x25, 0x2c, 0x33, 0x46, 0xf3, 0xaa, 0x62, + 0x34, 0x43, 0x51, 0xa2, 0x91, 0xd4, 0xbe, 0xdc, + 0x7a, 0x07, 0x61, 0x8b, 0xde, 0xa2, 0xaf, 0x63, + 0x14, 0x5c, 0xc7, 0xa4, 0xb8, 0xd4, 0x07, 0x06, + 0x91, 0xae, 0x89, 0x0c, 0xd6, 0x57, 0x33, 0xe7, + 0x94, 0x6e, 0x90, 0x21, 0xa1, 0xdf, 0xfc, 0x4c, + 0x59, 0xf1, 0x59, 0x42, 0x5e, 0xe6, 0xd5, 0x0c, + 0xa9, 0xb1, 0x35, 0xfa, 0x61, 0x62, 0xce, 0xa1, + 0x8a, 0x93, 0x98, 0x38, 0xdc, 0x00, 0x0f, 0xb3, + 0x86, 0xfa, 0xd0, 0x86, 0xac, 0xce, 0x5a, 0xc0, + 0x7c, 0xb2, 0xec, 0xe7, 0xfd, 0x58, 0x0b, 0x00, + 0xcf, 0xa5, 0xe9, 0x85, 0x89, 0x63, 0x1d, 0xc2, + 0x5e, 0x8e, 0x2a, 0x3d, 0xaf, 0x2f, 0xfd, 0xec, + 0x26, 0x53, 0x16, 0x59, 0x91, 0x2c, 0x9d, 0x8f, + 0x7a, 0x15, 0xe5, 0x86, 0x5e, 0xa8, 0xfb, 0x58, + 0x16, 0xd6, 0x20, 0x70, 0x52, 0xbd, 0x71, 0x28, + 0xcd, 0x74, 0x3c, 0x12, 0xc8, 0x11, 0x87, 0x91, + 0xa4, 0x73, 0x68, 0x11, 0x93, 0x5e, 0xb9, 0x82, + 0xa5, 0x32, 0x34, 0x9e, 0x31, 0xdd, 0x40, 0x1e, + 0x0b, 0x66, 0x0a, 0x56, 0x8c, 0xb1, 0xa4, 0x71, + 0x1f, 0x55, 0x2f, 0x55, 0xde, 0xd5, 0x9f, 0x1f, + 0x15, 0xbf, 0x71, 0x96, 0xb3, 0xca, 0x12, 0xa9, + 0x1e, 0x48, 0x8e, 0xf5, 0x9d, 0x64, 0xf3, 0xa0, + 0x2b, 0xf4, 0x52, 0x39, 0x49, 0x9a, 0xc6, 0x17, + 0x6a, 0xe3, 0x21, 0xc4, 0xa2, 0x11, 0xec, 0x54, + 0x53, 0x65, 0x97, 0x1c, 0x5d, 0x3f, 0x4f, 0x09, + 0xd4, 0xeb, 0x13, 0x9b, 0xfd, 0xf2, 0x07, 0x3d, + 0x33, 0x18, 0x0b, 0x21, 0x00, 0x2b, 0x65, 0xcc, + 0x98, 0x65, 0xe7, 0x6c, 0xb2, 0x4c, 0xd9, 0x2c, + 0x87, 0x4c, 0x24, 0xc1, 0x83, 0x50, 0x39, 0x9a, + 0x93, 0x6a, 0xb3, 0x63, 0x70, 0x79, 0x29, 0x5d, + 0x76, 0xc4, 0x17, 0x77, 0x6b, 0x94, 0xef, 0xce, + 0x3a, 0x0e, 0xf7, 0x20, 0x6b, 0x15, 0x11, 0x05, + 0x19, 0x65, 0x5c, 0x95, 0x6c, 0xbd, 0x8b, 0x24, + 0x89, 0x40, 0x5e, 0xe2, 0xb0, 0x9a, 0x6b, 0x6e, + 0xeb, 0xe0, 0xc5, 0x37, 0x90, 0xa1, 0x2a, 0x89, + 0x98, 0x37, 0x8b, 0x33, 0xa5, 0xb7, 0x11, 0x59, + 0x62, 0x5f, 0x4b, 0xa4, 0x9d, 0x2a, 0x2f, 0xdb, + 0xa5, 0x9f, 0xbf, 0x08, 0x97, 0xbc, 0x7a, 0xab, + 0xd8, 0xd7, 0x07, 0xdc, 0x14, 0x0a, 0x80, 0xf0, + 0xf3, 0x09, 0xf8, 0x35, 0xd3, 0xda, 0x54, 0xab, + 0x58, 0x4e, 0x50, 0x1d, 0xfa, 0x0e, 0xe9, 0x77, + 0xfe, 0xc5, 0x43, 0xf7, 0x41, 0x86, 0xa8, 0x02, + 0xb9, 0xa3, 0x7a, 0xdb, 0x3e, 0x82, 0x91, 0xec, + 0xa0, 0x4d, 0x66, 0x52, 0x0d, 0x22, 0x9e, 0x60, + 0x40, 0x1e, 0x72, 0x82, 0xbe, 0xf4, 0x86, 0xae, + 0x05, 0x9a, 0xa7, 0x06, 0x96, 0xe0, 0xe3, 0x05, + 0xd7, 0x77, 0x14, 0x0a, 0x7a, 0x88, 0x3e, 0xcd, + 0xcb, 0x69, 0xb9, 0xff, 0x93, 0x8e, 0x8a, 0x42, + 0x31, 0x86, 0x4c, 0x69, 0xca, 0x2c, 0x20, 0x43, + 0xbe, 0xd0, 0x07, 0xff, 0x3e, 0x60, 0x5e, 0x01, + 0x4b, 0xcf, 0x51, 0x81, 0x38, 0xdc, 0x3a, 0x25, + 0xc5, 0xe2, 0x36, 0x17, 0x1a, 0x2d, 0x01, 0xd6, +}; + +/* + * Vector 7 from IEEE 1619/D16, blkno 0xfd. + */ +static const uint8_t aes_xts_256_vec7_ptxt[SECSIZE] = { + 0x8e, 0x41, 0xb7, 0x8c, 0x39, 0x0b, 0x5a, 0xf9, + 0xd7, 0x58, 0xbb, 0x21, 0x4a, 0x67, 0xe9, 0xf6, + 0xbf, 0x77, 0x27, 0xb0, 0x9a, 0xc6, 0x12, 0x40, + 0x84, 0xc3, 0x76, 0x11, 0x39, 0x8f, 0xa4, 0x5d, + 0xaa, 0xd9, 0x48, 0x68, 0x60, 0x0e, 0xd3, 0x91, + 0xfb, 0x1a, 0xcd, 0x48, 0x57, 0xa9, 0x5b, 0x46, + 0x6e, 0x62, 0xef, 0x9f, 0x4b, 0x37, 0x72, 0x44, + 0xd1, 0xc1, 0x52, 0xe7, 0xb3, 0x0d, 0x73, 0x1a, + 0xad, 0x30, 0xc7, 0x16, 0xd2, 0x14, 0xb7, 0x07, + 0xae, 0xd9, 0x9e, 0xb5, 0xb5, 0xe5, 0x80, 0xb3, + 0xe8, 0x87, 0xcf, 0x74, 0x97, 0x46, 0x56, 0x51, + 0xd4, 0xb6, 0x0e, 0x60, 0x42, 0x05, 0x1d, 0xa3, + 0x69, 0x3c, 0x3b, 0x78, 0xc1, 0x44, 0x89, 0x54, + 0x3b, 0xe8, 0xb6, 0xad, 0x0b, 0xa6, 0x29, 0x56, + 0x5b, 0xba, 0x20, 0x23, 0x13, 0xba, 0x7b, 0x0d, + 0x0c, 0x94, 0xa3, 0x25, 0x2b, 0x67, 0x6f, 0x46, + 0xcc, 0x02, 0xce, 0x0f, 0x8a, 0x7d, 0x34, 0xc0, + 0xed, 0x22, 0x91, 0x29, 0x67, 0x3c, 0x1f, 0x61, + 0xae, 0xd5, 0x79, 0xd0, 0x8a, 0x92, 0x03, 0xa2, + 0x5a, 0xac, 0x3a, 0x77, 0xe9, 0xdb, 0x60, 0x26, + 0x79, 0x96, 0xdb, 0x38, 0xdf, 0x63, 0x73, 0x56, + 0xd9, 0xdc, 0xd1, 0x63, 0x2e, 0x36, 0x99, 0x39, + 0xf2, 0xa2, 0x9d, 0x89, 0x34, 0x5c, 0x66, 0xe0, + 0x50, 0x66, 0xf1, 0xa3, 0x67, 0x7a, 0xef, 0x18, + 0xde, 0xa4, 0x11, 0x3f, 0xae, 0xb6, 0x29, 0xe4, + 0x67, 0x21, 0xa6, 0x6d, 0x0a, 0x7e, 0x78, 0x5d, + 0x3e, 0x29, 0xaf, 0x25, 0x94, 0xeb, 0x67, 0xdf, + 0xa9, 0x82, 0xaf, 0xfe, 0x0a, 0xac, 0x05, 0x8f, + 0x6e, 0x15, 0x86, 0x42, 0x69, 0xb1, 0x35, 0x41, + 0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c, 0xdf, 0x2a, 0x80, + 0x5c, 0x76, 0x04, 0xbc, 0xe6, 0x00, 0x49, 0xb9, + 0xfb, 0x7b, 0x8e, 0xaa, 0xc1, 0x0f, 0x51, 0xae, + 0x23, 0x79, 0x4c, 0xeb, 0xa6, 0x8b, 0xb5, 0x81, + 0x12, 0xe2, 0x93, 0xb9, 0xb6, 0x92, 0xca, 0x72, + 0x1b, 0x37, 0xc6, 0x62, 0xf8, 0x57, 0x4e, 0xd4, + 0xdb, 0xa6, 0xf8, 0x8e, 0x17, 0x08, 0x81, 0xc8, + 0x2c, 0xdd, 0xc1, 0x03, 0x4a, 0x0c, 0xa7, 0xe2, + 0x84, 0xbf, 0x09, 0x62, 0xb6, 0xb2, 0x62, 0x92, + 0xd8, 0x36, 0xfa, 0x9f, 0x73, 0xc1, 0xac, 0x77, + 0x0e, 0xef, 0x0f, 0x2d, 0x3a, 0x1e, 0xaf, 0x61, + 0xd3, 0xe0, 0x35, 0x55, 0xfd, 0x42, 0x4e, 0xed, + 0xd6, 0x7e, 0x18, 0xa1, 0x80, 0x94, 0xf8, 0x88, +}; + +static const uint8_t aes_xts_256_vec7_ctxt[SECSIZE] = { + 0xd5, 0x5f, 0x68, 0x4f, 0x81, 0xf4, 0x42, 0x6e, + 0x9f, 0xde, 0x92, 0xa5, 0xff, 0x02, 0xdf, 0x2a, + 0xc8, 0x96, 0xaf, 0x63, 0x96, 0x28, 0x88, 0xa9, + 0x79, 0x10, 0xc1, 0x37, 0x9e, 0x20, 0xb0, 0xa3, + 0xb1, 0xdb, 0x61, 0x3f, 0xb7, 0xfe, 0x2e, 0x07, + 0x00, 0x43, 0x29, 0xea, 0x5c, 0x22, 0xbf, 0xd3, + 0x3e, 0x3d, 0xbe, 0x4c, 0xf5, 0x8c, 0xc6, 0x08, + 0xc2, 0xc2, 0x6c, 0x19, 0xa2, 0xe2, 0xfe, 0x22, + 0xf9, 0x87, 0x32, 0xc2, 0xb5, 0xcb, 0x84, 0x4c, + 0xc6,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x80, 0xae, 0xe7, 0xe9, 0x69, + 0x76, 0x17, 0xc1, 0x49, 0x7d, 0x47, 0xbf, 0x3e, + 0x57, 0x19, 0x50, 0x31, 0x14, 0x21, 0xb6, 0xb7, + 0x34, 0xd3, 0x8b, 0x0d, 0xb9, 0x1e, 0xb8, 0x53, + 0x31, 0xb9, 0x1e, 0xa9, 0xf6, 0x15, 0x30, 0xf5, + 0x45, 0x12, 0xa5, 0xa5, 0x2a, 0x4b, 0xad, 0x58, + 0x9e, 0xb6, 0x97, 0x81, 0xd5, 0x37, 0xf2, 0x32, + 0x97, 0xbb, 0x45, 0x9b, 0xda, 0xd2, 0x94, 0x8a, + 0x29, 0xe1, 0x55, 0x0b, 0xf4, 0x78, 0x7e, 0x0b, + 0xe9, 0x5b, 0xb1, 0x73, 0xcf, 0x5f, 0xab, 0x17, + 0xda, 0xb7, 0xa1, 0x3a, 0x05, 0x2a, 0x63, 0x45, + 0x3d, 0x97, 0xcc, 0xec, 0x1a, 0x32, 0x19, 0x54, + 0x88, 0x6b, 0x7a, 0x12, 0x99, 0xfa, 0xae, 0xec, + 0xae, 0x35, 0xc6, 0xea, 0xac, 0xa7, 0x53, 0xb0, + 0x41, 0xb5, 0xe5, 0xf0, 0x93, 0xbf, 0x83, 0x39, + 0x7f, 0xd2, 0x1d, 0xd6, 0xb3, 0x01, 0x20, 0x66, + 0xfc, 0xc0, 0x58, 0xcc, 0x32, 0xc3, 0xb0, 0x9d, + 0x75, 0x62, 0xde, 0xe2, 0x95, 0x09, 0xb5, 0x83, + 0x93, 0x92, 0xc9, 0xff, 0x05, 0xf5, 0x1f, 0x31, + 0x66, 0xaa, 0xac, 0x4a, 0xc5, 0xf2, 0x38, 0x03, + 0x8a, 0x30, 0x45, 0xe6, 0xf7, 0x2e, 0x48, 0xef, + 0x0f, 0xe8, 0xbc, 0x67, 0x5e, 0x82, 0xc3, 0x18, + 0xa2, 0x68, 0xe4, 0x39, 0x70, 0x27, 0x1b, 0xf1, + 0x19, 0xb8, 0x1b, 0xf6, 0xa9, 0x82, 0x74, 0x65, + 0x54, 0xf8, 0x4e, 0x72, 0xb9, 0xf0, 0x02, 0x80, + 0xa3, 0x20, 0xa0, 0x81, 0x42, 0x92, 0x3c, 0x23, + 0xc8, 0x83, 0x42, 0x3f, 0xf9, 0x49, 0x82, 0x7f, + 0x29, 0xbb, 0xac, 0xdc, 0x1c, 0xcd, 0xb0, 0x49, + 0x38, 0xce, 0x60, 0x98, 0xc9, 0x5b, 0xa6, 0xb3, + 0x25, 0x28, 0xf4, 0xef, 0x78, 0xee, 0xd7, 0x78, + 0xb2, 0xe1, 0x22, 0xdd, 0xfd, 0x1c, 0xbd, 0xd1, + 0x1d, 0x1c, 0x0a, 0x67, 0x83, 0xe0, 0x11, 0xfc, + 0x53, 0x6d, 0x63, 0xd0, 0x53, 0x26, 0x06, 0x37, +}; + +/* + * Vector 8 from IEEE 1619/D16, blkno 0xfe. + */ +static const uint8_t aes_xts_256_vec8_ptxt[SECSIZE] = { + 0xd5, 0x5f, 0x68, 0x4f, 0x81, 0xf4, 0x42, 0x6e, + 0x9f, 0xde, 0x92, 0xa5, 0xff, 0x02, 0xdf, 0x2a, + 0xc8, 0x96, 0xaf, 0x63, 0x96, 0x28, 0x88, 0xa9, + 0x79, 0x10, 0xc1, 0x37, 0x9e, 0x20, 0xb0, 0xa3, + 0xb1, 0xdb, 0x61, 0x3f, 0xb7, 0xfe, 0x2e, 0x07, + 0x00, 0x43, 0x29, 0xea, 0x5c, 0x22, 0xbf, 0xd3, + 0x3e, 0x3d, 0xbe, 0x4c, 0xf5, 0x8c, 0xc6, 0x08, + 0xc2, 0xc2, 0x6c, 0x19, 0xa2, 0xe2, 0xfe, 0x22, + 0xf9, 0x87, 0x32, 0xc2, 0xb5, 0xcb, 0x84, 0x4c, + 0xc6, 0xc0, 0x70, 0x2d, 0x91, 0xe1, 0xd5, 0x0f, + 0xc4, 0x38, 0x2a, 0x7e, 0xba, 0x56, 0x35, 0xcd, + 0x60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, 0x14, 0x21, 0xb6, 0xb7, + 0x34, 0xd3, 0x8b, 0x0d, 0xb9, 0x1e, 0xb8, 0x53, + 0x31, 0xb9, 0x1e, 0xa9, 0xf6, 0x15, 0x30, 0xf5, + 0x45, 0x12, 0xa5, 0xa5, 0x2a, 0x4b, 0xad, 0x58, + 0x9e, 0xb6, 0x97, 0x81, 0xd5, 0x37, 0xf2, 0x32, + 0x97, 0xbb, 0x45, 0x9b, 0xda, 0xd2, 0x94, 0x8a, + 0x29, 0xe1, 0x55, 0x0b, 0xf4, 0x78, 0x7e, 0x0b, + 0xe9, 0x5b, 0xb1, 0x73, 0xcf, 0x5f, 0xab, 0x17, + 0xda, 0xb7, 0xa1, 0x3a, 0x05, 0x2a, 0x63, 0x45, + 0x3d, 0x97, 0xcc, 0xec, 0x1a, 0x32, 0x19, 0x54, + 0x88, 0x6b, 0x7a, 0x12, 0x99, 0xfa, 0xae, 0xec, + 0xae, 0x35, 0xc6, 0xea, 0xac, 0xa7, 0x53, 0xb0, + 0x41, 0xb5, 0xe5, 0xf0, 0x93, 0xbf, 0x83, 0x39, + 0x7f, 0xd2, 0x1d, 0xd6, 0xb3, 0x01, 0x20, 0x66, + 0xfc, 0xc0, 0x58, 0xcc, 0x32, 0xc3, 0xb0, 0x9d, + 0x75, 0x62, 0xde, 0xe2, 0x95, 0x09, 0xb5, 0x83, + 0x93, 0x92, 0xc9, 0xff, 0x05, 0xf5, 0x1f, 0x31, + 0x66, 0xaa, 0xac, 0x4a, 0xc5, 0xf2, 0x38, 0x03, + 0x8a, 0x30, 0x45, 0xe6, 0xf7, 0x2e, 0x48, 0xef, + 0x0f, 0xe8, 0xbc, 0x67, 0x5e, 0x82, 0xc3, 0x18, + 0xa2, 0x68, 0xe4, 0x39, 0x70, 0x27, 0x1b, 0xf1, + 0x19, 0xb8, 0x1b, 0xf6, 0xa9, 0x82, 0x74, 0x65, + 0x54, 0xf8, 0x4e, 0x72, 0xb9, 0xf0, 0x02, 0x80, + 0xa3, 0x20, 0xa0, 0x81, 0x42, 0x92, 0x3c, 0x23, + 0xc8, 0x83, 0x42, 0x3f, 0xf9, 0x49, 0x82, 0x7f, + 0x29, 0xbb, 0xac, 0xdc, 0x1c, 0xcd, 0xb0, 0x49, + 0x38, 0xce, 0x60, 0x98, 0xc9, 0x5b, 0xa6, 0xb3, + 0x25, 0x28, 0xf4, 0xef, 0x78, 0xee, 0xd7, 0x78, + 0xb2, 0xe1, 0x22, 0xdd, 0xfd, 0x1c, 0xbd, 0xd1, + 0x1d, 0x1c, 0x0a, 0x67, 0x83, 0xe0, 0x11, 0xfc, + 0x53, 0x6d, 0x63, 0xd0, 0x53, 0x26, 0x06, 0x37, +}; + +static const uint8_t aes_xts_256_vec8_ctxt[SECSIZE] = { + 0x72, 0xef, 0xc1, 0xeb, 0xfe, 0x1e, 0xe2, 0x59, + 0x75, 0xa6, 0xeb, 0x3a, 0xa8, 0x58, 0x9d, 0xda, + 0x2b, 0x26, 0x1f, 0x1c, 0x85, 0xbd, 0xab, 0x44, + 0x2a, 0x9e, 0x5b, 0x2d, 0xd1, 0xd7, 0xc3, 0x95, + 0x7a, 0x16, 0xfc, 0x08, 0xe5, 0x26, 0xd4, 0xb1, + 0x22, 0x3f, 0x1b, 0x12, 0x32, 0xa1, 0x1a, 0xf2, + 0x74, 0xc3, 0xd7, 0x0d, 0xac, 0x57, 0xf8, 0x3e, + 0x09, 0x83, 0xc4, 0x98, 0xf1, 0xa6, 0xf1, 0xae, + 0xcb, 0x02, 0x1c, 0x3e, 0x70, 0x08, 0x5a, 0x1e, + 0x52, 0x7f, 0x1c, 0xe4, 0x1e, 0xe5, 0x91, 0x1a, + 0x82, 0x02, 0x01, 0x61, 0x52, 0x9c, 0xd8, 0x27, + 0x73, 0x76, 0x2d, 0xaf, 0x54, 0x59, 0xde, 0x94, + 0xa0, 0xa8, 0x2a, 0xda, 0xe7, 0xe1, 0x70, 0x3c, + 0x80, 0x85, 0x43, 0xc2, 0x9e, 0xd6, 0xfb,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e0, 0xda, 0x29, 0xa5, 0x37, 0xa8, 0xc1, + 0x98, 0xb3, 0xc6, 0x6a, 0xb0, 0x07, 0x12, 0xdd, + 0x26, 0x16, 0x74, 0xbf, 0x45, 0xa7, 0x3d, 0x67, + 0xf7, 0x69, 0x14, 0xf8, 0x30, 0xca, 0x01, 0x4b, + 0x65, 0x59, 0x6f, 0x27, 0xe4, 0xcf, 0x62, 0xde, + 0x66, 0x12, 0x5a, 0x55, 0x66, 0xdf, 0x99, 0x75, + 0x15, 0x56, 0x28, 0xb4, 0x00, 0xfb, 0xfb, 0x3a, + 0x29, 0x04, 0x0e, 0xd5, 0x0f, 0xaf, 0xfd, 0xbb, + 0x18, 0xae, 0xce, 0x7c, 0x5c, 0x44, 0x69, 0x32, + 0x60, 0xaa, 0xb3, 0x86, 0xc0, 0xa3, 0x7b, 0x11, + 0xb1, 0x14, 0xf1, 0xc4, 0x15, 0xae, 0xbb, 0x65, + 0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a, + 0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca, + 0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24, + 0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e, + 0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d, + 0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05, + 0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06, + 0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9, + 0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4, + 0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11, + 0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c, + 0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85, + 0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1, + 0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11, + 0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c, + 0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef, + 0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a, +}; + +/* + * Vector 9 from IEEE 1619/D16, blkno 0xff. + */ +static const uint8_t aes_xts_256_vec9_ptxt[SECSIZE] = { + 0x72, 0xef, 0xc1, 0xeb, 0xfe, 0x1e, 0xe2, 0x59, + 0x75, 0xa6, 0xeb, 0x3a, 0xa8, 0x58, 0x9d, 0xda, + 0x2b, 0x26, 0x1f, 0x1c, 0x85, 0xbd, 0xab, 0x44, + 0x2a, 0x9e, 0x5b, 0x2d, 0xd1, 0xd7, 0xc3, 0x95, + 0x7a, 0x16, 0xfc, 0x08, 0xe5, 0x26, 0xd4, 0xb1, + 0x22, 0x3f, 0x1b, 0x12, 0x32, 0xa1, 0x1a, 0xf2, + 0x74, 0xc3, 0xd7, 0x0d, 0xac, 0x57, 0xf8, 0x3e, + 0x09, 0x83, 0xc4, 0x98, 0xf1, 0xa6, 0xf1, 0xae, + 0xcb, 0x02, 0x1c, 0x3e, 0x70, 0x08, 0x5a, 0x1e, + 0x52, 0x7f, 0x1c, 0xe4, 0x1e, 0xe5, 0x91, 0x1a, + 0x82, 0x02, 0x01, 0x61, 0x52, 0x9c, 0xd8, 0x27, + 0x73, 0x76, 0x2d, 0xaf, 0x54, 0x59, 0xde, 0x94, + 0xa0, 0xa8, 0x2a, 0xda, 0xe7, 0xe1, 0x70, 0x3c, + 0x80, 0x85, 0x43, 0xc2, 0x9e, 0xd6, 0xfb, 0x32, + 0xd9, 0xe0, 0x04, 0x32, 0x7c, 0x13, 0x55, 0x18, + 0x0c, 0x99, 0x5a, 0x07, 0x74, 0x14, 0x93, 0xa0,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 0x74, 0xbf, 0x45, 0xa7, 0x3d, 0x67, + 0xf7, 0x69, 0x14, 0xf8, 0x30, 0xca, 0x01, 0x4b, + 0x65, 0x59, 0x6f, 0x27, 0xe4, 0xcf, 0x62, 0xde, + 0x66, 0x12, 0x5a, 0x55, 0x66, 0xdf, 0x99, 0x75, + 0x15, 0x56, 0x28, 0xb4, 0x00, 0xfb, 0xfb, 0x3a, + 0x29, 0x04, 0x0e, 0xd5, 0x0f, 0xaf, 0xfd, 0xbb, + 0x18, 0xae, 0xce, 0x7c, 0x5c, 0x44, 0x69, 0x32, + 0x60, 0xaa, 0xb3, 0x86, 0xc0, 0xa3, 0x7b, 0x11, + 0xb1, 0x14, 0xf1, 0xc4, 0x15, 0xae, 0xbb, 0x65, + 0x3b, 0xe4, 0x68, 0x17, 0x94, 0x28, 0xd4, 0x3a, + 0x4d, 0x8b, 0xc3, 0xec, 0x38, 0x81, 0x3e, 0xca, + 0x30, 0xa1, 0x3c, 0xf1, 0xbb, 0x18, 0xd5, 0x24, + 0xf1, 0x99, 0x2d, 0x44, 0xd8, 0xb1, 0xa4, 0x2e, + 0xa3, 0x0b, 0x22, 0xe6, 0xc9, 0x5b, 0x19, 0x9d, + 0x8d, 0x18, 0x2f, 0x88, 0x40, 0xb0, 0x9d, 0x05, + 0x95, 0x85, 0xc3, 0x1a, 0xd6, 0x91, 0xfa, 0x06, + 0x19, 0xff, 0x03, 0x8a, 0xca, 0x2c, 0x39, 0xa9, + 0x43, 0x42, 0x11, 0x57, 0x36, 0x17, 0x17, 0xc4, + 0x9d, 0x32, 0x20, 0x28, 0xa7, 0x46, 0x48, 0x11, + 0x3b, 0xd8, 0xc9, 0xd7, 0xec, 0x77, 0xcf, 0x3c, + 0x89, 0xc1, 0xec, 0x87, 0x18, 0xce, 0xff, 0x85, + 0x16, 0xd9, 0x6b, 0x34, 0xc3, 0xc6, 0x14, 0xf1, + 0x06, 0x99, 0xc9, 0xab, 0xc4, 0xed, 0x04, 0x11, + 0x50, 0x62, 0x23, 0xbe, 0xa1, 0x6a, 0xf3, 0x5c, + 0x88, 0x3a, 0xcc, 0xdb, 0xe1, 0x10, 0x4e, 0xef, + 0x0c, 0xfd, 0xb5, 0x4e, 0x12, 0xfb, 0x23, 0x0a, +}; + +static const uint8_t aes_xts_256_vec9_ctxt[SECSIZE] = { + 0x32, 0x60, 0xae, 0x8d, 0xad, 0x1f, 0x4a, 0x32, + 0xc5, 0xca, 0xfe, 0x3a, 0xb0, 0xeb, 0x95, 0x54, + 0x9d, 0x46, 0x1a, 0x67, 0xce, 0xb9, 0xe5, 0xaa, + 0x2d, 0x3a, 0xfb, 0x62, 0xde, 0xce, 0x05, 0x53, + 0x19, 0x3b, 0xa5, 0x0c, 0x75, 0xbe, 0x25, 0x1e, + 0x08, 0xd1, 0xd0, 0x8f, 0x10, 0x88, 0x57, 0x6c, + 0x7e, 0xfd, 0xfa, 0xaf, 0x3f, 0x45, 0x95, 0x59, + 0x57, 0x1e, 0x12, 0x51, 0x17, 0x53, 0xb0, 0x7a, + 0xf0, 0x73, 0xf3, 0x5d, 0xa0, 0x6a, 0xf0, 0xce, + 0x0b, 0xbf, 0x6b, 0x8f, 0x5c, 0xcc, 0x5c, 0xea, + 0x50, 0x0e, 0xc1, 0xb2, 0x11, 0xbd, 0x51, 0xf6, + 0x3b, 0x60, 0x6b, 0xf6, 0x52, 0x87, 0x96, 0xca, + 0x12, 0x17, 0x3b, 0xa3, 0x9b, 0x89, 0x35, 0xee, + 0x44, 0xcc, 0xce, 0x64, 0x6f, 0x90, 0xa4, 0x5b, + 0xf9, 0xcc, 0xc5, 0x67, 0xf0, 0xac, 0xe1, 0x3d, + 0xc2, 0xd5, 0x3e, 0xbe, 0xed, 0xc8, 0x1f, 0x58, + 0xb2, 0xe4, 0x11, 0x79, 0xdd, 0xdf, 0x0d, 0x5a, + 0x5c, 0x42, 0xf5, 0xd8, 0x50, 0x6c, 0x1a, 0x5d, + 0x2f, 0x8f, 0x59, 0xf3, 0xea, 0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, 0x29, + 0x57, 0x28, 0x5f, 0x6d, 0xfb, 0x5d, 0xcd, 0x8c, + 0xbf, 0x54, 0x78, 0x2f, 0x8f, 0xe7, 0x76, 0x6d, + 0x47, 0x23, 0x81, 0x99, 0x13, 0xac, 0x77, 0x34, + 0x21, 0xe3, 0xa3, 0x10, 0x95, 0x86, 0x6b, 0xad, + 0x22, 0xc8, 0x6a, 0x60, 0x36, 0xb2, 0x51, 0x8b, + 0x20, 0x59, 0xb4, 0x22, 0x9d, 0x18, 0xc8, 0xc2, + 0xcc, 0xbd, 0xf9, 0x06, 0xc6, 0xcc, 0x6e, 0x82, + 0x46, 0x4e, 0xe5, 0x7b, 0xdd, 0xb0, 0xbe, 0xbc, + 0xb1, 0xdc, 0x64, 0x53, 0x25, 0xbf, 0xb3, 0xe6, + 0x65, 0xef, 0x72, 0x51, 0x08, 0x2c, 0x88, 0xeb, + 0xb1, 0xcf, 0x20, 0x3b, 0xd7, 0x79, 0xfd, 0xd3, + 0x86, 0x75, 0x71, 0x3c, 0x8d, 0xaa, 0xdd, 0x17, + 0xe1, 0xca, 0xbe, 0xe4, 0x32, 0xb0, 0x97, 0x87, + 0xb6, 0xdd, 0xf3, 0x30, 0x4e, 0x38, 0xb7, 0x31, + 0xb4, 0x5d, 0xf5, 0xdf, 0x51, 0xb7, 0x8f, 0xcf, + 0xb3, 0xd3, 0x24, 0x66, 0x02, 0x8d, 0x0b, 0xa3, + 0x65, 0x55, 0xe7, 0xe1, 0x1a, 0xb0, 0xee, 0x06, + 0x66, 0x06, 0x1d, 0x16, 0x45, 0xd9, 0x62, 0x44, + 0x4b, 0xc4, 0x7a, 0x38, 0x18, 0x89, 0x30, 0xa8, + 0x4b, 0x4d, 0x56, 0x13, 0x95, 0xc7, 0x3c, 0x08, + 0x70, 0x21, 0x92, 0x7c, 0xa6, 0x38, 0xb7, 0xaf, + 0xc8, 0xa8, 0x67, 0x9c, 0xcb, 0x84, 0xc2, 0x65, + 0x55, 0x44, 0x0e, 0xc7, 0xf1, 0x04, 0x45, 0xcd, +}; + +const struct testvec aes_xts_256_vectors[] = { + { + .blkno = 0, + .ptxt = aes_xts_256_vec4_ptxt, + .ctxt = aes_xts_256_vec4_ctxt, + }, + { + .blkno = 1, + .ptxt = aes_xts_256_vec5_ptxt, + .ctxt = aes_xts_256_vec5_ctxt, + }, + { + .blkno = 2, + .ptxt = aes_xts_256_vec6_ptxt, + .ctxt = aes_xts_256_vec6_ctxt, + }, + { + .blkno = 0xfd, + .ptxt = aes_xts_256_vec7_ptxt, + .ctxt = aes_xts_256_vec7_ctxt, + }, + { + .blkno = 0xfe, + .ptxt = aes_xts_256_vec8_ptxt, + .ctxt = aes_xts_256_vec8_ctxt, + }, + { + .blkno = 0xff, + .ptxt = aes_xts_256_vec9_ptxt, + .ctxt = aes_xts_256_vec9_ctxt, + }, +}; + +/* + * Vector 10 from IEEE 1619/D16, blkno 0xff. + */ +static const uint8_t aes_xts_512_vec10_ptxt[SECSIZE] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e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10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, + 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, + 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, + 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, + 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, + 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, +}; + +static const uint8_t aes_xts_512_vec10_ctxt[SECSIZE] = { + 0x1c, 0x3b, 0x3a, 0x10, 0x2f, 0x77, 0x03, 0x86, + 0xe4, 0x83, 0x6c, 0x99, 0xe3, 0x70, 0xcf, 0x9b, + 0xea, 0x00, 0x80, 0x3f, 0x5e, 0x48, 0x23, 0x57, + 0xa4, 0xae, 0x12, 0xd4, 0x14, 0xa3, 0xe6, 0x3b, + 0x5d, 0x31, 0xe2, 0x76, 0xf8, 0xfe, 0x4a, 0x8d, + 0x66, 0xb3, 0x17, 0xf9, 0xac, 0x68, 0x3f, 0x44, + 0x68, 0x0a, 0x86, 0xac, 0x35, 0xad, 0xfc, 0x33, + 0x45, 0xbe, 0xfe, 0xcb, 0x4b, 0xb1, 0x88, 0xfd, + 0x57, 0x76, 0x92, 0x6c, 0x49, 0xa3, 0x09, 0x5e, + 0xb1, 0x08, 0xfd, 0x10, 0x98, 0xba, 0xec, 0x70, + 0xaa, 0xa6, 0x69, 0x99, 0xa7, 0x2a, 0x82, 0xf2, + 0x7d, 0x84, 0x8b, 0x21, 0xd4, 0xa7, 0x41, 0xb0, + 0xc5, 0xcd, 0x4d, 0x5f, 0xff, 0x9d, 0xac, 0x89, + 0xae, 0xba, 0x12, 0x29, 0x61, 0xd0, 0x3a, 0x75, + 0x71, 0x23, 0xe9, 0x87, 0x0f, 0x8a, 0xcf, 0x10, + 0x00, 0x02, 0x08, 0x87, 0x89, 0x14, 0x29, 0xca, + 0x2a, 0x3e, 0x7a, 0x7d, 0x7d, 0xf7, 0xb1, 0x03, + 0x55, 0x16, 0x5c, 0x8b, 0x9a, 0x6d, 0x0a, 0x7d, + 0xe8, 0xb0, 0x62, 0xc4, 0x50, 0x0d, 0xc4, 0xcd, + 0x12, 0x0c, 0x0f, 0x74, 0x18, 0xda, 0xe3, 0xd0, + 0xb5, 0x78, 0x1c, 0x34, 0x80, 0x3f, 0xa7, 0x54, + 0x21, 0xc7, 0x90, 0xdf, 0xe1, 0xde, 0x18, 0x34, + 0xf2, 0x80, 0xd7, 0x66, 0x7b, 0x32, 0x7f, 0x6c, + 0x8c, 0xd7, 0x55, 0x7e, 0x12, 0xac, 0x3a, 0x0f, + 0x93, 0xec, 0x05, 0xc5, 0x2e, 0x04, 0x93, 0xef, + 0x31, 0xa1, 0x2d, 0x3d, 0x92, 0x60, 0xf7, 0x9a, + 0x28, 0x9d, 0x6a, 0x37, 0x9b, 0xc7, 0x0c, 0x50, + 0x84, 0x14, 0x73, 0xd1, 0xa8, 0xcc, 0x81, 0xec, + 0x58, 0x3e, 0x96, 0x45, 0xe0, 0x7b, 0x8d, 0x96, + 0x70, 0x65, 0x5b, 0xa5, 0xbb, 0xcf, 0xec, 0xc6, + 0xdc, 0x39, 0x66, 0x38, 0x0a, 0xd8, 0xfe, 0xcb, + 0x17, 0xb6, 0xba, 0x02, 0x46, 0x9a, 0x02, 0x0a, + 0x84, 0xe1, 0x8e, 0x8f, 0x84, 0x25, 0x20, 0x70, + 0xc1, 0x3e, 0x9f, 0x1f, 0x28, 0x9b, 0xe5, 0x4f, + 0xbc, 0x48, 0x14, 0x57, 0x77, 0x8f, 0x61, 0x60, + 0x15, 0xe1, 0x32, 0x7a, 0x02, 0xb1, 0x40, 0xf1, + 0x50, 0x5e, 0xb3, 0x09, 0x32, 0x6d, 0x68, 0x37, + 0x8f, 0x83, 0x74, 0x59, 0x5c, 0x84, 0x9d, 0x84, + 0xf4, 0xc3, 0x33, 0xec, 0x44, 0x23, 0x88, 0x51, + 0x43, 0xcb, 0x47, 0xbd, 0x71, 0xc5, 0xed, 0xae, + 0x9b, 0xe6, 0x9a, 0x2f, 0xfe, 0xce, 0xb1, 0xbe, + 0xc9, 0xde, 0x24, 0x4f, 0xbe, 0x15, 0x99, 0x2b, + 0x11, 0xb7, 0x7c, 0x04, 0x0f, 0x12, 0xbd, 0x8f, + 0x6a, 0x97, 0x5a, 0x44, 0xa0, 0xf9, 0x0c, 0x29, + 0xa9, 0xab, 0xc3, 0xd4, 0xd8, 0x93, 0x92, 0x72, + 0x84, 0xc5, 0x87, 0x54, 0xcc, 0xe2, 0x94, 0x52, + 0x9f, 0x86, 0x14, 0xdc, 0xd2, 0xab, 0xa9, 0x91, + 0x92, 0x5f, 0xed, 0xc4, 0xae, 0x74, 0xff, 0xac, + 0x6e, 0x33, 0x3b, 0x93, 0xeb, 0x4a, 0xff, 0x04, + 0x79, 0xda, 0x9a, 0x41, 0x0e, 0x44, 0x50, 0xe0, + 0xdd, 0x7a, 0xe4, 0xc6, 0xe2, 0x91, 0x09, 0x00, + 0x57, 0x5d, 0xa4, 0x01, 0xfc, 0x07, 0x05, 0x9f, + 0x64, 0x5e, 0x8b, 0x7e, 0x9b, 0xfd, 0xef, 0x33, + 0x94, 0x30, 0x54, 0xff, 0x84, 0x01, 0x14, 0x93, + 0xc2, 0x7b, 0x34, 0x29, 0xea, 0xed, 0xb4, 0xed, + 0x53, 0x76, 0x44, 0x1a, 0x77, 0xed, 0x43, 0x85, + 0x1a, 0xd7, 0x7f, 0x16, 0xf5, 0x41, 0xdf, 0xd2, + 0x69, 0xd5, 0x0d, 0x6a, 0x5f, 0x14, 0xfb, 0x0a, + 0xab, 0x1c, 0xbb, 0x4c, 0x15, 0x50, 0xbe, 0x97, + 0xf7, 0xab, 0x40, 0x66, 0x19, 0x3c, 0x4c, 0xaa, + 0x77, 0x3d, 0xad, 0x38, 0x01, 0x4b, 0xd2, 0x09, + 0x2f, 0xa7, 0x55, 0xc8, 0x24, 0xbb, 0x5e, 0x54, + 0xc4, 0xf3, 0x6f, 0xfd, 0xa9, 0xfc, 0xea, 0x70, + 0xb9, 0xc6, 0xe6, 0x93, 0xe1, 0x48, 0xc1, 0x51, +}; + +/* + * Vector 11 from IEEE 1619/D16, blkno 0xffff. + */ +static const uint8_t aes_xts_512_vec11_ptxt[SECSIZE] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, + 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, + 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, + 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, + 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, + 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, + 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, + 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, + 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x8b,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 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, + 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, +}; + +static const uint8_t aes_xts_512_vec11_ctxt[SECSIZE] = { + 0x77, 0xa3, 0x12, 0x51, 0x61, 0x8a, 0x15, 0xe6, + 0xb9, 0x2d, 0x1d, 0x66, 0xdf, 0xfe, 0x7b, 0x50, + 0xb5, 0x0b, 0xad, 0x55, 0x23, 0x05, 0xba, 0x02, + 0x17, 0xa6, 0x10, 0x68, 0x8e, 0xff, 0x7e, 0x11, + 0xe1, 0xd0, 0x22, 0x54, 0x38, 0xe0, 0x93, 0x24, + 0x2d, 0x6d, 0xb2, 0x74, 0xfd, 0xe8, 0x01, 0xd4, + 0xca, 0xe0, 0x6f, 0x20, 0x92, 0xc7, 0x28, 0xb2, + 0x47, 0x85, 0x59, 0xdf, 0x58, 0xe8, 0x37, 0xc2, + 0x46, 0x9e, 0xe4, 0xa4, 0xfa, 0x79, 0x4e, 0x4b, + 0xbc, 0x7f, 0x39, 0xbc, 0x02, 0x6e, 0x3c, 0xb7, + 0x2c, 0x33, 0xb0, 0x88, 0x8f, 0x25, 0xb4, 0xac, + 0xf5, 0x6a, 0x2a, 0x98, 0x04, 0xf1, 0xce, 0x6d, + 0x3d, 0x6e, 0x1d, 0xc6, 0xca, 0x18, 0x1d, 0x4b, + 0x54, 0x61, 0x79, 0xd5, 0x55, 0x44, 0xaa, 0x77, + 0x60, 0xc4, 0x0d, 0x06, 0x74, 0x15, 0x39, 0xc7, + 0xe3, 0xcd, 0x9d, 0x2f, 0x66, 0x50, 0xb2, 0x01, + 0x3f, 0xd0, 0xee, 0xb8, 0xc2, 0xb8, 0xe3, 0xd8, + 0xd2, 0x40, 0xcc, 0xae, 0x2d, 0x4c, 0x98, 0x32, + 0x0a, 0x74, 0x42, 0xe1, 0xc8, 0xd7, 0x5a, 0x42, + 0xd6, 0xe6, 0xcf, 0xa4, 0xc2, 0xec, 0xa1, 0x79, + 0x8d, 0x15, 0x8c, 0x7a, 0xec, 0xdf, 0x82, 0x49, + 0x0f, 0x24, 0xbb, 0x9b, 0x38, 0xe1, 0x08, 0xbc, + 0xda, 0x12, 0xc3, 0xfa, 0xf9, 0xa2, 0x11, 0x41, + 0xc3, 0x61, 0x3b, 0x58, 0x36, 0x7f, 0x92, 0x2a, + 0xaa, 0x26, 0xcd, 0x22, 0xf2, 0x3d, 0x70, 0x8d, + 0xae, 0x69, 0x9a, 0xd7, 0xcb, 0x40, 0xa8, 0xad, + 0x0b, 0x6e, 0x27, 0x84, 0x97, 0x3d, 0xcb, 0x60, + 0x56, 0x84, 0xc0, 0x8b, 0x8d, 0x69, 0x98, 0xc6, + 0x9a, 0xac, 0x04, 0x99, 0x21, 0x87, 0x1e, 0xbb, + 0x65, 0x30, 0x1a, 0x46, 0x19, 0xca, 0x80, 0xec, + 0xb4, 0x85, 0xa3, 0x1d, 0x74, 0x42, 0x23, 0xce, + 0x8d, 0xdc, 0x23, 0x94, 0x82, 0x8d, 0x6a, 0x80, + 0x47, 0x0c, 0x09, 0x2f, 0x5b, 0xa4, 0x13, 0xc3, + 0x37, 0x8f, 0xa6, 0x05, 0x42, 0x55, 0xc6, 0xf9, + 0xdf, 0x44, 0x95, 0x86, 0x2b, 0xbb, 0x32, 0x87, + 0x68, 0x1f, 0x93, 0x1b, 0x68, 0x7c, 0x88, 0x8a, + 0xbf, 0x84, 0x4d, 0xfc, 0x8f, 0xc2, 0x83, 0x31, + 0xe5, 0x79, 0x92, 0x8c, 0xd1, 0x2b, 0xd2, 0x39, + 0x0a, 0xe1, 0x23, 0xcf, 0x03, 0x81, 0x8d, 0x14, + 0xde, 0xdd, 0xe5, 0xc0, 0xc2, 0x4c, 0x8a, 0xb0, + 0x18, 0xbf, 0xca, 0x75, 0xca, 0x09, 0x6f, 0x2d, + 0x53, 0x1f, 0x3d, 0x16, 0x19, 0xe7, 0x85, 0xf1, + 0xad, 0xa4, 0x37, 0xca, 0xb9, 0x2e, 0x98, 0x05, + 0x58, 0xb3, 0xdc, 0xe1, 0x47, 0x4a, 0xfb, 0x75, + 0xbf, 0xed, 0xbf, 0x8f, 0xf5, 0x4c, 0xb2, 0x61, + 0x8e, 0x02, 0x44, 0xc9, 0xac, 0x0d, 0x3c, 0x66, + 0xfb, 0x51, 0x59, 0x8c, 0xd2, 0xdb, 0x11, 0xf9, + 0xbe, 0x39, 0x79, 0x1a, 0xbe, 0x44, 0x7c, 0x63, + 0x09, 0x4f, 0x7c, 0x45, 0x3b, 0x7f, 0xf8, 0x7c, + 0xb5, 0xbb, 0x36, 0xb7, 0xc7, 0x9e, 0xfb, 0x08, + 0x72, 0xd1, 0x70, 0x58, 0xb8, 0x3b, 0x15, 0xab, + 0x08, 0x66, 0xad, 0x8a, 0x58, 0x65, 0x6c, 0x5a, + 0x7e, 0x20, 0xdb, 0xdf, 0x30, 0x8b, 0x24, 0x61, + 0xd9, 0x7c, 0x0e, 0xc0, 0x02, 0x4a, 0x27, 0x15, + 0x05, 0x52, 0x49, 0xcf, 0x3b, 0x47, 0x8d, 0xdd, + 0x47, 0x40, 0xde, 0x65, 0x4f, 0x75, 0xca, 0x68, + 0x6e, 0x0d, 0x73, 0x45, 0xc6, 0x9e, 0xd5, 0x0c, + 0xdc, 0x2a, 0x8b, 0x33, 0x2b, 0x1f, 0x88, 0x24, + 0x10, 0x8a, 0xc9, 0x37, 0xeb, 0x05, 0x05, 0x85, + 0x60, 0x8e, 0xe7, 0x34, 0x09, 0x7f, 0xc0, 0x90, + 0x54, 0xfb, 0xff, 0x89, 0xee, 0xae, 0xea, 0x79, + 0x1f, 0x4a, 0x7a, 0xb1, 0xf9, 0x86, 0x82, 0x94, + 0xa4, 0xf9, 0xe2, 0x7b, 0x42, 0xaf, 0x81, 0x00, + 0xcb, 0x9d, 0x59, 0xce, 0xf9, 0x64, 0x58, 0x03, +}; + +const struct testvec aes_xts_512_vectors[] = { + { + .blkno = 0xff, + .ptxt = aes_xts_512_vec10_ptxt, + .ctxt = aes_xts_512_vec10_ctxt, + }, + { + .blkno = 0xffff, + .ptxt = aes_xts_512_vec11_ptxt, + .ctxt = aes_xts_512_vec11_ctxt, + }, +}; + +static int +open_disk(const char *devpath, const char *imgpath, size_t size) +{ + int fd; + + fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600); + if (fd < 0) + return -1; + + if (ftruncate(fd, size) < 0) + goto fail; + + if (rump_pub_etfs_register_withsize(devpath, + imgpath, RUMP_ETFS_BLK, 0, size) < 0) { + goto fail; + } + + unlink(imgpath); + return fd; +fail: + close(fd); + unlink(imgpath); + return -1; +} + +static int +open_cgd(int devno) +{ + char devpath[32]; + + sprintf(devpath, "/dev/rcgd%d%c", devno, getrawpartition() + 'a'); + + return rump_sys_open(devpath, O_RDWR, 0); +} + +static int +configure_cgd(int fd, const char *dkpath, const char *alg, + const char *ivmethod, const char *key, size_t keylen) +{ + struct cgd_ioctl ci; + + memset(&ci, 0, sizeof(ci)); + ci.ci_disk = dkpath; + ci.ci_alg = alg; + ci.ci_ivmethod = ivmethod; + ci.ci_keylen = 8 * keylen - 8; /* Exclude the NUL terminator. */ + ci.ci_key = key; + ci.ci_blocksize = 128; + + return rump_sys_ioctl(fd, CGDIOCSET, &ci); +} + +static int +unconfigure_cgd(int fd) +{ + struct cgd_ioctl ci; + + return rump_sys_ioctl(fd, CGDIOCCLR, &ci); +} + +static int +write_testvec(int cgdfd, const struct testvec *tv) +{ + ssize_t written; + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + return -1; + + written = rump_sys_write(cgdfd, tv->ptxt, SECSIZE); + if (written < 0) + return -1; + if (written != SECSIZE) { + errno = EDOM; /* Something distinct. */ + return -1; + } + + return 0; +} + +static int +read_testvec(int cgdfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ptxt, SECSIZE); +fail: + free(buf); + return res; +} + +static int +check_testvec(int dkfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (read(dkfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ctxt, SECSIZE); +fail: + free(buf); + return res; +} + +ATF_TC(cgd_aes_cbc_128_encblkno1); +ATF_TC_HEAD(cgd_aes_cbc_128_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 128 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_aes_cbc_128_encblkno1, tc) +{ + const char imgpath[] = "aes-cbc-128-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_128_key, sizeof(aes_cbc_128_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_1_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_128_key, sizeof(aes_cbc_128_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_cbc_128_encblkno8); +ATF_TC_HEAD(cgd_aes_cbc_128_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 128 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_aes_cbc_128_encblkno8, tc) +{ + const char imgpath[] = "aes-cbc-128-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_128_key, sizeof(aes_cbc_128_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_128_8_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_128_key, sizeof(aes_cbc_128_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_128_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_128_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_cbc_192_encblkno1); +ATF_TC_HEAD(cgd_aes_cbc_192_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 192 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_aes_cbc_192_encblkno1, tc) +{ + const char imgpath[] = "aes-cbc-192-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_192_key, sizeof(aes_cbc_192_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_1_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_192_key, sizeof(aes_cbc_192_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_cbc_192_encblkno8); +ATF_TC_HEAD(cgd_aes_cbc_192_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 192 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_aes_cbc_192_encblkno8, tc) +{ + const char imgpath[] = "aes-cbc-192-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_192_key, sizeof(aes_cbc_192_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_192_8_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_192_key, sizeof(aes_cbc_192_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_192_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_192_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_cbc_256_encblkno1); +ATF_TC_HEAD(cgd_aes_cbc_256_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 256 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_aes_cbc_256_encblkno1, tc) +{ + const char imgpath[] = "aes-cbc-256-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_256_key, sizeof(aes_cbc_256_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_1_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno1", + aes_cbc_256_key, sizeof(aes_cbc_256_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_cbc_256_encblkno8); +ATF_TC_HEAD(cgd_aes_cbc_256_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test aes-cbc with 256 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_aes_cbc_256_encblkno8, tc) +{ + const char imgpath[] = "aes-cbc-256-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_256_key, sizeof(aes_cbc_256_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_cbc_256_8_vectors[3]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-cbc", "encblkno8", + aes_cbc_256_key, sizeof(aes_cbc_256_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_cbc_256_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_cbc_256_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_xts_256); +ATF_TC_HEAD(cgd_aes_xts_256, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test aes-xts with 256 bits key"); +} + +ATF_TC_BODY(cgd_aes_xts_256, tc) +{ + const char imgpath[] = "aes-xts-256.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 256 * SECSIZE; /* Last blkno is 0xff. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1", + aes_xts_256_key, sizeof(aes_xts_256_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[1]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[2]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[3]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[4]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_256_vectors[5]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1", + aes_xts_256_key, sizeof(aes_xts_256_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[3]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[4]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_256_vectors[5]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[3]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[4]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_256_vectors[5]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_aes_xts_512); +ATF_TC_HEAD(cgd_aes_xts_512, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test aes-xts with 512 bits key"); +} + +ATF_TC_BODY(cgd_aes_xts_512, tc) +{ + const char imgpath[] = "aes-xts-512.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 65536 * SECSIZE; /* Last blkno is 0xffff. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1", + aes_xts_512_key, sizeof(aes_xts_512_key))); + + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_512_vectors[0]), -1); + CHECK_LIBC(write_testvec(cgdfd, &aes_xts_512_vectors[1]), -1); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "aes-xts", "encblkno1", + aes_xts_512_key, sizeof(aes_xts_512_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_512_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &aes_xts_512_vectors[1]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_512_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &aes_xts_512_vectors[1]), 0); + + RL(close(dkfd)); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, cgd_aes_cbc_128_encblkno1); + ATF_TP_ADD_TC(tp, cgd_aes_cbc_128_encblkno8); + ATF_TP_ADD_TC(tp, cgd_aes_cbc_192_encblkno1); + ATF_TP_ADD_TC(tp, cgd_aes_cbc_192_encblkno8); + ATF_TP_ADD_TC(tp, cgd_aes_cbc_256_encblkno1); + ATF_TP_ADD_TC(tp, cgd_aes_cbc_256_encblkno8); + ATF_TP_ADD_TC(tp, cgd_aes_xts_256); + ATF_TP_ADD_TC(tp, cgd_aes_xts_512); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c b/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c new file mode 100644 index 0000000..958ebac --- /dev/null +++ b/contrib/netbsd-tests/dev/cgd/t_cgd_blowfish.c @@ -0,0 +1,2341 @@ +/* $NetBSD: t_cgd_blowfish.c,v 1.1 2016/11/10 23:44:36 alnsn Exp $ */ +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Alexander Nasonov. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/sysctl.h> + +#include <atf-c.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <util.h> + +#include <dev/cgdvar.h> + +#include <rump/rump.h> +#include <rump/rump_syscalls.h> + +#include "../../h_macros.h" + +#define SECSIZE 512 + +struct testvec { + unsigned int blkno; + const uint8_t *ptxt; /* PlainText */ + const uint8_t *ctxt; /* CipherText */ +}; + +/* + * 128 bits Blowfish key, NUL terminated. + */ +static const char bf_cbc_128_key[17] = { + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */ + 0 +}; + +/* + * 256 bits Blowfish key, NUL terminated. + */ +static const char bf_cbc_256_key[33] = { + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, /* 89ABCDEF */ + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* 01234567 */ + 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, /* 89abcdef */ + 0 +}; + +/* + * 448 bits Blowfish key, NUL terminated. + */ +static const char bf_cbc_448_key[57] = { + 0x3a, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* :ABCDEFG */ + 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, /* HIJKLMNO */ + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* PQRSTUVW */ + 0x58, 0x59, 0x5a, 0x7e, 0x3a, 0x61, 0x62, 0x63, /* XYZ~:abc */ + 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, /* defghijk */ + 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, /* lmnopqrs */ + 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x23, /* tuvwxyz# */ + 0 +}; + +static const uint8_t bf_cbc_ptxt[SECSIZE] = + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop" + " abcdefghijklmnop"; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t bf_cbc_128_encblkno1_vec0_ctxt[SECSIZE] = { + 0x78, 0x53, 0x43, 0x2a, 0x08, 0xe7, 0x84, 0x3f, + 0xb7, 0x61, 0x9c, 0x17, 0x81, 0xbe, 0x38, 0xb9, + 0x65, 0x51, 0x68, 0xa2, 0x29, 0xd7, 0x45, 0xc9, + 0xee, 0x0e, 0x9d, 0xe1, 0x69, 0xc6, 0x81, 0x81, + 0xf3, 0x93, 0xa6, 0x62, 0xc9, 0x05, 0x2c, 0x1b, + 0x0e, 0x05, 0xca, 0xbe, 0x12, 0x25, 0x37, 0xd8, + 0x98, 0x66, 0xa2, 0xd3, 0xd0, 0x8a, 0x89, 0x57, + 0x44, 0x91, 0x1e, 0xe9, 0x07, 0x03, 0x5c, 0xa6, + 0xb8, 0x30, 0xf1, 0xc7, 0x8c, 0x66, 0x05, 0xb0, + 0x2d, 0xc3, 0xc3, 0xd7, 0x60, 0xef, 0x62, 0xd3, + 0x34, 0x9c, 0xa9, 0xd2, 0x0c, 0x1a, 0x9c, 0xfe, + 0x74, 0x92, 0xcb, 0x90, 0x80, 0xfa, 0x71, 0x5c, + 0xaa, 0x29, 0x39, 0xdd, 0x3b, 0x62, 0xa1, 0xfc, + 0xa5, 0x35, 0xcd, 0xa3, 0x29, 0x41, 0x1a, 0x03, + 0xf7, 0xe1, 0x36, 0xb2, 0xdc, 0x1a, 0xb3, 0x9f, + 0x46, 0xa3, 0xf7, 0xc3, 0xd1, 0x29, 0x83, 0xcf, + 0x0d, 0x88, 0x0b, 0xd1, 0xb7, 0xc7, 0x87, 0x21, + 0xb7, 0x1f, 0xe7, 0xa2, 0x8e, 0x5f,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, 0xa8, 0x00, 0x21, 0x3e, 0x2d, 0xf9, + 0x63, 0xb8, 0xe9, 0xa4, 0x2e, 0xf4, 0x6b, 0xd7, + 0x5c, 0xfd, 0x32, 0x6c, 0x98, 0x05, 0x38, 0x0d, + 0x29, 0xb5, 0x5a, 0x5b, 0xbb, 0xad, 0xfd, 0x46, + 0x9b, 0x6a, 0x97, 0x4c, 0x24, 0xcc, 0x7d, 0x13, + 0x25, 0xe8, 0x2c, 0xb9, 0x13, 0x54, 0xb2, 0x8a, + 0x28, 0xa0, 0x8a, 0x3a, 0x4d, 0x7e, 0xf4, 0x29, + 0xff, 0xfb, 0x4f, 0xd6, 0x3d, 0xf7, 0xca, 0x89, + 0x2a, 0x58, 0x9e, 0x42, 0x00, 0x84, 0x61, 0x58, + 0x7c, 0x94, 0xf6, 0x50, 0x48, 0x2f, 0x34, 0x88, + 0xec, 0x97, 0xef, 0x8b, 0x2f, 0x84, 0xca, 0x23, + 0xe1, 0xb7, 0x63, 0x99, 0xdd, 0x4a, 0x76, 0xdd, + 0x20, 0xc1, 0xc2, 0x56, 0x45, 0xbe, 0x75, 0x9a, + 0x40, 0x72, 0xc8, 0xfb, 0x7e, 0x40, 0x6f, 0x38, + 0xfd, 0x76, 0xa4, 0x78, 0xf5, 0xde, 0x5f, 0xb7, + 0x4a, 0xa9, 0xaf, 0xad, 0xa1, 0x8b, 0x25, 0x8f, + 0xea, 0xb3, 0xeb, 0x54, 0x39, 0x5a, 0x91, 0xfe, + 0x86, 0x18, 0xea, 0x8c, 0xd6, 0x66, 0xd5, 0x85, + 0x02, 0x2b, 0x00, 0x5d, 0x7e, 0x13, 0xa0, 0x1f, + 0x73, 0x46, 0x6d, 0x5e, 0xcd, 0xe0, 0x82, 0x02, + 0x28, 0x88, 0xbf, 0x17, 0xfd, 0x9b, 0x83, 0x2c, + 0xa2, 0xf7, 0xde, 0x51, 0x98, 0x3f, 0xe2, 0x80, + 0x66, 0x14, 0x17, 0xce, 0x8e, 0x30, 0x2d, 0xe2, + 0x24, 0x68, 0x4b, 0xe5, 0xd1, 0x09, 0xfb, 0x6e, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t bf_cbc_128_encblkno1_vec1_ctxt[SECSIZE] = { + 0x87, 0xae, 0x01, 0x52, 0xe8, 0xe9, 0xd9, 0xba, + 0xa9, 0x18, 0x31, 0x2c, 0x1b, 0xab, 0x57, 0xad, + 0x45, 0x0e, 0x25, 0x5e, 0x0e, 0x04, 0xfa, 0xdd, + 0xf1, 0x59, 0xe6, 0xea, 0x78, 0x4b, 0x83, 0x07, + 0x8b, 0x46, 0x91, 0x09, 0x58, 0x5a, 0x11, 0x2e, + 0x54, 0x43, 0xa4, 0xc1, 0x04, 0x35, 0xd3, 0x3e, + 0xc9, 0xc8, 0xf5, 0xff, 0x69, 0x1e, 0x57, 0x85, + 0x6d, 0x91, 0x03, 0xeb, 0x8c, 0xa7, 0xe8, 0xcc, + 0x3f, 0xac, 0xf9, 0x14, 0x1e, 0x88, 0x50, 0xa5, + 0x38, 0x66, 0xa9, 0xf4, 0xf5, 0xc6, 0x30, 0x95, + 0xd6, 0x84, 0x0b, 0x81, 0xf9, 0x51, 0x05, 0x80, + 0x9a, 0x89, 0xbf, 0xd4, 0x7d, 0x6a, 0x26, 0x59, + 0x29, 0x44, 0xe7, 0x1d, 0x0e, 0xad, 0x8c, 0xa0, + 0x93, 0xe9, 0x4b, 0x4b, 0x51, 0x46, 0xa5, 0x07, + 0xe8, 0xcb, 0x59, 0xf4, 0x63, 0xb5, 0x36, 0xdb, + 0xbc, 0x54, 0x2d, 0xec, 0xf0, 0x90, 0x3a, 0xa5, + 0xed, 0xc8, 0x28, 0x0e, 0xd3, 0x79, 0xb8, 0x57, + 0xc6, 0x7f, 0x02, 0x22, 0x5e, 0x80, 0xe8, 0x7f, + 0xdf, 0xa0, 0x0f, 0xbc, 0x98, 0x79, 0x6f, 0xd2, + 0xb0, 0xb2, 0x4f, 0x9b, 0x1a, 0x21, 0x8f, 0x63, + 0xce, 0x54, 0x41, 0x64, 0xbf, 0xb9, 0xa7, 0x93, + 0xd6, 0x5b, 0x89, 0x86, 0xda, 0x90, 0x23, 0x2e, + 0x25, 0x35, 0x1a, 0x9a, 0xf5, 0x1e, 0x8f, 0xb4, + 0xe6, 0x66, 0x8e, 0x0e, 0x2d, 0x91, 0x06, 0x4b, + 0x3d, 0x4a, 0x97, 0xab, 0x9b, 0x92, 0x09, 0xaa, + 0x07, 0xbf, 0xc1, 0x7d, 0xe2, 0xbc, 0xd2, 0xf1, + 0x38, 0x8d, 0x02, 0x45, 0xc8, 0x13, 0x12, 0xda, + 0xaa, 0x53, 0xa2, 0x2c, 0x96, 0x69, 0x64, 0xce, + 0x86, 0xe4, 0x84, 0x56, 0xd0, 0xe5, 0x81, 0x99, + 0x27, 0xad, 0x86, 0x47, 0x5f, 0xaf, 0xa2, 0xa2, + 0x90, 0x7f, 0xe7, 0x86, 0xec, 0x7f, 0xf4, 0xa3, + 0xcd, 0x4f, 0x60, 0xcc, 0x1e, 0x35, 0x44, 0xe8, + 0xe9, 0x06, 0xaf, 0x5e, 0x53, 0x3d, 0x30, 0x91, + 0xfe, 0x44, 0x59, 0x66, 0x82, 0xc2, 0xea, 0x9f, + 0xc8, 0x3b, 0xe2, 0xe5, 0x58, 0xf7, 0x34, 0xd5, + 0x9e, 0xfc, 0x20, 0x84, 0x34, 0xaa, 0x4f, 0xe1, + 0xd4, 0x95, 0x76, 0x11, 0x59, 0x90, 0x90, 0xfd, + 0x4d, 0xf9, 0xb8, 0x41, 0xe1, 0xdb, 0x36, 0x05, + 0xe3, 0x0f, 0xa4, 0x4f, 0x0c, 0x61, 0x70, 0xa5, + 0x1b, 0xbf, 0xab, 0x65, 0x67, 0x75, 0x5c, 0x7d, + 0x46, 0x3b, 0x29, 0xd0, 0x3d, 0x06, 0x40, 0x25, + 0x47, 0x3e, 0x8d, 0x62, 0xf8, 0xd8, 0x08, 0xc1, + 0x03, 0x04, 0x4b, 0x5a, 0x40, 0x65, 0x84, 0x52, + 0x34, 0xa2, 0x4a, 0xcc, 0x3a, 0x9c, 0x1e, 0xbf, + 0x2d, 0xed, 0x08, 0x8b, 0xc3, 0x8f, 0x48, 0xba, + 0x06, 0x03, 0xea, 0x5b, 0xba, 0x6a, 0xac, 0x23, + 0x5a, 0x5e, 0x31, 0x08, 0x29, 0x69, 0x64, 0x44, + 0x1c, 0x31, 0xae, 0xb1, 0x86, 0x7b, 0x26, 0x89, + 0xa6, 0xbe, 0xef, 0x69, 0x81, 0xf7, 0x77, 0xd5, + 0x8e, 0x78, 0xa5, 0x11, 0x51, 0xca, 0xec, 0xd0, + 0x86, 0xa5, 0x33, 0xf3, 0x65, 0x5d, 0x04, 0xc5, + 0xd2, 0x17, 0x2a, 0xfe, 0x4a, 0x58, 0x0f, 0x98, + 0x61, 0xad, 0xc3, 0xb8, 0x5b, 0x45, 0xcc, 0x28, + 0x3d, 0x4d, 0x00, 0xf5, 0x4a, 0xe2, 0xbc, 0x6c, + 0x1b, 0x80, 0x7a, 0x2b, 0x40, 0xb8, 0x34, 0x0e, + 0x44, 0x53, 0x16, 0xda, 0x7c, 0x46, 0x8b, 0x42, + 0x5e, 0xa8, 0xe1, 0xb8, 0xf8, 0xcf, 0xff, 0x48, + 0xcf, 0x2c, 0x4c, 0x98, 0xdb, 0xe5, 0x55, 0xfe, + 0x45, 0xfa, 0xf8, 0xde, 0x72, 0xf9, 0x84, 0x3c, + 0xc0, 0x0c, 0x1f, 0x86, 0x97, 0x86, 0xb8, 0xfe, + 0x7d, 0xff, 0xa3, 0xaf, 0x68, 0x00, 0x66, 0x90, + 0xac, 0xb5, 0xd8, 0xde, 0x35, 0x01, 0xf7, 0xab, + 0xab, 0xe3, 0xe9, 0x85, 0x4c, 0x6f, 0xe6, 0xbc, + 0xce, 0x67, 0x4a, 0xbd, 0xad, 0x7b, 0xec, 0xa1, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t bf_cbc_128_encblkno1_vec2_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, 0x41, 0xd1, 0x55, 0x59, 0xb2, 0x41, 0x61, + 0x8e, 0x60, 0x17, 0xcd, 0xe8, 0xf7, 0x1d, 0xbd, + 0x28, 0x5d, 0x1e, 0x15, 0x28, 0x80, 0x8c, 0x29, + 0x34, 0x96, 0x31, 0xda, 0xe1, 0x19, 0x88, 0xd5, + 0xe0, 0xc8, 0xb4, 0xaa, 0x04, 0x21, 0xf5, 0xef, + 0xfa, 0x0e, 0xc9, 0xa5, 0x88, 0x77, 0x49, 0xf4, + 0x02, 0x22, 0x0b, 0x8b, 0x5e, 0xe1, 0xab, 0xd4, + 0xb1, 0xb6, 0x48, 0x54, 0x96, 0x08, 0xaf, 0xa1, + 0x0b, 0xc0, 0xfe, 0x2a, 0x12, 0x36, 0x56, 0x85, + 0x6a, 0xf7, 0x3d, 0x82, 0xe6, 0xda, 0x5d, 0xfe, + 0x4f, 0x4f, 0xc9, 0x43, 0xdc, 0x0f, 0x53, 0x05, + 0x09, 0xd4, 0x9c, 0x2e, 0x6e, 0xf3, 0x52, 0x6a, + 0x10, 0xc6, 0x48, 0xb1, 0x54, 0x70, 0xab, 0x7c, + 0x31, 0xf6, 0x47, 0xef, 0x64, 0x5f, 0xff, 0x45, + 0x8c, 0x3f, 0x87, 0x3a, 0x2d, 0xa6, 0xaf, 0xb2, + 0x44, 0xdf, 0x80, 0x2e, 0x89, 0x4c, 0x94, 0x67, + 0xfc, 0x20, 0x98, 0xb4, 0xcf, 0x58, 0x1e, 0x33, + 0x55, 0x6a, 0x7c, 0x67, 0x5c, 0x28, 0x2f, 0x19, + 0x02, 0x14, 0x06, 0x93, 0x8c, 0x84, 0xae, 0x62, + 0x14, 0xf9, 0x87, 0xae, 0x85, 0xa3, 0x60, 0x26, + 0xfc, 0x8d, 0x04, 0x92, 0x27, 0xfe, 0x35, 0x7b, + 0x45, 0x9d, 0x4a, 0x86, 0x75, 0xa6, 0xb3, 0xa1, + 0x59, 0xe4, 0x4b, 0x1c, 0xd2, 0x71, 0x36, 0xfe, + 0x73, 0xed, 0x54, 0x0d, 0x9d, 0xde, 0x63, 0xb2, + 0xc0, 0x7c, 0xf2, 0xb3, 0x36, 0x62, 0x06, 0x1f, + 0xcd, 0x41, 0x92, 0x73, 0xbc, 0x11, 0x68, 0xc9, + 0x69, 0x20, 0xf9, 0xbb, 0x9a, 0xe9, 0x6c, 0x05, + 0xcf, 0x01, 0x57, 0xc4, 0x1d, 0x95, 0x5e, 0xe3, + 0xb7, 0x15, 0xde, 0xa7, 0xb5, 0x1a, 0x4e, 0x78, + 0x44, 0x5b, 0x9a, 0xee, 0x29, 0xe2, 0x22, 0x8b, + 0xe9, 0xe3, 0xe6, 0x70, 0x3e, 0xcb, 0x9f, 0x7f, + 0xc3, 0xd0, 0x2c, 0xdc, 0x55, 0xb4, 0x0d, 0x67, + 0xf5, 0xd8, 0xff, 0xbb, 0xb1, 0x02, 0xbf, 0xf6, + 0x33, 0x4e, 0x7a, 0x3a, 0x50, 0xb1, 0x01, 0x77, + 0x51, 0xef, 0xb5, 0x75, 0xb3, 0x66, 0xe8, 0xe6, + 0xd6, 0x53, 0x7d, 0x33, 0x51, 0x62, 0x5d, 0xf2, + 0x77, 0x02, 0x34, 0x42, 0xda, 0xee, 0xd9, 0xee, + 0x0b, 0x4d, 0x71, 0x5c, 0xc0, 0xec, 0xdd, 0xc0, + 0x34, 0x6f, 0xf4, 0x65, 0x32, 0xde, 0xc5, 0xb2, + 0x97, 0x60, 0x89, 0x4e, 0x3b, 0x0c, 0xf2, 0xa7, + 0x74, 0x61, 0xd7, 0xe4, 0xa6, 0x80, 0x78, 0x76, + 0xe5, 0x7d, 0xab, 0x96, 0x04, 0x00, 0x76, 0x22, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t bf_cbc_128_encblkno1_vec3_ctxt[SECSIZE] = { + 0xdd, 0x8e, 0xce, 0x5b, 0xb8, 0x2a, 0xc8, 0x0e, + 0xd2, 0xbe, 0xcf, 0xa7, 0x2a, 0x5b, 0x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0xd6, 0xd3, 0x03, 0x5b, 0xc7, 0x40, 0xac, + 0xb6, 0xf3, 0xbb, 0x22, 0xa3, 0x3e, 0x56, 0x55, + 0xdf, 0x06, 0x76, 0xe0, 0x7b, 0xd0, 0x52, 0x54, + 0x38, 0xb0, 0xaa, 0xab, 0x62, 0x31, 0xd1, 0x79, + 0x19, 0xec, 0x82, 0x36, 0x58, 0x31, 0xf9, 0x01, + 0xf9, 0x5e, 0xaf, 0x24, 0xb3, 0xc9, 0xb2, 0x30, + 0x3d, 0xbc, 0xf1, 0xbe, 0x17, 0xeb, 0xa0, 0x31, + 0x43, 0xed, 0xd7, 0x50, 0xcc, 0xc2, 0xe2, 0xaa, + 0x68, 0xc8, 0xf0, 0xd3, 0x89, 0xbd, 0xf5, 0x69, + 0x56, 0xe3, 0x88, 0x92, 0x32, 0x56, 0x85, 0x6f, + 0x25, 0x30, 0x28, 0x37, 0xd5, 0xe2, 0xa6, 0xf7, + 0x6e, 0xa9, 0x71, 0xda, 0x4a, 0x25, 0x94, 0x0b, + 0x84, 0x7f, 0x1f, 0x6b, 0x89, 0x2a, 0xf8, 0x30, + 0xcb, 0x60, 0x75, 0x21, 0xbd, 0xe2, 0x34, 0xf7, + 0x8f, 0x30, 0xd5, 0xd5, 0x1f, 0x17, 0x0d, 0x00, + 0x6c, 0x50, 0xde, 0x56, 0x15, 0x33, 0x1b, 0x83, + 0x68, 0x7b, 0x24, 0xe3, 0xa0, 0xda, 0xd5, 0x7a, + 0x3e, 0x93, 0x6d, 0xe0, 0x02, 0x79, 0x62, 0x5d, + 0x71, 0xe3, 0x7b, 0xa9, 0x0b, 0x7a, 0xcd, 0xb3, + 0xb2, 0x6f, 0x96, 0x19, 0x8f, 0xf8, 0x8b, 0x26, + 0x7a, 0x40, 0xc8, 0xae, 0xfe, 0x0d, 0x6f, 0x67, + 0xce, 0x5e, 0xa0, 0x04, 0x7e, 0x93, 0x1d, 0x17, + 0x1c, 0x32, 0x82, 0xf4, 0x54, 0xb9, 0x80, 0xdd, + 0x82, 0xae, 0xf5, 0xc5, 0x1e, 0x15, 0xab, 0xc2, + 0x5c, 0x60, 0xd2, 0x08, 0xc2, 0xa1, 0x1f, 0x89, + 0x0b, 0x59, 0x36, 0x07, 0xdc, 0x57, 0xd3, 0xa0, + 0x32, 0x42, 0xac, 0xa6, 0x90, 0x0b, 0xc0, 0xe4, + 0x91, 0x45, 0x85, 0x27, 0xb9, 0x48, 0x2a, 0x88, + 0x0a, 0xbf, 0xf6, 0x2d, 0xef, 0x4d, 0x1b, 0x64, + 0x49, 0x23, 0x47, 0x30, 0x29, 0x25, 0xb2, 0xc9, + 0xaf, 0xcd, 0xae, 0x56, 0x43, 0x28, 0xcf, 0x81, + 0x95, 0xa7, 0x3e, 0x51, 0x5b, 0x3b, 0xf7, 0x87, + 0x13, 0xc6, 0xee, 0x50, 0x2f, 0x78, 0xdd, 0xcf, + 0x63, 0xef, 0x15, 0xb9, 0x4f, 0x21, 0x27, 0x5e, + 0x94, 0x78, 0xad, 0xcd, 0x9b, 0x3d, 0xf2, 0xdb, + 0xed, 0xf2, 0xa2, 0x39, 0xca, 0xa3, 0xa8, 0x2e, + 0x68, 0xd5, 0xc3, 0xcf, 0x71, 0xec, 0x92, 0xdc, + 0xce, 0xe7, 0x7d, 0x2b, 0xf7, 0xbc, 0xe9, 0x2b, + 0x2e, 0xae, 0xaf, 0x0b, 0x92, 0x72, 0xac, 0x6e, + 0x49, 0xe1, 0xb3, 0x1f, 0xe5, 0x43, 0x2f, 0xa7, +}; + +const struct testvec bf_cbc_128_1_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t bf_cbc_128_encblkno8_vec0_ctxt[SECSIZE] = { + 0xb8, 0x65, 0x67, 0x8e, 0xe4, 0xd8, 0xb4, 0x93, + 0xa5, 0xbb, 0x13, 0x92, 0x27, 0x4b, 0xdd, 0xeb, + 0x0d, 0xad, 0x80, 0x6a, 0x57, 0x37, 0xc0, 0x23, + 0x23, 0xbf, 0xed, 0x86, 0x0c, 0x18, 0x48, 0x19, + 0xcd, 0x84, 0x66, 0xa7, 0xd6, 0xa0, 0x44, 0xd3, + 0x05, 0x4e, 0xf4, 0xfe, 0x6a, 0x57, 0x69, 0x01, + 0xaa, 0x91, 0x9c, 0x6e, 0x4f, 0x79, 0xc9, 0x8f, + 0x4c, 0xdf, 0x5b, 0x9c, 0xc4, 0xf7, 0x63, 0x16, + 0x20, 0x09, 0x07, 0x3f, 0x5e, 0x31, 0xcc, 0x81, + 0x71, 0xe3, 0x7b, 0xb5, 0xea, 0x2c, 0xb5, 0x14, + 0x1e, 0xf9, 0x0d, 0xe0, 0x45, 0xbc, 0x9f, 0x92, + 0x6c, 0xc9, 0x0a, 0x85, 0x62, 0x42, 0xf1, 0x4b, + 0xac, 0xe2, 0xfa, 0xad, 0x97, 0x7a, 0x43, 0x3d, + 0xb6, 0x5f, 0xcb, 0xe7, 0x17, 0x23, 0x28, 0xde, + 0x4e, 0xf8, 0xa1, 0x3c, 0x22, 0x63, 0x49, 0x31, + 0xa7, 0xbe, 0xbf, 0xfe, 0xee, 0xd9, 0x1f, 0xa0, + 0x2a, 0x0e, 0xf2, 0x4f, 0x3e, 0xf8, 0xbb, 0xae, + 0x9e, 0x0d, 0x2c, 0xaa, 0x2a, 0x2c, 0xf0, 0x6c, + 0x37, 0x2a, 0x5d, 0x96, 0x70, 0x9c, 0x87, 0xcc, + 0x2b, 0xca, 0x95, 0x37, 0xf4, 0x4d, 0x78, 0xae, + 0x4f, 0xb5, 0xe6, 0xad, 0xb1, 0xc1, 0x31, 0xd3, + 0x2d, 0xa6, 0xaf, 0xc1, 0x8c, 0xe4, 0x72, 0x05, + 0xb0, 0xfc, 0xb0, 0xf7, 0xfe, 0xf9, 0x3e, 0xa3, + 0xb9, 0xea, 0xc8, 0x69, 0xe3, 0x4e, 0x6d, 0xd1, + 0x8b, 0x2b, 0xf9, 0x2f, 0xd9, 0x40, 0x69, 0xff, + 0x90, 0x98, 0x7a, 0x82, 0xe3, 0x0d, 0x4e, 0x19, + 0x2f, 0x77, 0xf9, 0xab, 0x36, 0xa9, 0x4e, 0xbc, + 0x25, 0x32, 0xbd, 0x44, 0xea, 0x5a, 0x18, 0x31, + 0x37, 0xcd, 0x6c, 0x98, 0xdd, 0x1d, 0xf9, 0xf7, + 0x8f, 0x0b, 0x79, 0xbc, 0xe6, 0xf5, 0xf1, 0xa3, + 0x13, 0xe9, 0x39, 0xaf, 0xa4, 0x8a, 0x74, 0xae, + 0x60, 0x30, 0x63, 0x6e, 0xee, 0x97, 0x83, 0xee, + 0xc0, 0xdd, 0xde, 0xad, 0x92, 0x83, 0xc9, 0x3c, + 0xd8, 0x58, 0x6c, 0xcb, 0xe4, 0x29, 0x04, 0x69, + 0x4f, 0x45, 0xc2, 0x59, 0x98, 0x20, 0x91, 0x6e, + 0x95, 0x82, 0xb3, 0x47, 0x2c, 0xef, 0xdb, 0x96, + 0x38, 0xba, 0x01, 0x89, 0x84, 0x96, 0x71, 0xf9, + 0x2b, 0x23, 0xe0, 0x89, 0xb8, 0xb9, 0x80, 0xbf, + 0x0c, 0xdc, 0xf0, 0x5c, 0xd6, 0x4f, 0x18, 0x19, + 0xfe, 0x23, 0x5a, 0x1e, 0x20, 0x9a, 0x05, 0xf2, + 0x62, 0xd4, 0x04, 0x92, 0x24, 0xfc, 0xc0, 0x48, + 0xf0, 0x00, 0xb4, 0xbe, 0x2e, 0xea, 0x25, 0x17, + 0x5d, 0xab, 0x73, 0x26, 0x79, 0x77, 0xc5, 0x96, + 0xd3, 0xbf, 0x38, 0xda, 0x0f, 0xe1, 0x26, 0x9a, + 0x38, 0xfc, 0x43, 0x82, 0xd1, 0x4d, 0xf2, 0xae, + 0x98, 0x1e, 0xb0, 0x0d, 0xec, 0x7b, 0x56, 0x66, + 0xcb, 0x30, 0x57, 0x4f, 0xe7, 0x03, 0xe3, 0xa6, + 0x4a, 0x4a, 0xf9, 0xa3, 0xbf, 0x44, 0xac, 0x1a, + 0xe7, 0x4b, 0xc1, 0x5b, 0x03, 0x25, 0x4e, 0xc6, + 0x1f, 0x96, 0x4d, 0xf7, 0xbe, 0xa7, 0x5d, 0x60, + 0x20, 0x62, 0x10, 0xd7, 0xab, 0x64, 0xce, 0x22, + 0x8b, 0x52, 0x76, 0xa1, 0xa1, 0x8b, 0x1e, 0xb2, + 0x18, 0x29, 0x8f, 0xc5, 0x24, 0x39, 0xd4, 0xf8, + 0x75, 0x1e, 0x30, 0x57, 0x12, 0x01, 0x04, 0x78, + 0x68, 0x97, 0xa8, 0x65, 0x8c, 0xac, 0xb4, 0x3b, + 0x37, 0x45, 0x41, 0xbc, 0x7d, 0x4b, 0x09, 0xd7, + 0x46, 0x40, 0x99, 0x59, 0xa1, 0xb5, 0x9e, 0x84, + 0x24, 0x6d, 0xfb, 0x74, 0x22, 0xac, 0x4e, 0x5f, + 0x11, 0xd3, 0xa7, 0x9f, 0xa5, 0xca, 0x38, 0x54, + 0xe2, 0x65, 0x52, 0x02, 0x69, 0xe9, 0xa8, 0xf1, + 0xd7, 0x9d, 0x9a, 0x17, 0x54, 0xa0, 0xda, 0xbb, + 0x37, 0xb4, 0x0c, 0xb6, 0x00, 0xad, 0x6f, 0x88, + 0x84, 0xa7, 0x69, 0xd7, 0x0b, 0xbe, 0xb4, 0xbe, + 0x96, 0xbc, 0xcd, 0x08, 0xf1, 0x28, 0xe0, 0x6f, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t bf_cbc_128_encblkno8_vec1_ctxt[SECSIZE] = { + 0x7d, 0x95, 0x5a, 0x66, 0x23, 0x98, 0xa8, 0xbe, + 0x53, 0x63, 0x0d, 0x46, 0x4e, 0x38, 0x1b, 0x1d, + 0x36, 0xdd, 0x2a, 0x57, 0x3c, 0x17, 0x01, 0xba, + 0x4e, 0xf8, 0xaa, 0x22, 0x74, 0x05, 0xa2, 0x40, + 0xd0, 0x30, 0x61, 0x6c, 0x65, 0x5e, 0xfb, 0x21, + 0x63, 0xef, 0x62, 0x01, 0x74, 0x15, 0xf6, 0x87, + 0x92, 0xc1, 0x4e, 0x46, 0xdd, 0x76, 0xdb, 0x8b, + 0x20, 0x44, 0xc4, 0xfa, 0x7c, 0xd2, 0x07, 0x32, + 0x11, 0xeb, 0x5b, 0x38, 0x44, 0x32, 0xa1, 0xe7, + 0xcb, 0xa6, 0x1a, 0x12, 0xb9, 0x53, 0x13, 0x6f, + 0xc2, 0x0e, 0x6a, 0x77, 0x8b, 0x96, 0x14, 0x0a, + 0x23, 0x48, 0x65, 0xa5, 0xcd, 0x39, 0x38, 0x03, + 0xc8, 0x3a, 0x98, 0x69, 0x3d, 0x14, 0xae, 0xad, + 0x54, 0x57, 0xf6, 0x5a, 0xdd, 0x46, 0x4c, 0x3a, + 0x68, 0xa8, 0xb7, 0x57, 0xdd, 0x1e, 0x66, 0x0e, + 0xc2, 0x4c, 0x17, 0xba, 0xa4, 0x7e, 0x83, 0x45, + 0xc6, 0xf2, 0x34, 0x3b, 0x4e, 0xab, 0x67, 0x0c, + 0x73, 0xbf, 0x87, 0x7e, 0x93, 0x2b, 0x14, 0x33, + 0xd6, 0x24, 0x8d, 0xc7, 0x90, 0x11, 0xd2, 0x38, + 0xe6, 0xe0, 0x39, 0x1f, 0x00, 0x74, 0x40, 0xab, + 0xdc, 0xdd, 0x46, 0xe8, 0x85, 0x14, 0xb1, 0x78, + 0x34, 0x24, 0x04, 0x97, 0xde, 0xf9, 0x04, 0x69, + 0x0b, 0x15, 0x72, 0x37, 0xf4, 0x0d, 0xf4, 0x76, + 0x6f, 0xd8, 0x05, 0x75, 0x8f, 0x7e, 0x6b, 0xca, + 0x55, 0x20, 0x4a, 0x29, 0x16, 0xc1, 0x6e, 0x91, + 0x22, 0x01, 0x0d, 0x39, 0x5d, 0xb9, 0x09, 0xa4, + 0xe8, 0xc7, 0xff, 0x60, 0x39, 0xc6, 0xe4, 0x2a, + 0x1c, 0xf2, 0x3c, 0xf7, 0xf9, 0xd7, 0xde, 0x0b, + 0x0e, 0x30, 0xf1, 0x20, 0x7c, 0x93, 0x2f, 0x74, + 0x72, 0x40, 0x47, 0x2d, 0xeb, 0x8a, 0x5f, 0x69, + 0x60, 0xdf, 0xe9, 0x4d, 0x06, 0x24, 0x9c, 0x79, + 0xe7, 0x61, 0xd3, 0xa7, 0x57, 0x44, 0x49, 0x97, + 0x3a, 0xa3, 0x11, 0xc4, 0x70, 0xf4, 0x3d, 0xb5, + 0x4b, 0xb7, 0xae, 0x77, 0x36, 0xcf, 0x65, 0x3e, + 0xb6, 0x51, 0x83, 0xcb, 0x43, 0x5f, 0xd0, 0xfb, + 0x69, 0xc4, 0x1b, 0x77, 0x71, 0xcc, 0x72, 0xf4, + 0x5f, 0xc2, 0xda, 0xea, 0xa4, 0x33, 0xec, 0x8e, + 0x92, 0x22, 0x6a, 0x55, 0x34, 0x6a, 0x10, 0xb8, + 0x62, 0x66, 0xc1, 0x6f, 0x65, 0xdd, 0x9a, 0x40, + 0xa0, 0xbf, 0x88, 0xbb, 0x79, 0x1c, 0xa4, 0xaa, + 0xdf, 0xe8, 0xe7, 0x40, 0x88, 0xc6, 0x0f, 0xa2, + 0x2c, 0xee, 0xe7, 0x41, 0x32, 0x46, 0xa2, 0x46, + 0x85, 0xbf, 0x4c, 0xca, 0x4d, 0xd3, 0x9b, 0x49, + 0x43, 0x98, 0xae, 0xfc, 0x93, 0xa7, 0x94, 0x98, + 0x86, 0xa1, 0x0a, 0x85, 0x77, 0x67, 0xa6, 0x16, + 0x94, 0x76, 0xe5, 0x2f, 0x88, 0x5f, 0x24, 0x16, + 0xe5, 0x84, 0x4c, 0xd2, 0x58, 0x59, 0x82, 0x59, + 0x2c, 0xe2, 0x8d, 0xba, 0x08, 0x01, 0x67, 0x1f, + 0x2a, 0x9e, 0x4d, 0x53, 0x57, 0x2d, 0x6e, 0x35, + 0x38, 0xd5, 0x50, 0xa7, 0x0c, 0xe6, 0x77, 0x71, + 0xbe, 0x45, 0x2e, 0xf4, 0x7a, 0x3a, 0x51, 0x03, + 0x04, 0x2b, 0xd7, 0x42, 0x6c, 0x5b, 0x82, 0xba, + 0xb4, 0x09, 0xee, 0x9d, 0xea, 0x8f, 0xf0, 0xb3, + 0xb2, 0x9d, 0x0e, 0x09, 0x72, 0x8c, 0xd9, 0x1e, + 0x6d, 0x78, 0x57, 0x10, 0x1f, 0xeb, 0x4e, 0x53, + 0x57, 0x65, 0xe5, 0x43, 0xe8, 0xb4, 0xb6, 0xb8, + 0x25, 0x8a, 0xe2, 0xb3, 0x99, 0x95, 0x2c, 0xd0, + 0xc7, 0x89, 0xad, 0xdb, 0x72, 0xf0, 0x83, 0xe3, + 0x2f, 0x30, 0x33, 0xf4, 0x03, 0x14, 0x86, 0xa0, + 0xe0, 0x57, 0x15, 0x53, 0x26, 0xd0, 0x6d, 0x12, + 0x51, 0x96, 0x9b, 0x00, 0x8e, 0x41, 0xea, 0x05, + 0x75, 0x5d, 0xb3, 0x8d, 0x44, 0x7f, 0x41, 0x7f, + 0xd1, 0xed, 0x7c, 0xf7, 0xac, 0x6b, 0x21, 0xc7, + 0x0c, 0x49, 0xa1, 0x2e, 0x57, 0xa1, 0x21, 0xe2, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t bf_cbc_128_encblkno8_vec2_ctxt[SECSIZE] = { + 0x28, 0x0c, 0x49, 0x08, 0x84, 0xcb, 0xba, 0x4a, + 0xa5, 0xb6, 0x12, 0x4c, 0x14, 0x11, 0x1f, 0x88, + 0x57, 0x78, 0x1e, 0x51, 0x7c, 0x9d, 0xba, 0x31, + 0x80, 0x14, 0xeb, 0x4a, 0x98, 0x8a, 0xb5, 0x4d, + 0xc5, 0xbd, 0xd2, 0x48, 0x1e, 0x19, 0x43, 0x54, + 0x48, 0x1d, 0x24, 0x76, 0x7d, 0xd8, 0xcc, 0xe9, + 0xd9, 0x7b, 0xa9, 0xdf, 0xe3, 0x65, 0x85, 0x10, + 0xb8, 0x11, 0xce, 0xa3, 0x07, 0x4d, 0x87, 0x3f, + 0x95, 0xfb, 0xa5, 0x06, 0xa4, 0x37, 0xb0, 0x89, + 0x03, 0xa9, 0xef, 0x62, 0x98, 0xd3, 0x85, 0xe8, + 0xb3, 0x21, 0xab, 0xe9, 0xdc, 0x03, 0x2a, 0x20, + 0xf7, 0xb1, 0xa4, 0x7a, 0xd5, 0xdc, 0x61, 0x2e, + 0x15, 0x81, 0x3e, 0xcf, 0x8d, 0x8d, 0x54, 0x19, + 0x70, 0xde, 0xa9, 0x57, 0x93, 0x87, 0xc7, 0x16, + 0x06, 0x25, 0xf3, 0x93, 0x8f, 0x73, 0x92, 0x29, + 0x1e, 0xcd, 0x5a, 0x9d, 0x8f, 0x8d, 0x44, 0x15, + 0x8d, 0x92, 0x44, 0x95, 0x7a, 0x5e, 0x1b, 0xfd, + 0x31, 0xa5, 0x8c, 0x22, 0x89, 0xbb, 0x91, 0x15, + 0xad, 0x0a, 0x73, 0x94, 0x65, 0xae, 0xca, 0xfc, + 0x7e, 0xae, 0x85, 0x45, 0xe7, 0xd7, 0x8f, 0x89, + 0x8e, 0x44, 0x62, 0x7a, 0xe0, 0xee, 0x78, 0xbd, + 0x88, 0x62, 0x8e, 0xb8, 0x35, 0x7a, 0xa9, 0x12, + 0x56, 0x2d, 0xe4, 0xbb, 0x2d, 0xc8, 0x98, 0x0e, + 0x35, 0x9e, 0xea, 0x14, 0x43, 0x80, 0xde, 0x9e, + 0x2e, 0xf8, 0xf9, 0xcd, 0x61, 0xa6, 0x22, 0xc8, +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x7d, 0x76, 0x36, 0x85, + 0xa5, 0xbf, 0x0b, 0xd4, 0x56, 0x4c, 0x37, 0xe3, + 0x60, 0x93, 0xdc, 0x3b, 0xca, 0x34, 0x78, 0xcf, + 0xdb, 0x0c, 0x9d, 0x5c, 0x52, 0xb2, 0xd5, 0x7b, + 0xbb, 0x4e, 0xe1, 0xa9, 0x2a, 0xc6, 0x42, 0xf5, + 0x21, 0x9c, 0x15, 0xae, 0xb9, 0x08, 0x3a, 0xc4, + 0x50, 0x7e, 0x0e, 0xb6, 0xc3, 0xfe, 0xf4, 0xd9, + 0x1a, 0x97, 0x30, 0x9f, 0x51, 0x2c, 0xac, 0xd2, + 0x13, 0x93, 0x62, 0x56, 0xcb, 0x34, 0xf3, 0xca, + 0x26, 0xc6, 0x32, 0xbe, 0xf6, 0xd5, 0x1e, 0x5b, + 0x3a, 0x5c, 0x31, 0x08, 0xa1, 0x47, 0x6b, 0x75, + 0x95, 0x8e, 0x3d, 0xbf, 0x2e, 0x81, 0x02, 0x0d, + 0x17, 0x66, 0x6f, 0x04, 0xe0, 0x1e, 0x03, 0x27, + 0xd3, 0xcf, 0x45, 0xc6, 0x08, 0xdb, 0xdf, 0x83, + 0xd5, 0xc2, 0x7f, 0xe8, 0x5f, 0x4a, 0x36, 0x0a, + 0x6d, 0x3c, 0x91, 0x8e, 0x52, 0xf3, 0xdd, 0x62, + 0xff, 0x78, 0x87, 0xd9, 0x4c, 0xad, 0x5c, 0x9f, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t bf_cbc_128_encblkno8_vec3_ctxt[SECSIZE] = { + 0xa3, 0x9a, 0x21, 0xbd, 0x1c, 0x97, 0x4f, 0xe2, + 0x7d, 0x63, 0xfe, 0x52, 0x07, 0xac, 0x81, 0x75, + 0x15, 0x04, 0x8c, 0xc7, 0x7c, 0x11, 0x8d, 0x53, + 0x17, 0x87, 0xe8, 0x5d, 0xb1, 0xe8, 0xcb, 0x43, + 0xe2, 0x4b, 0xce, 0x9b, 0xf7, 0x51, 0x0a, 0xee, + 0x0a, 0x49, 0xae, 0x9a, 0xbd, 0x33, 0x3f, 0x0b, + 0xd4, 0xe8, 0x57, 0x77, 0xb1, 0xe1, 0xa5, 0x22, + 0x83, 0xbf, 0x7c, 0x63, 0x6c, 0x3b, 0x25, 0xde, + 0x2c, 0x6a, 0x28, 0x66, 0x0e, 0xc4, 0x8d, 0x66, + 0x66, 0xb6, 0xc6, 0xb5, 0x38, 0x40, 0x84, 0x81, + 0xec, 0x03, 0xdb, 0xbf, 0xe1, 0x8f, 0xf4, 0xb3, + 0xc4, 0x50, 0x24, 0xa2, 0x48, 0x66, 0x73, 0xed, + 0x4b, 0x00, 0x12, 0xd5, 0x15, 0x5f, 0xfb, 0xd9, + 0x6c, 0x76, 0x3b, 0xa2, 0x68, 0x41, 0xc1, 0x96, + 0x50, 0xff, 0x8a, 0x83, 0xac, 0x02, 0x42, 0xcb, + 0xed, 0x93, 0xbf, 0xd9, 0x51, 0x46, 0x50, 0xd1, + 0xeb, 0x02, 0x61, 0x64, 0xa7, 0x0e, 0x95, 0xc2, + 0x95, 0x5a, 0x93, 0xd9, 0x77, 0x17, 0xa4, 0xc7, + 0x51, 0x42, 0xa3, 0xd4, 0x32, 0x4e, 0x4f, 0xe1, + 0xaa, 0x6d, 0xab, 0x08, 0xd9, 0xe9, 0xfe, 0x72, + 0xf3, 0x2c, 0xfb, 0x43, 0xdf, 0x88, 0x44, 0x94, + 0x0b, 0x5c, 0x85, 0x54, 0xe3, 0x13, 0xe2, 0x10, + 0x64, 0xa7, 0xcf, 0xe3, 0x2a, 0x3e, 0xfe, 0xd1, + 0x67, 0xcd, 0xd1, 0x66, 0x06, 0x26, 0x2f, 0x6f, + 0x6f, 0x44, 0xe7, 0xf4, 0xac, 0xe4, 0x58, 0x2f, + 0x61, 0xad, 0x64, 0xc6, 0x0c, 0xf0, 0x9a, 0x3b, + 0x85, 0x1f, 0x3c, 0xea, 0x8e, 0x84, 0xbb, 0x1a, + 0x51, 0x19, 0x3c, 0x6f, 0x5b, 0xf5, 0x6c, 0xb1, + 0x8c, 0x91, 0x25, 0x89, 0x3a, 0x45, 0xb5, 0x35, + 0x13, 0x74, 0xec, 0x68, 0x44, 0xb8, 0xfd, 0xd6, + 0x20, 0x78, 0x7b, 0xe3, 0xe0, 0x82, 0xb7, 0x4a, + 0x38, 0xb6, 0xe4, 0x1b, 0xbf, 0xd9, 0xd3, 0xe9, + 0xbf, 0xd7, 0xdc, 0x8e, 0x90, 0x7d, 0xcb, 0x39, + 0xc4, 0x6c, 0xa4, 0x70, 0x15, 0xf7, 0xa2, 0x16, + 0x04, 0x9b, 0xc0, 0x85, 0x04, 0x1e, 0x69, 0x73, + 0xf3, 0xbd, 0x64, 0x95, 0xfb, 0x21, 0xcb, 0xca, + 0x72, 0xd4, 0x33, 0xe5, 0x11, 0xc3, 0x46, 0xa6, + 0xd2, 0x4c, 0x8a, 0xbb, 0xba, 0x45, 0xcc, 0x45, + 0xdb, 0x8a, 0xec, 0xef, 0x8c, 0x04, 0xcc, 0xeb, + 0x42, 0xad, 0xc3, 0x87, 0xe2, 0x59, 0x3b, 0xed, + 0x2a, 0x11, 0x74, 0xc1, 0x28, 0x8a, 0xc2, 0x17, + 0xca, 0x5a, 0x88, 0xcc, 0x17, 0x2c, 0x03, 0xf6, + 0xcd, 0xd6, 0x92, 0xbd, 0x68, 0x26, 0x41, 0x40, + 0x15, 0x3e, 0x54, 0xf5, 0xb7, 0x4a, 0x82, 0x68, + 0xca, 0x27, 0xed, 0xed, 0x25, 0xd6, 0x0d, 0x0f, + 0x86, 0x62, 0xf0, 0x86, 0x5b, 0xed, 0x94, 0x0b, + 0xd0, 0xec, 0xc7, 0xfd, 0x9c, 0x8a, 0xdf, 0x4f, + 0x65, 0x7e, 0x63, 0x40, 0xeb, 0xe4, 0x79, 0xcb, + 0x67, 0xc6, 0x0e, 0x45, 0xf9, 0xb1, 0x48, 0x27, + 0x16, 0xfc, 0x99, 0x76, 0xac, 0xd0, 0xbc, 0xe6, + 0x9b, 0x29, 0x2d, 0xa5, 0x6c, 0x88, 0x45, 0x7a, + 0x01, 0xf3, 0xe3, 0x15, 0xfb, 0x29, 0xd4, 0x3b, + 0x9a, 0xa8, 0xc6, 0x98, 0x92, 0x19, 0x16, 0xba, + 0xdc, 0x41, 0x70, 0x40, 0x51, 0xfb, 0x7f, 0xb5, + 0xe4, 0x3f, 0x3f, 0x73, 0xb0, 0xb3, 0xd7, 0x6d, + 0x3e, 0x4d, 0x6b, 0x9e, 0x42, 0x8e, 0xbb, 0xd7, + 0xb5, 0x26, 0xa9, 0x19, 0xf5, 0x68, 0xf3, 0x8d, + 0x35, 0x91, 0x06, 0x48, 0xfa, 0x0e, 0x7d, 0xe2, + 0xd3, 0x71, 0x75, 0x44, 0xbd, 0xe6, 0xe6, 0xd6, + 0x36, 0x43, 0x64, 0x3a, 0xd5, 0x97, 0xfa, 0xc0, + 0x10, 0xf7, 0x6c, 0x26, 0xf1, 0xb4, 0xbc, 0xf5, + 0xf6, 0xa3, 0xec, 0x0a, 0xb5, 0x34, 0x55, 0x1a, + 0x67, 0xcb, 0xec, 0x2c, 0x2e, 0x2e, 0x74, 0xed, + 0xfc, 0x85, 0x53, 0x01, 0x87, 0xa7, 0xa0, 0x1f, +}; + +const struct testvec bf_cbc_128_8_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_128_encblkno8_vec3_ctxt, + }, +}; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t bf_cbc_256_encblkno1_vec0_ctxt[SECSIZE] = { + 0x14, 0xec, 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, 0xb2, 0x08, 0x3e, + 0x68, 0x43, 0xff, 0x69, 0x1e, 0x88, 0x0a, 0x34, + 0x40, 0xae, 0xb9, 0xf4, 0xb9, 0x3f, 0xa5, 0xd2, + 0xfb, 0xa0, 0xfd, 0x10, 0xa5, 0xbb, 0xd7, 0x22, + 0x8c, 0xd1, 0xf5, 0xc4, 0x11, 0xc6, 0x1e, 0xb5, + 0xfc, 0x90, 0x84, 0xa2, 0x49, 0x38, 0x64, 0x92, + 0x6e, 0xf2, 0xaa, 0xed, 0xe8, 0x9d, 0xac, 0x86, + 0xb7, 0xb3, 0xd9, 0x98, 0x11, 0x8f, 0x51, 0x33, + 0x84, 0x06, 0x40, 0x26, 0x3f, 0xe1, 0xb3, 0x4a, + 0x76, 0x53, 0x68, 0x8b, 0xfe, 0x6f, 0xcd, 0x66, + 0x92, 0x24, 0x42, 0xf4, 0x11, 0x02, 0x01, 0x00, + 0xaa, 0x15, 0x35, 0x42, 0xab, 0x6f, 0x2b, 0x3b, + 0x9a, 0x23, 0x73, 0x18, 0xa8, 0x9b, 0x43, 0x4b, + 0xfb, 0xef, 0x07, 0x75, 0xd7, 0xd6, 0x08, 0x94, + 0xe3, 0x2d, 0xd9, 0xd4, 0x8e, 0x6b, 0x7c, 0xe0, + 0xae, 0xef, 0xcb, 0x5c, 0x46, 0x39, 0x64, 0x34, + 0x48, 0x77, 0x2c, 0x87, 0x68, 0x57, 0xef, 0xba, + 0xd3, 0x3b, 0xb8, 0x68, 0xc5, 0x65, 0x73, 0x44, + 0x0b, 0xef, 0xc7, 0x5e, 0xe6, 0xa2, 0xba, 0x24, + 0x8c, 0x67, 0xa0, 0xf4, 0xef, 0x18, 0x8c, 0x72, + 0x5b, 0x81, 0x8c, 0x81, 0x4f, 0x9a, 0xed, 0x46, + 0x5d, 0x05, 0x9a, 0xdc, 0x01, 0xbe, 0xe8, 0x3f, + 0xb7, 0x5c, 0x8b, 0x2f, 0x92, 0x2c, 0x93, 0x54, + 0x68, 0xfa, 0xd4, 0x27, 0x81, 0xab, 0xa9, 0xfd, + 0x20, 0x21, 0x1b, 0x3a, 0x6e, 0x6b, 0x02, 0x57, + 0x6e, 0xd6, 0x7b, 0x7e, 0x5d, 0x84, 0x47, 0x69, + 0x86, 0x7b, 0x8f, 0x8b, 0xff, 0xb5, 0xcd, 0xc1, + 0x03, 0x18, 0x23, 0x7f, 0x23, 0x2e, 0x3a, 0x48, + 0xe2, 0xf6, 0xb1, 0x78, 0x13, 0x81, 0xbb, 0x80, + 0x91, 0x89, 0x54, 0x7d, 0x1f, 0x1a, 0xd5, 0x35, + 0xad, 0x56, 0x6a, 0x0f, 0xeb, 0x4d, 0x00, 0xdf, + 0xe0, 0xf3, 0x7c, 0xd3, 0x2c, 0x5a, 0x48, 0x39, + 0xa1, 0xc1, 0xfa, 0x34, 0x5f, 0xf9, 0x0b, 0xcd, + 0x1f, 0x21, 0xc6, 0x46, 0xb3, 0xd8, 0x45, 0xc5, + 0x37, 0xf7, 0xd0, 0xda, 0x27, 0x0f, 0xec, 0xec, + 0x05, 0x81, 0x6f, 0x97, 0xca, 0x6d, 0xfa, 0x71, + 0xc9, 0x59, 0x84, 0xc3, 0x0d, 0x55, 0x12, 0xbf, + 0xe1, 0xd2, 0x7c, 0x51, 0x65, 0x8c, 0xc3, 0x8a, + 0x73, 0x2f, 0x1c, 0xd8, 0x13, 0x4a, 0xd1, 0x78, + 0xb2, 0xc8, 0x19, 0x09, 0xce, 0x7b, 0xb6, 0x77, + 0xcc, 0xc3, 0xe6, 0xee, 0x3a, 0x82, 0xf9, 0xc6, + 0x5a, 0x36, 0x46, 0xc0, 0x25, 0xee, 0xaf, 0x78, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t bf_cbc_256_encblkno1_vec1_ctxt[SECSIZE] = { + 0x0b, 0xb6, 0x26, 0x92, 0x1d, 0x74, 0xc2, 0x10, + 0xb5, 0x99, 0x5f, 0x62, 0x7f, 0x3b, 0x49, 0x10, + 0xc1, 0x20, 0x9f, 0x38, 0x25, 0x0f, 0x59, 0xde, + 0xe4, 0xc8, 0xb5, 0x27, 0xb1, 0xec, 0x96, 0x40, + 0xe8, 0x05, 0x15, 0x40, 0x96, 0xe0, 0xff, 0xaf, + 0x53, 0x73, 0xa1, 0xa6, 0x73, 0x03, 0xcf, 0x1f, + 0x87, 0x48, 0x7d, 0x81, 0x0e, 0x35, 0x23, 0x7b, + 0xde, 0x12, 0xd8, 0xcd, 0x0a, 0xcb, 0x03, 0xc5, + 0x07, 0xf7, 0x7a, 0x04, 0xf3, 0xda, 0x7d, 0x3b, + 0x73, 0xc6, 0x31, 0xbc, 0x24, 0xde, 0x23, 0x05, + 0x3a, 0xdc, 0xe2, 0x96, 0x85, 0x06, 0xeb, 0x89, + 0xb0, 0x49, 0x3c, 0x79, 0x8e, 0xcf, 0x49, 0x0e, + 0x34, 0x04, 0xa5, 0xcf, 0x45, 0x56, 0xb6, 0xc2, + 0xf1, 0xf1, 0xab, 0x7c, 0x8a, 0xfc, 0xeb, 0xa0, + 0x8a, 0xe6, 0x73, 0xb4, 0xc3, 0x0c, 0x03, 0x5f, + 0x03, 0x53, 0x6f, 0x69, 0xa2, 0xd0, 0xa7, 0x48, + 0xc4, 0x11, 0x88, 0x75, 0xe1, 0xf3, 0xd0, 0x72, + 0x98, 0x6f, 0x84, 0xa6, 0xa8, 0x35, 0xbb, 0xac, + 0x4d, 0xac, 0x55, 0x88, 0x85, 0x86, 0x5a, 0xd9, + 0xb6, 0x57, 0xf9, 0x40, 0xf6, 0x7f, 0x1b, 0x4e, + 0x87, 0xc0, 0x56, 0x8a, 0x2f, 0x3a, 0xe5, 0xa6, + 0x67, 0x68, 0x21, 0x2b, 0xea, 0xfa, 0xee, 0x47, + 0xa0, 0x34, 0x56, 0x7d, 0xa0, 0x3d, 0x58, 0xd7, + 0xff, 0xa2, 0xb6, 0x03, 0x52, 0x16, 0xa5, 0x15, + 0x65, 0xdb, 0xe1, 0x1b, 0xdf, 0x69, 0xb1, 0x48, + 0x6a, 0xdf, 0xc1, 0x00, 0x07, 0xdc, 0x46, 0x4b, + 0x59, 0xcf, 0x15, 0x6b, 0xee, 0x4f, 0x72, 0x77, + 0x6e, 0xbf, 0x47, 0x0e, 0x84, 0x0b, 0xb1, 0xac, + 0x85, 0xce, 0x2b, 0x47, 0x7a, 0xcc, 0x30, 0x0c, + 0x2f, 0x10, 0x27, 0xaa, 0x83, 0x3f, 0x17, 0x39, + 0x84, 0x45, 0x8c, 0xb7, 0x31, 0xb3, 0x7c, 0xcd, + 0xed, 0x86, 0x7d, 0xa9, 0x06, 0x25, 0x1f, 0xe3, + 0x9a, 0x9b, 0x92, 0xdd, 0x07, 0x63, 0x3b, 0x51, + 0x32, 0x2e, 0xae, 0xdf, 0xad, 0xd4, 0x54, 0x5d, + 0x71, 0x36, 0xe9, 0xda, 0x70, 0xe9, 0xec, 0x75, + 0x0b, 0xbb, 0xcc, 0x5d, 0xc5, 0x45, 0x8e, 0x56, + 0x12, 0x87, 0x95, 0x0f, 0x0f, 0x5b, 0x22, 0xc2, + 0xe9, 0x71, 0xf2, 0x7e, 0x7b, 0xc2, 0xce, 0x1f, + 0xb4, 0x43, 0xa5, 0xf1, 0x80, 0x03, 0xd9, 0x44, + 0x3e, 0x97, 0xd6, 0x32, 0x80, 0x99, 0x6b, 0x5b, + 0x25, 0x8b, 0x73, 0x0c, 0x21, 0xda, 0x87, 0x29, + 0x57, 0x1e, 0xa3, 0x1f, 0xc1, 0xb2, 0xd6, 0xa4, + 0x72, 0x64, 0x4a, 0x6b, 0x6f, 0x4d, 0xa8, 0x03, + 0x59, 0x6f, 0xce, 0x8a, 0xd6, 0x1c, 0x63, 0x30, + 0x60, 0xd1, 0x55, 0xc5, 0x44, 0x9a, 0xa8, 0x69, + 0x9f, 0xc7, 0xbe, 0xca, 0x92, 0x83, 0xe9, 0xea, + 0x51, 0x00, 0x5a, 0xdc, 0xbb, 0xbd, 0x5d, 0xf2, + 0x6d, 0x3c, 0x09, 0xde, 0x68, 0x33, 0x5f, 0x5c, + 0x80, 0x8e, 0x22, 0x93, 0x28, 0x5b, 0x77, 0xae, + 0xcd, 0x0d, 0x08, 0xab, 0x94, 0xd6, 0x12, 0x72, + 0x3f, 0xd2, 0xb3, 0xff, 0x87, 0x0a, 0x6f, 0x72, + 0xa7, 0xff, 0xc1, 0xdc, 0x8a, 0x64, 0xdf, 0xeb, + 0x0e, 0x63, 0x71, 0x42, 0x88, 0x2b, 0x13, 0x17, + 0xf2, 0x3b, 0xf9, 0xbb, 0xc9, 0xcc, 0x32, 0x1f, + 0x12, 0x7f, 0xa0, 0x8e, 0x77, 0x31, 0x42, 0x46, + 0x3d, 0xb6, 0xa9, 0x14, 0x6e, 0x02, 0x5a, 0x4f, + 0xf1, 0x5b, 0x91, 0x7e, 0x93, 0xea, 0x94, 0xf1, + 0xcf, 0x0e, 0x10, 0xf8, 0xc2, 0x55, 0x87, 0x68, + 0xf9, 0x49, 0xfa, 0xeb, 0x0f, 0x2c, 0xd7, 0xd8, + 0x26, 0x1a, 0x5b, 0x1a, 0x42, 0x06, 0xea, 0x8a, + 0xb6, 0xec, 0x6e, 0xb0, 0x00, 0xb9, 0x3b, 0x50, + 0xe8, 0x9e, 0xc2, 0x51, 0x4f, 0x03, 0xcd, 0x9f, + 0x36, 0x27, 0xca, 0xa2, 0x98, 0x87, 0x5a, 0xae, + 0xd8, 0x87, 0x76, 0xb6, 0xb6, 0x19, 0x7d, 0x75, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t bf_cbc_256_encblkno1_vec2_ctxt[SECSIZE] = { + 0x91, 0x45, 0x4e, 0xe8, 0xad, 0xe3, 0x95, 0x0f, + 0x40, 0x35, 0x21, 0x21, 0x77, 0x62, 0x1d, 0x65, + 0xe4, 0x93, 0x11, 0xd2, 0x20, 0xa4, 0xe4, 0x53, + 0x44, 0xff, 0x60, 0xe9, 0x34, 0xb2, 0x33, 0x87, + 0x3d, 0xb0, 0xd8, 0x37, 0x7e, 0x0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xd7, 0xc1, 0xe3, + 0xa7, 0xcd, 0xf9, 0x25, 0xdc, 0xc4, 0xd2, 0xee, + 0x5b, 0x53, 0x72, 0x59, 0x8b, 0xea, 0xbf, 0xde, + 0x2b, 0x35, 0xd5, 0x27, 0x57, 0x2e, 0x13, 0xa7, + 0x50, 0x2d, 0xa5, 0xd5, 0x43, 0x0b, 0x49, 0x87, + 0xd0, 0xbd, 0xdd, 0xec, 0x4b, 0xd1, 0x8b, 0xf6, + 0xf6, 0xd0, 0x97, 0xcb, 0x8d, 0x58, 0x35, 0x27, + 0xa5, 0x7e, 0x4a, 0xda, 0x93, 0xa4, 0x1e, 0x39, + 0x53, 0x59, 0x87, 0xfe, 0x82, 0x09, 0xda, 0x03, + 0x33, 0xcf, 0x94, 0x60, 0xb1, 0x0c, 0xa1, 0x0e, + 0xd6, 0xaa, 0xb0, 0x09, 0x96, 0x8b, 0x72, 0x15, + 0xfb, 0xb0, 0x7d, 0x06, 0xf5, 0x2d, 0x64, 0xcd, + 0x03, 0xf0, 0xfa, 0xed, 0x6f, 0x43, 0xe3, 0xf3, + 0x33, 0xaf, 0x65, 0x82, 0x1d, 0xad, 0x03, 0x62, + 0xbe, 0x12, 0x14, 0x85, 0x66, 0x45, 0x03, 0x79, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t bf_cbc_256_encblkno1_vec3_ctxt[SECSIZE] = { + 0x65, 0xbb, 0x30, 0x13, 0x9a, 0x26, 0xe9, 0x3d, + 0x54, 0x28, 0x77, 0xf1, 0x3f, 0x9b, 0xe1, 0x3e, + 0x70, 0x90, 0x6f, 0x16, 0xfc, 0x2f, 0x27, 0xb3, + 0xc6, 0x3c, 0x38, 0x31, 0x11, 0xe1, 0x3b, 0x72, + 0x22, 0x1c, 0x01, 0xc5, 0xa6, 0x70, 0x16, 0x4d, + 0xd2, 0xbd, 0xcb, 0x15, 0x00, 0x22, 0xab, 0x65, + 0x6a, 0x96, 0x5e, 0x45, 0x7f, 0xfd, 0x76, 0x18, + 0x43, 0x25, 0x75, 0x73, 0xa4, 0x24, 0xe4, 0x5b, + 0xca, 0xf7, 0x6f, 0xfe, 0xc6, 0x4c, 0x81, 0x77, + 0xe5, 0x1b, 0xb4, 0x7b, 0x64, 0xc2, 0x0d, 0x2b, + 0xa9, 0x76, 0xae, 0x5d, 0xab, 0x81, 0x77, 0xa6, + 0x48, 0xe9, 0x0c, 0x6d, 0x93, 0xbd, 0x7e, 0xdc, + 0x39, 0x89, 0x72, 0xd2, 0x07, 0x87, 0x44, 0xa6, + 0x7d, 0x08, 0x54, 0xc6, 0x90, 0x1d, 0xa2, 0xd7, + 0xfd, 0xd5, 0x59, 0x67, 0xd9, 0x5f, 0x5c, 0xbc, + 0x60, 0xc7, 0xf6, 0x98, 0xad, 0x21, 0xdf, 0xde, + 0x27, 0xca, 0x73, 0x2f, 0x56, 0xb7, 0xd7, 0x54, + 0x6e, 0xc3, 0x09, 0x6f, 0x1b, 0x82, 0x6f, 0xf8, + 0x1b, 0xb2, 0x54, 0x47, 0x54, 0x55, 0x67, 0x1c, + 0x4a, 0x10, 0x44, 0xb8, 0x8e, 0x85, 0x71, 0x70, + 0x02, 0x49, 0xdd, 0x4f, 0xd4, 0xd4, 0x8a, 0x60, + 0x04, 0x17, 0x84, 0xbf, 0xb4, 0x0a, 0x6f, 0xc1, + 0xec, 0x1f, 0x5d, 0x79, 0x59, 0x15, 0x7b, 0x87, + 0xa2, 0xfe, 0x81, 0xa1, 0x0b, 0x74, 0xfa, 0xef, + 0xce, 0x96, 0xec, 0x4b, 0xd8, 0x8e, 0xe9, 0xc2, + 0x6b, 0x15, 0xd9, 0xe4, 0x1d, 0x81, 0xb2, 0x12, + 0xb9, 0x8b, 0x64, 0x3d, 0xfa, 0xf6, 0x29, 0x25, + 0x88, 0x4f, 0xfa, 0x56, 0x34, 0x85, 0xa6, 0xbe, + 0xf7, 0x9f, 0x54, 0xc4, 0xb7, 0x17, 0xd5, 0x00, + 0x2d, 0x06, 0xca, 0xf0, 0xec, 0xf9, 0x52, 0x62, + 0x12, 0xef, 0xc0, 0x57, 0xd1, 0xf3, 0xf2, 0xb1, + 0x3d, 0xc5, 0x69, 0x04, 0x95, 0xaf, 0xc6, 0x54, + 0x18, 0x08, 0x2f, 0xe2, 0xc2, 0xdb, 0x28, 0x63, + 0x7c, 0xf5, 0xba, 0xa4, 0xdf, 0xbd, 0xdd, 0xac, + 0x98, 0xec, 0x9e, 0x07, 0x48, 0xee, 0xb9, 0x6f, + 0x40, 0xba, 0x08, 0xd5, 0x74, 0x97, 0x34, 0x98, + 0x7a, 0x80, 0xc5, 0x78, 0x69, 0x11, 0xd9, 0xcb, + 0x3b, 0x6f, 0xe7, 0xb7, 0x78, 0xb0, 0x5e, 0x02, + 0xaf, 0x6c, 0xef, 0x36, 0x00, 0xca, 0x97, 0x1a, + 0x01, 0x2e, 0xe8, 0xc0, 0x8b, 0xc6, 0x78, 0xf4, + 0x2d, 0x60, 0x2c, 0x04, 0x3f, 0x0b, 0xca, 0x7e, + 0xf1, 0x2e, 0x67, 0x8f, 0x9d, 0xa7, 0xaa, 0xab, + 0xcf, 0xb3, 0x84, 0x9e, 0x14, 0x35, 0x15, 0x3b, + 0x88, 0x9a, 0x33, 0x5d, 0x68, 0x82, 0x29, 0x53, + 0x94, 0x18, 0x0d, 0x14, 0x9e, 0x5f, 0xc1, 0x32, + 0x0a, 0x95, 0x6e, 0xa3, 0x82, 0x4b, 0x58, 0x0f, + 0x9c, 0xf0, 0x26, 0x4b, 0x2f, 0x02, 0x60, 0x85, + 0xdd, 0x2c, 0xb8, 0x87, 0x8b, 0x14, 0x9c, 0x54, + 0x0a, 0x5a, 0x02, 0xbe, 0xe2, 0x71, 0xcc, 0x07, + 0xae, 0x67, 0x00, 0xa8, 0xd4, 0x09, 0x7c, 0xee, + 0x0d, 0x29, 0x17, 0x67, 0x96, 0x68, 0x41, 0xfa, + 0x72, 0x29, 0x98, 0x2b, 0x23, 0xd1, 0xa9, 0x89, + 0x1c, 0xcc, 0xaf, 0x88, 0xdb, 0xb5, 0x1e, 0xb1, + 0xae, 0x17, 0x5f, 0x29, 0x8d, 0x1c, 0x0a, 0x5c, + 0xb9, 0xa7, 0x59, 0x8b, 0x91, 0x41, 0xee, 0x89, + 0xe1, 0x0e, 0x7e, 0x0a, 0xee, 0xbc, 0x35, 0xab, + 0xf1, 0x5a, 0x58, 0x03, 0xa2, 0xcf, 0x33, 0xa3, + 0x74, 0x82, 0xd3, 0xa0, 0x32, 0xfc, 0x3b, 0x9c, + 0xdf, 0xc0, 0x3a, 0x76, 0xe1, 0xea, 0xf0, 0x6d, + 0xc8, 0xe7, 0x97, 0xec, 0x03, 0xc1, 0x72, 0x94, + 0xe5, 0xc4, 0x04, 0x2a, 0x38, 0xb4, 0xef, 0x47, + 0x1d, 0xf9, 0xb8, 0x0a, 0xa9, 0x45, 0xc1, 0x63, + 0xf8, 0x32, 0xdb, 0x5d, 0xb1, 0xa2, 0x80, 0x8c, + 0x23, 0xd3, 0x60, 0xfb, 0xf8, 0x84, 0x57, 0x8b, +}; + +const struct testvec bf_cbc_256_1_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t bf_cbc_256_encblkno8_vec0_ctxt[SECSIZE] = { + 0x90, 0x3d, 0xd2, 0xc0, 0xd3, 0x75, 0xe8, 0x04, + 0x34, 0x66, 0x76, 0x25, 0x70, 0xde, 0x41, 0xf1, + 0x35, 0x63, 0x5c, 0xac, 0x8f, 0x28, 0x17, 0xd3, + 0xae, 0x43, 0xfd, 0x8a, 0xb8, 0xc2, 0xd3, 0x88, + 0xef, 0xfa, 0x21, 0xeb, 0xb4, 0x33, 0x75, 0x69, + 0x7d, 0xe9, 0x27, 0x1c, 0x03, 0xcf, 0x90, 0xcf, + 0xf0, 0xaa, 0x3e, 0x01, 0x41, 0x24, 0xdc, 0x01, + 0x5a, 0xe8, 0x92, 0xea, 0xde, 0x87, 0xbf, 0x75, + 0xe4, 0x0b, 0xf7, 0xa3, 0x42, 0x27, 0xc4, 0xde, + 0x01, 0x6f, 0x5c, 0xec, 0x6d, 0x37, 0x38, 0xd7, + 0x4f, 0x85, 0xc0, 0xc2, 0x3a, 0xa7, 0x2d, 0x15, + 0xd5, 0x1c, 0xee, 0x15, 0x13, 0x7a, 0x4e, 0x33, + 0xc7, 0x59, 0x93, 0x73, 0xe9, 0xf5, 0x39, 0xb0, + 0xad, 0x8b, 0x61, 0xca, 0x4d, 0x31, 0xaa, 0x44, + 0xf6, 0x5c, 0xb7, 0x99, 0xe5, 0x92, 0x3d, 0x47, + 0x79, 0x9b, 0x29, 0x16, 0xe1, 0x2c, 0x30, 0x8b, + 0x1e, 0x17, 0xf0, 0x91, 0x59, 0x00, 0xab, 0x6d, + 0x4d, 0xa7, 0x4d, 0x96, 0xc3, 0xe4, 0x3d, 0x17, + 0x5c, 0x8e, 0xfc, 0x59, 0x48, 0xd4, 0xdd, 0xf4, + 0xea, 0x3a, 0x68, 0xc8, 0xb1, 0x74, 0x69, 0xcb, + 0x49, 0x1a, 0xec, 0x24, 0x4e, 0x7e, 0xe9, 0xba, + 0x75, 0xfb, 0x52, 0x85, 0x75, 0xe9, 0x41, 0x9a, + 0xc6, 0x40, 0x9c, 0x92, 0x3f, 0xe8, 0x99, 0x81, + 0x84, 0x14, 0x2b, 0x62, 0x94, 0xba, 0x56, 0x00, + 0xde, 0x88, 0xe1, 0x35, 0xea, 0x25, 0x88, 0xd1, + 0xce, 0xd4, 0xfc, 0xde, 0xee, 0x1a, 0xfd, 0xb1, + 0xa7, 0x46, 0x9d, 0x0c, 0x99, 0xa6, 0xab, 0x23, + 0x55, 0x2f, 0x46, 0xd7, 0xb3, 0xcd, 0x2c, 0xab, + 0x93, 0x3e, 0xdb, 0xe2, 0x34, 0x69, 0x1a, 0x56, + 0x21, 0x92, 0x56, 0xf4, 0x05, 0xe1, 0x24, 0xee, + 0x4d, 0x5e, 0x89, 0xeb, 0x23, 0x26, 0xdc, 0x14, + 0xde, 0x56, 0x3f, 0x0c, 0x15, 0x3e, 0x42, 0x71, + 0x9b, 0xe8, 0xc5, 0xfd, 0x5e, 0x4a, 0xb6, 0xd9, + 0xa0, 0x18, 0x5d, 0xbd, 0xef, 0x80, 0xb4, 0xf6, + 0x1e, 0x56, 0x2a, 0x57, 0x13, 0xba, 0x24, 0xa4, + 0x6f, 0x4c, 0xd4, 0xaa, 0x31, 0x5e, 0x69, 0x26, + 0xd2, 0xee, 0xef, 0x7f, 0x83, 0x9c, 0x8e, 0x6a, + 0x17, 0xe3, 0xda, 0xf4, 0x59, 0xad, 0x26, 0x83, + 0x53, 0x4c, 0x0d, 0x62, 0xe5, 0x9a, 0x30, 0xc5, + 0x0a, 0xa8, 0xb1, 0x3b, 0x1b, 0x41, 0x5c, 0x74, + 0x42, 0x7b, 0x0c, 0x9e, 0x3c, 0x12, 0x04, 0x46, + 0xc3, 0xc7, 0x10, 0xea, 0xf1, 0x3b, 0xb1, 0x01, + 0xfe, 0x1b, 0xe8, 0xf8, 0x42, 0xbc, 0xe9, 0x11, + 0x9b, 0x63, 0x29, 0x99, 0x18, 0x79, 0x9e, 0xd2, + 0xbf, 0x9d, 0x93, 0x4d, 0x16, 0x0f, 0x14, 0x41, + 0xb6, 0x0c, 0xa5, 0x07, 0x13, 0x29, 0x21, 0x0d, + 0x8f, 0xf9, 0x0a, 0x0a, 0x54, 0xaf, 0xa6, 0x22, + 0x25, 0x79, 0x07, 0xe5, 0x3e, 0x49, 0x6b, 0x12, + 0x9e, 0xfc, 0x91, 0xdb, 0xf3, 0x7c, 0xdf, 0x03, + 0x9c, 0x78, 0xa7, 0xc3, 0x5e, 0x14, 0xde, 0xb5, + 0x6a, 0x7b, 0x3b, 0xe3, 0x4f, 0x8a, 0x49, 0xce, + 0xc9, 0x14, 0x29, 0x96, 0x84, 0xca, 0xe1, 0x49, + 0x41, 0x73, 0xb3, 0x2a, 0xbe, 0x37, 0xb6, 0x2d, + 0xff, 0xf2, 0x8e, 0x3d, 0x02, 0xeb, 0xd4, 0xd3, + 0x15, 0x8f, 0xc0, 0x00, 0x91, 0xd5, 0xe7, 0x76, + 0xf5, 0x6e, 0x81, 0x38, 0x38, 0x07, 0xa6, 0xe8, + 0x72, 0x14, 0x3b, 0x36, 0xef, 0xbc, 0x5b, 0x26, + 0xb0, 0x60, 0x25, 0x49, 0x7e, 0xfc, 0xd8, 0x3b, + 0x63, 0xdc, 0x7f, 0x80, 0xd5, 0x43, 0x78, 0xbb, + 0xf1, 0xf9, 0x3e, 0x75, 0x1d, 0x58, 0xb2, 0xc7, + 0xb6, 0x52, 0xfb, 0xe7, 0x42, 0xef, 0x87, 0xfd, + 0x3a, 0x02, 0x7a, 0xf9, 0xbc, 0xa8, 0x2f, 0xd6, + 0xc1, 0x5f, 0xa4, 0x57, 0x62, 0x83, 0x82, 0x8e, + 0x1e, 0xbb, 0x85, 0xf7, 0x1b, 0x2e, 0xe2, 0xb0, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t bf_cbc_256_encblkno8_vec1_ctxt[SECSIZE] = { + 0x2b, 0xf6, 0xd4, 0x61, 0x3b, 0x1f, 0x5b, 0xe9, + 0x32, 0xab, 0x27, 0xa1, 0xaf, 0x5e, 0xf4, 0xa7, + 0xaa, 0xc5, 0x2a, 0x3c, 0x0d, 0x34, 0xd8, 0xb3, + 0xfd, 0xb2, 0xca, 0xfb, 0x3c, 0x38, 0x96, 0x71, + 0x47, 0xaa, 0xa7, 0x2f, 0x48, 0x2c, 0x39, 0x88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xcb, 0x47, 0x35, + 0x41, 0x16, 0x0c, 0x4e, 0x73, 0x90, 0x52, 0xc5, + 0x65, 0xb8, 0x0c, 0xdc, 0x36, 0x8d, 0xdc, 0xca, + 0x97, 0x0b, 0xbc, 0xcb, 0x79, 0xc7, 0x4c, 0xd2, + 0x21, 0x5c, 0xbd, 0xeb, 0xea, 0xfb, 0x87, 0xe1, + 0xe0, 0x75, 0x39, 0xb9, 0x84, 0x1e, 0xa7, 0xfe, + 0x7d, 0x41, 0x75, 0x15, 0x88, 0x98, 0xd4, 0x80, + 0x42, 0x57, 0xb5, 0x65, 0xbf, 0xb8, 0xbd, 0x19, + 0x28, 0xd8, 0xa7, 0x6c, 0xe7, 0xc1, 0x00, 0xdc, + 0xde, 0xcb, 0x30, 0x3d, 0x29, 0x5e, 0xa6, 0x9c, + 0xbb, 0xb8, 0xec, 0x28, 0x23, 0x36, 0x23, 0x27, + 0xee, 0xdd, 0x24, 0x7d, 0x9a, 0xc9, 0xb5, 0x3c, + 0x7a, 0x3f, 0x1d, 0xd9, 0x32, 0x47, 0xc0, 0x4d, + 0x86, 0x9b, 0x2d, 0xa9, 0x5c, 0x93, 0x90, 0x51, + 0x70, 0xe6, 0x8f, 0x35, 0x96, 0xe0, 0x11, 0x00, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t bf_cbc_256_encblkno8_vec2_ctxt[SECSIZE] = { + 0x28, 0x93, 0x0f, 0x23, 0xfb, 0xa4, 0x9e, 0xe5, + 0x11, 0x38, 0x2b, 0xbd, 0x8d, 0x2d, 0xdb, 0x11, + 0xfa, 0xac, 0x74, 0x28, 0x95, 0x29, 0xf2, 0x92, + 0x8d, 0x00, 0x8a, 0x8a, 0x04, 0x92, 0x92, 0x33, + 0x8c, 0x4b, 0x29, 0x8e, 0xde, 0x59, 0xf4, 0x72, + 0xae, 0x2f, 0xe4, 0xe9, 0xd4, 0xe4, 0xb6, 0x69, + 0xc5, 0x1b, 0xbe, 0x02, 0x85, 0x4b,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xc5, 0xbb, 0x80, + 0x06, 0x30, 0x14, 0xf5, 0x0e, 0x73, 0xd2, 0xdb, + 0x19, 0x45, 0x30, 0xdc, 0xd0, 0x4d, 0xe6, 0xd6, + 0x0e, 0x2d, 0x77, 0xa3, 0xb3, 0x27, 0xda, 0x99, + 0x62, 0x88, 0x35, 0xba, 0x64, 0x15, 0xec, 0xaf, + 0x70, 0x97, 0x94, 0x81, 0x30, 0x6d, 0x63, 0x42, + 0x71, 0x3e, 0x06, 0xec, 0x50, 0x96, 0x87, 0x59, + 0xe7, 0x26, 0x9c, 0xcf, 0xc7, 0xe7, 0x62, 0x82, + 0x3b, 0xd7, 0xfe, 0xb4, 0x48, 0x45, 0x9d, 0x54, + 0x18, 0x15, 0x13, 0x74, 0x92, 0x6f, 0x43, 0xb3, + 0xa9, 0x82, 0xd4, 0xc2, 0xef, 0x61, 0x9d, 0x5e, + 0x1d, 0xc6, 0x80, 0xd3, 0xe9, 0xdd, 0x52, 0x9c, + 0x4d, 0x04, 0x05, 0xa0, 0x43, 0x36, 0xb6, 0x89, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t bf_cbc_256_encblkno8_vec3_ctxt[SECSIZE] = { + 0x60, 0x91, 0x19, 0x89, 0xee, 0xac, 0x12, 0xe5, + 0x60, 0x6c, 0xfd, 0xf9, 0xe4, 0xc6, 0xc9, 0xbd, + 0x75, 0xe1, 0xa5, 0xe6, 0xf4, 0xed, 0x4b, 0xf4, + 0x16, 0xf4, 0x57, 0xa4, 0xe6, 0x60, 0x8e, 0x1b, + 0x97, 0x0e, 0xd5, 0x09, 0xa1, 0x3c, 0x6c, 0xe8, + 0x91, 0xaf, 0x19, 0x96, 0x2a, 0x7b, 0x77, 0x30, + 0xc7, 0x99, 0xe6, 0xaa, 0xb0, 0xe2, 0x29, 0x1c, + 0x39, 0x54, 0x1c, 0x0a, 0x4a, 0x51, 0xa2, 0xa2, + 0x22, 0x96, 0x05, 0x8b, 0x12, 0x80, 0x16, 0x28, + 0xdc, 0xfa, 0x22, 0x90, 0xa4, 0x33, 0xb1, 0x84, + 0x13, 0x52, 0x5d, 0xb5, 0xd4, 0xe8, 0x60, 0x18, + 0x6a, 0xb8, 0x1b, 0xdb, 0xb4, 0x69, 0xf6, 0x09, + 0x95, 0x71, 0xdd, 0x43, 0x21, 0xad, 0x7e, 0xf7, + 0x8e, 0x7a, 0x0d, 0xf0, 0x52, 0x54, 0xb8, 0xdc, + 0x7d, 0x72, 0x29, 0x97, 0x2b, 0x9c, 0x2c, 0xef, + 0xc3, 0x26, 0x68, 0x72, 0xae, 0x29, 0x0f, 0x67, + 0xbf, 0xea, 0x92, 0x27, 0xd1, 0xba, 0x8d, 0x32, + 0x8b, 0x26, 0x91, 0x30, 0x88, 0xcc, 0x47, 0xaf, + 0x54, 0x8c, 0x88, 0x88, 0x2f, 0x59, 0x76, 0x34, + 0x43, 0x35, 0x44, 0xc3, 0x16, 0x28, 0x62, 0x4b, + 0xbb, 0x47, 0x99, 0x7c, 0x26, 0x51, 0xe2, 0x7d, + 0xd8, 0x2c, 0x35, 0xf4, 0x24, 0xf1, 0x5b, 0x01, + 0xcc, 0x9a, 0x54, 0xd8, 0xc1, 0x73, 0x85, 0x83, + 0xdd, 0x0d, 0xd5, 0x75, 0xac, 0x67, 0x68, 0x59, + 0x3e, 0x6e, 0x9a, 0x4a, 0x7f, 0xbd, 0x85, 0xeb, + 0x36, 0x3e, 0xfd, 0x03, 0xfe, 0x2b, 0xe6, 0x97, + 0x16, 0x6b, 0xd0, 0x22, 0xb1, 0x00, 0xcc, 0x7c, + 0x03, 0xb1, 0x7c, 0x23, 0x7a, 0xca, 0x5e, 0x0b, + 0xba, 0x37, 0xa6, 0x08, 0x5b, 0xa6, 0x2b, 0x57, + 0x58, 0x0b, 0x5a, 0x58, 0x91, 0x3c, 0xf9, 0x46, + 0x05, 0x03, 0x0a, 0x9b, 0xca, 0x2d, 0x71, 0xe2, + 0xbb, 0x1e, 0xd3, 0xc5, 0xc2,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 0x6f, 0x5d, 0x3a, 0xe0, 0xe7, 0xfa, 0x2d, 0x47, + 0x4a, 0xec, 0xaa, 0x71, 0xb5, 0xeb, 0x62, 0xb8, + 0x31, 0x34, 0x07, 0x44, 0xa2, 0x18, 0xec, 0x76, + 0xf7, 0x77, 0x56, 0x86, 0xc7, 0xe0, 0x1e, 0x8e, + 0xec, 0x16, 0x2b, 0xeb, 0xff, 0xaa, 0xba, 0x83, + 0x1f, 0xdc, 0x32, 0x23, 0x27, 0xea, 0xea, 0x0c, + 0x3a, 0x5f, 0x2b, 0xb4, 0xee, 0x0c, 0xf2, 0x73, + 0xbb, 0x59, 0x9b, 0x73, 0xf7, 0xfa, 0xe1, 0x1f, + 0x3b, 0xdb, 0x40, 0x29, 0xf0, 0x6c, 0xbe, 0x8f, + 0x2e, 0xd0, 0x83, 0xf7, 0xe8, 0x2a, 0x81, 0x82, +}; + +const struct testvec bf_cbc_256_8_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_256_encblkno8_vec3_ctxt, + }, +}; + +/* + * IV method encblkno1, blkno 0. + */ +static const uint8_t bf_cbc_448_encblkno1_vec0_ctxt[SECSIZE] = { + 0xb0, 0x1b, 0x43, 0xc9, 0x84, 0x53, 0x51, 0x72, + 0x1f, 0x93, 0x62, 0x94, 0x13, 0x1f, 0xe3, 0xc1, + 0x30, 0xee, 0xc4, 0x35, 0x98, 0xb8, 0x11, 0x9b, + 0xd1, 0x23, 0xfa, 0x2d, 0xc1, 0xe6, 0xf3, 0x8f, + 0x8b, 0x05, 0x8d, 0xc5, 0x1d, 0xc3, 0x29, 0x1a, + 0xff, 0x08, 0xb0, 0x97, 0x88, 0x50, 0x8f, 0x41, + 0x66, 0xc6, 0x70, 0x37, 0xca, 0xb2, 0xcd, 0x91, + 0x89, 0x41, 0x1b, 0x42, 0xce, 0x02, 0xec, 0xe8, + 0x9b, 0xf3, 0x50, 0x95, 0x5f, 0xba, 0xda, 0xd5, + 0x0c, 0x2f, 0x29, 0x2a, 0x14, 0x96, 0x4a, 0x60, + 0x04, 0x43, 0x62, 0x80, 0x89, 0xcf, 0xfd, 0xb6, + 0xc7, 0x2d, 0xb2, 0xac, 0xce, 0x51, 0xf5, 0xd1, + 0xcd, 0x41, 0x59, 0x8b, 0xf5, 0x02, 0x2d, 0xe8, + 0xc4, 0xee, 0xe9, 0x40, 0x6f, 0xcd, 0xbe, 0x3b, + 0xd0, 0x8d, 0x3e, 0x6c, 0x42, 0x2a, 0x17, 0xfd, + 0x78, 0xf6, 0xb2, 0xde, 0x69, 0x81, 0xbb, 0xae, + 0xd9, 0x1f, 0x49, 0xa6, 0x4c, 0x5a, 0xe9, 0x94, + 0x49, 0x9b, 0x7e, 0x32, 0x6d, 0x11, 0xea, 0x88, + 0xda, 0xf0, 0xc7, 0x8d, 0x07, 0x98, 0xab, 0xc7, + 0xf3, 0xcf, 0x2e, 0xda, 0x27, 0x44, 0x68, 0xc7, + 0xdc, 0xda, 0x00, 0xd0, 0x6d, 0x64, 0x5b, 0x39, + 0x46, 0x3d, 0x98, 0x24, 0xee, 0x3b, 0x36, 0x23, + 0x62, 0xf6, 0x8e, 0xb9, 0x8d, 0xc1, 0x9a, 0x7b, + 0xd7, 0x03, 0x6b, 0xb7, 0x81, 0x19, 0xec, 0x2f, + 0x0c, 0x0b, 0x32, 0x5a, 0xb3, 0x25, 0xf5, 0xcc, + 0xa3, 0x60, 0xe6, 0x4e, 0x03, 0xcd, 0xdc, 0x67, + 0xe5, 0x26, 0xda, 0xe0, 0x1f, 0x33, 0x99, 0xc3, + 0x43, 0x8c, 0x9c, 0x1a, 0x85, 0xb1, 0x15, 0x04, + 0xc1, 0x06, 0xd1, 0x2d, 0xc9, 0x67, 0x72, 0xe7, + 0xd6, 0x6d, 0x1f, 0x22, 0x56, 0x56, 0xfa, 0x8a, + 0xd7, 0x16, 0x37, 0x3f, 0x3e, 0x67, 0xa5, 0xb7, + 0xee, 0x3e, 0xd2, 0x38, 0xd5, 0xce, 0xa9, 0x62, + 0x82, 0x17, 0xae, 0xae, 0x62, 0xe6, 0xb7, 0xf2, + 0x73, 0xf1, 0xc1, 0xb7, 0xe9, 0x62, 0x79, 0x3b, + 0x3b, 0x3f, 0xaa, 0x0d, 0x42, 0x03, 0x35, 0x3f, + 0x5d, 0xa4, 0xba, 0x02, 0x23, 0x65, 0x40, 0x0e, + 0x61, 0x31, 0xc9, 0xd5, 0x79, 0x36, 0x76, 0x7c, + 0x21, 0x4a, 0x75, 0xb2, 0xa0, 0x2b, 0xc1, 0xb8, + 0xba, 0xf8, 0x10, 0x7a, 0x85, 0x32, 0x81, 0xbf, + 0x2d, 0x58, 0x3c, 0x22, 0x2f, 0x0b, 0xce, 0x03, + 0x12, 0xce, 0x13, 0xce, 0x4a, 0x81, 0x77, 0x1d, + 0x68, 0x99, 0xc0, 0x25, 0xeb, 0xd9, 0x80, 0x0d, + 0xe7, 0x17, 0xc8, 0x41, 0xbd, 0x4b, 0x9c, 0xdd, + 0x41, 0x74, 0x90, 0x2a, 0x65, 0x92, 0x05, 0xff, + 0x06, 0x24, 0xeb, 0x89, 0xd8, 0x41, 0xaa, 0x41, + 0xac, 0x8a, 0x31, 0xc6, 0x82, 0x44, 0x12, 0x5a, + 0xd9, 0x1c, 0xca, 0x76, 0x2b, 0x4e, 0xe8, 0x18, + 0x7e, 0x50, 0xf5, 0x8c, 0x7c, 0x11, 0xe7, 0x0e, + 0xfd, 0x08, 0x5e, 0x64, 0x8b, 0x5b, 0x9f, 0x94, + 0x8b, 0x0d, 0x83, 0x7e, 0xef, 0x89, 0x30, 0x4a, + 0x55, 0xce, 0x10, 0x5f, 0x15, 0xd2, 0xe7, 0x07, + 0x0c, 0x34, 0x92, 0xda, 0xae, 0x84, 0x26, 0x28, + 0x36, 0x1a, 0x96, 0xc6, 0xf1, 0x41, 0x2b, 0xb6, + 0x01, 0xfe, 0x20, 0x05, 0x43, 0x80, 0x45, 0xdf, + 0x5c, 0xc2, 0x96, 0xc8, 0x41, 0x68, 0x87, 0x78, + 0xbc, 0xf8, 0x34, 0xfb, 0x19, 0x61, 0xab, 0x7f, + 0x15, 0x56, 0x7f, 0x1a, 0xf5, 0x08, 0xf1, 0x1c, + 0x59, 0x70, 0x92, 0x3a, 0xda, 0x1a, 0xfd, 0xfc, + 0x4d, 0xe1, 0x12, 0x61, 0xc1, 0xd8, 0xdb, 0x63, + 0x6e, 0x6b, 0x19, 0x96, 0x68, 0x17, 0x9b, 0xf5, + 0xa9, 0x5d, 0x2c, 0xaf, 0xad, 0xc6, 0x26, 0x9e, + 0x09, 0xcb, 0x67, 0x4e, 0x50, 0x7d, 0x2f, 0xae, + 0x4e, 0x73, 0xd9, 0x5a, 0xaa, 0x5d, 0x54, 0x20, + 0x7b, 0x77, 0xcf, 0xf8, 0xad, 0x88, 0x6b, 0xc8, +}; + +/* + * IV method encblkno1, blkno 1. + */ +static const uint8_t bf_cbc_448_encblkno1_vec1_ctxt[SECSIZE] = { + 0x8b, 0x2a, 0xcf, 0x7d, 0x38, 0x1b, 0xaa, 0x33, + 0x1c, 0xe6, 0xa1, 0x37, 0x6e, 0x9e, 0xb3, 0x48, + 0x2a, 0xb8, 0x61, 0x11, 0x00, 0xe5, 0x48, 0xea, + 0xb5, 0x9f, 0x6c, 0xa4, 0xdf, 0x8d, 0x5a, 0xd8, + 0x03, 0x55, 0x4d, 0x07, 0x7d, 0x5f, 0x1b, 0x18, + 0xd1, 0x86, 0x52, 0xc1, 0x13, 0xda, 0x99, 0x23, + 0xeb, 0xab, 0xb2, 0x93, 0x40, 0x7c, 0x6a, 0x8a, + 0xaa, 0xf8, 0xf1, 0x66, 0xf1, 0x10, 0x1d, 0xcd, + 0x25, 0xc7, 0x84, 0x55, 0x02, 0x1d, 0xc0, 0x3c, + 0xba, 0xf4, 0xbf, 0xe2, 0xe4, 0xc3, 0x57, 0xdc, + 0x0d, 0xfd, 0xeb, 0xb3, 0x7d, 0x31, 0x82, 0x6b, + 0x5c, 0x0e, 0x92, 0xa5, 0x42, 0x8b, 0x7f, 0x36, + 0x74, 0x4d, 0xfd, 0x2f, 0xd7, 0x19, 0x0d, 0x23, + 0xa7, 0x36, 0xe8, 0xe4, 0xe5, 0xff, 0xc8, 0x0d, + 0xe1, 0x48, 0x25, 0x79, 0xa9, 0x22, 0xac, 0x72, + 0x86, 0x28, 0xcb, 0x63, 0xa6, 0xa0, 0x46, 0x08, + 0x53, 0xb8, 0x59, 0xab, 0x0f, 0x8f, 0xb1, 0x78, + 0xf8, 0x4e, 0x6d, 0x1a, 0xb5, 0xdd, 0x12, 0x02, + 0x57, 0x55, 0xf8, 0xab, 0x78, 0x7d, 0x75, 0x61, + 0x81, 0x20, 0xd6, 0x4b, 0x7d, 0x76, 0x05, 0xc9, + 0x56, 0xf2, 0xe9, 0x3f, 0xb6, 0xb5, 0x02, 0x2b, + 0x1c, 0x29, 0xbf, 0x07, 0xe9, 0x5f, 0x9b, 0x18, + 0x38, 0x26, 0xa0, 0x09, 0xde, 0x24, 0x5b, 0x37, + 0x72, 0x74, 0xf4, 0x9f, 0x86, 0x28, 0x89, 0xb6, + 0x0c, 0x95, 0x24, 0x2f, 0x88, 0x80, 0x6a, 0xc7, + 0x3a, 0xdc, 0x89, 0xb0, 0xa3, 0xfe, 0x6e, 0x38, + 0xec, 0x0b, 0x1d, 0xbc, 0xd5, 0x90, 0x48, 0xfb, + 0xb1, 0x54, 0xac, 0x6e, 0x35, 0xb0, 0x71, 0x9e, + 0x57, 0x07, 0x81, 0x90, 0xcb, 0x63, 0xb2, 0x7f, + 0x4c, 0x81, 0xe1, 0x58, 0xda, 0x27, 0xef, 0x77, + 0xe7, 0xde, 0x96, 0x83, 0x2a, 0xb1, 0x6b, 0x08, + 0x62, 0x89, 0xdc, 0x3a, 0x3f, 0x08, 0xff, 0xdc, + 0x50, 0x3e, 0xc1, 0xe4, 0x33, 0x8b, 0xad, 0x19, + 0x90, 0x0b, 0x8e, 0xc3, 0x55, 0x77, 0xf0, 0xc2, + 0x24, 0xf9, 0x0c, 0x99, 0x84, 0xb2, 0xcc, 0x23, + 0x8c, 0xab, 0x79, 0x0d, 0xff, 0x75, 0x3a, 0xe0, + 0xc9, 0xe8, 0x1e, 0x15, 0x02, 0xd5, 0x67, 0x8e, + 0x32, 0xe3, 0x1f, 0xda, 0xfb, 0x88, 0xeb, 0xa5, + 0x23, 0xea, 0x1d, 0xaa, 0xc3, 0x62, 0x7f, 0x27, + 0x38, 0x2a, 0xf6, 0xa2, 0x6a, 0x0e, 0x05, 0xff, + 0xe4, 0x63, 0x70, 0xec, 0xf8, 0x25, 0x96, 0x08, + 0xcb, 0x22, 0x2a, 0xaa, 0xbc, 0x45, 0x04, 0xb9, + 0xbc, 0x64, 0x07, 0x09, 0x31, 0xee, 0x5f, 0x9a, + 0xb1, 0x71, 0x85, 0x10, 0x60, 0xfb, 0x3c, 0x56, + 0xeb, 0xfe, 0x91, 0xab, 0x3f, 0x09, 0x76, 0xba, + 0x3c, 0xfc, 0xa6, 0x0d, 0xce, 0x9f, 0x59, 0xd4, + 0x83, 0x8d, 0x98, 0xf5, 0x0d, 0x60, 0x1f, 0xd1, + 0x10, 0x61, 0x77, 0x0d, 0xd1, 0xcd, 0xc2, 0xc2, + 0x2c, 0x7d, 0xf6, 0x15, 0x16, 0x90, 0xc9, 0xc5, + 0x1e, 0xe9, 0xf5, 0x7b, 0xb4, 0x49, 0x47, 0x91, + 0x6a, 0x94, 0x26, 0x94, 0xb3, 0xb5, 0xa7, 0x9e, + 0xcb, 0xb1, 0x9c, 0xb7, 0x5d, 0x25, 0x3c, 0x2d, + 0x8c, 0xa8, 0xa1, 0xb1, 0x79, 0x8e, 0x60, 0xa2, + 0x3e, 0x04, 0xfa, 0x3f, 0xb4, 0x43, 0xde, 0x0a, + 0xde, 0xf4, 0x58, 0xe7, 0xd1, 0x04, 0x1d, 0xb7, + 0x1d, 0xa6, 0xcb, 0x49, 0x41, 0x30, 0xb5, 0x41, + 0xb5, 0x14, 0x19, 0xe4, 0xeb, 0x2c, 0xe2, 0xf0, + 0x66, 0x59, 0xe3, 0xc6, 0xb0, 0xd0, 0x1e, 0xaa, + 0x9f, 0xa5, 0x0b, 0xb8, 0xfd, 0xae, 0x62, 0xcf, + 0x3e, 0xe2, 0xea, 0x79, 0xc5, 0x3e, 0xcf, 0xf0, + 0x40, 0x00, 0x8c, 0x81, 0x97, 0xed, 0xac, 0xf9, + 0x61, 0x75, 0x4e, 0xd7, 0xb7, 0xb2, 0x02, 0x14, + 0x04, 0xf6, 0xbf, 0x25, 0xbe, 0x78, 0x2a, 0xea, + 0xd2, 0x61, 0xf2, 0x7e, 0x45, 0x6b, 0x20, 0xca, +}; + +/* + * IV method encblkno1, blkno 2. + */ +static const uint8_t bf_cbc_448_encblkno1_vec2_ctxt[SECSIZE] = { + 0x35, 0x34, 0x49, 0x29, 0x12, 0x3f, 0xc6, 0x2f, + 0xc9, 0x3d, 0xc9, 0x54, 0x46, 0xf3, 0x26, 0xf9, + 0x5e, 0x45, 0xb4, 0xba, 0x6d, 0x0f, 0x98, 0x53, + 0x8b, 0x7a, 0x00, 0x47, 0xb6, 0xbd, 0x70, 0x89, + 0x60, 0x8e, 0x52, 0x0b, 0xe3, 0x0a, 0xd8, 0x0e, + 0x48, 0xf3, 0xcc, 0x66, 0x8d, 0x71, 0xaa, 0x0e, + 0xc2, 0x68, 0x03, 0x05, 0xf9, 0xef, 0x1d, 0x14, + 0x5a, 0x85, 0x88, 0x70, 0x77, 0xcf, 0xe3, 0xdf, + 0x18, 0xe5, 0xfb, 0xea, 0xe1, 0xe8, 0xe0, 0x25, + 0xb2, 0x14, 0x61, 0x5d, 0x2f, 0xce, 0x61, 0xec, + 0x68, 0xc8, 0x06, 0x60, 0x41, 0xc1, 0xe3, 0x0a, + 0x5e, 0x96, 0x15, 0x9b, 0x2c, 0x5b, 0xfd, 0xba, + 0x17, 0x2e, 0x50, 0xb6, 0x68, 0x39, 0x21, 0x56, + 0x31, 0x2e, 0xb5, 0x29, 0xff, 0x4a, 0x12, 0x34, + 0x02, 0x54, 0xb1, 0x7f, 0xd8, 0x35, 0xec, 0x79, + 0x9e, 0xef, 0x62, 0xf3, 0x4b, 0x58, 0x96, 0xf1, + 0x83, 0x26, 0x57, 0x3d, 0x55, 0xb9, 0xb0, 0xa7, + 0x48, 0x65, 0x06, 0xee, 0x14, 0x88, 0xb5, 0x58, + 0xc8, 0x4d, 0x6e, 0xd8, 0x44, 0x76, 0x21, 0x16, + 0xa4, 0xdf, 0x68, 0x4b, 0xff, 0x69, 0x23, 0x66, + 0x18, 0x75, 0xe6, 0x29, 0xea, 0x95, 0x87, 0x1c, + 0xed, 0x2d, 0xbd, 0xbf, 0x22, 0x56, 0x11, 0xd5, + 0x59, 0x90, 0x24, 0xd7, 0xae, 0xda, 0x99, 0x49, + 0xe3, 0x23, 0x03, 0x24, 0x3b, 0x02, 0x49, 0x1d, + 0xa5, 0x57, 0x2f, 0xea, 0xd1, 0x6a, 0x17, 0x53, + 0x0f, 0xb3, 0xa9, 0x64, 0x8a, 0xdb, 0x62, 0x17, + 0xad, 0x5c, 0x7d, 0x56, 0x14, 0x0f, 0xfb, 0x14, + 0xbe, 0x7e, 0xa1, 0xa8, 0x27, 0xf0, 0xf0, 0x3a, + 0xe7, 0xc5, 0x26, 0x98, 0x9d, 0x29, 0xf7, 0xfd, + 0x43, 0x13, 0x34, 0xe2, 0xb8, 0x0b, 0x14, 0xe9, + 0x79, 0x66, 0x7a, 0xf2, 0xed, 0x79, 0x37, 0x16, + 0x75, 0x2b, 0xf2, 0x99, 0xa1, 0xba, 0xf1, 0xc1, + 0x61, 0x8d, 0x78, 0x46, 0x3a, 0x67, 0x58, 0x6a, + 0x55, 0x0d, 0x2e, 0x08, 0x47, 0xfc, 0x94, 0x2f, + 0x65, 0xa1, 0x1a, 0xfe, 0x05, 0xfa, 0x41, 0x00, + 0x6c, 0x42, 0xbc, 0x65, 0x37, 0xd9, 0x25, 0x9c, + 0xf4, 0x83, 0x8a, 0xdb, 0x91, 0x96, 0xc5, 0xa9, + 0x02, 0x44, 0xbc, 0x9a, 0x26, 0x9c, 0xd1, 0xfa, + 0x06, 0x8b, 0xd6, 0x40, 0x8f, 0x0a, 0xd2, 0x5b, + 0xd8, 0x57, 0xd5, 0x61, 0x1b, 0x86, 0xa6, 0x49, + 0x15, 0xe4, 0x06, 0x6c, 0x48, 0x24, 0xb8, 0xe3, + 0x23, 0xed, 0xcf, 0x39, 0x44, 0x4d, 0xf0, 0x4e, + 0x89, 0x44, 0x0d, 0x3a, 0xe6, 0x1b, 0x7c, 0x39, + 0xfd, 0x79, 0x0e, 0x78, 0xc7, 0xf6, 0xa3, 0x91, + 0x18, 0x2a, 0xfb, 0x92, 0x48, 0xcc, 0x8b, 0xbb, + 0x33, 0x07, 0x42, 0xf5, 0xd0, 0x01, 0x8b, 0x12, + 0xd9, 0x5e, 0x9d, 0xe4, 0x13, 0x99, 0x11, 0x18, + 0x86, 0x8a, 0xb7, 0xa6, 0xe2, 0x38, 0x34, 0x12, + 0x67, 0xd6, 0x4b, 0xc0, 0x23, 0x56, 0xba, 0x53, + 0xbe, 0x20, 0xe5, 0xec, 0x16, 0xf9, 0x74, 0x92, + 0x62, 0xfc, 0xb9, 0xe8, 0xa3, 0xbf, 0x3b, 0x06, + 0x76, 0xa5, 0xf5, 0x56, 0x81, 0x72, 0x50, 0xc8, + 0x55, 0x80, 0x7d, 0xe1, 0x46, 0x92, 0xa1, 0xeb, + 0x41, 0xaf, 0xce, 0x52, 0xb1, 0xb3, 0x51, 0xf2, + 0xba, 0x03, 0xb4, 0xcb, 0x16, 0xd2, 0x92, 0x3d, + 0x0c, 0x9b, 0xe9, 0xd9, 0x5d, 0xcf, 0x79, 0x05, + 0xbd, 0xe0, 0x44, 0x39, 0xf0, 0x35, 0x2d, 0x7a, + 0x31, 0x3b, 0x24, 0xb3, 0xb4, 0xa5, 0x08, 0xf5, + 0xac, 0x51, 0xf1, 0x09, 0x52, 0x14, 0xc7, 0xb5, + 0xe0, 0x65, 0x47, 0x30, 0xdd, 0xa4, 0xfd, 0x71, + 0x68, 0xa5, 0x4b, 0x00, 0x72, 0xe2, 0xc4, 0xa9, + 0x5d, 0x21, 0x6d, 0x83, 0x4e, 0x88, 0xaa, 0x76, + 0x07, 0xf0, 0xf7, 0x36, 0xa2, 0x5e, 0xd5, 0x4c, + 0x7f, 0x9b, 0x74, 0x89, 0x0a, 0x18, 0xdc, 0x9a, +}; + +/* + * IV method encblkno1, blkno 3. + */ +static const uint8_t bf_cbc_448_encblkno1_vec3_ctxt[SECSIZE] = { + 0xc3, 0xd3, 0xae, 0x7e, 0x4f, 0xbe, 0x0d, 0x50, + 0xd6, 0x63, 0x2c, 0xa2, 0xfd, 0x07, 0xf1, 0x33, + 0x2a, 0x15, 0x8f, 0xd7, 0x63, 0xb6, 0x5f, 0x04, + 0x69, 0x90, 0xa3, 0x1a, 0xd3, 0xdd, 0xe0, 0x70, + 0xb1, 0xcd, 0xd5, 0xe0, 0x75, 0xd2, 0x31, 0x38, + 0xcc, 0x65, 0xbb, 0xc3, 0x3b, 0xc6, 0xc9, 0x33, + 0x43, 0x9c, 0x32, 0x69, 0x95, 0x10, 0x74, 0x36, + 0x3a, 0x05, 0x9c, 0x26, 0x2f, 0x80, 0x20, 0x92, + 0x74, 0x31, 0xc0, 0xf4, 0xb1, 0x42, 0x58, 0xc8, + 0x3e, 0xaa, 0xd4, 0xba, 0xba, 0x4b, 0x5f, 0x47, + 0x1a, 0x9e, 0x43, 0xaf, 0x25, 0x64, 0x0c, 0x2e, + 0xa3, 0xf5, 0xde, 0x6e, 0x28, 0x5e, 0xb9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0x8f, 0x75, 0x21, 0x53, 0xc7, 0xd7, + 0x3e, 0xc6, 0x6c, 0x98, 0x2c, 0x6d, 0x44, 0x13, + 0x40, 0xea, 0xaa, 0x84, 0xd9, 0x47, 0xfd, 0x65, + 0x2c, 0x3d, 0xb0, 0x76, 0xe7, 0xdd, 0xd7, 0x06, + 0x8a, 0x79, 0xa7, 0x6c, 0x3a, 0x2d, 0x32, 0xf7, + 0xae, 0xe7, 0xd2, 0xb1, 0xf2, 0xe0, 0x3a, 0x10, + 0x19, 0xa1, 0x79, 0x7b, 0x76, 0x0b, 0xeb, 0xf3, + 0x01, 0x6e, 0x9f, 0xa1, 0x5d, 0x16, 0x09, 0xec, + 0x6b, 0x64, 0xe3, 0x96, 0xb8, 0x89, 0x99, 0x8c, + 0x77, 0xcf, 0x3f, 0x37, 0x42, 0x51, 0x82, 0x5a, + 0x63, 0x89, 0x12, 0x12, 0x59, 0x38, 0xe3, 0xcf, + 0xa0, 0xda, 0xbc, 0x69, 0x75, 0x48, 0x7c, 0x3e, + 0x56, 0x75, 0x12, 0x10, 0xc5, 0x96, 0x5b, 0x34, + 0x52, 0x2e, 0xce, 0xba, 0xd2, 0x7f, 0x8f, 0x1c, + 0xbd, 0x35, 0x3b, 0x74, 0x5b, 0x6c, 0xfe, 0xa7, + 0xf1, 0x4a, 0x07, 0x95, 0xff, 0xa8, 0xa0, 0x2a, + 0x85, 0xec, 0xd7, 0x56, 0x3b, 0x28, 0x2e, 0x09, + 0x50, 0x43, 0xbd, 0x49, 0x22, 0xdc, 0x78, 0x0e, + 0x7e, 0x68, 0x78, 0xd5, 0x57, 0xc2, 0xd6, 0x7c, + 0x2f, 0xd0, 0x4a, 0x62, 0x16, 0x38, 0x04, 0x23, + 0x43, 0x21, 0xaa, 0xe1, 0x96, 0x0e, 0xa9, 0x22, + 0xe7, 0x2c, 0xb8, 0x5e, 0x8f, 0xc6, 0x2d, 0xbd, + 0x99, 0x25, 0x33, 0xb8, 0x47, 0x99, 0x8d, 0xf5, + 0x22, 0x08, 0x9b, 0xd5, 0xad, 0x83, 0x67, 0xec, + 0x05, 0x89, 0xda, 0xd6, 0xe4, 0xe2, 0xd5, 0xef, + 0x7f, 0x61, 0x1e, 0x03, 0x81, 0x03, 0xb1, 0x98, + 0x5a, 0x29, 0x69, 0x13, 0xb2, 0xe6, 0xe1, 0x2c, + 0x66, 0x88, 0x39, 0x90, 0xf9, 0xae, 0x5d, 0x71, + 0xfe, 0x07, 0x30, 0x7d, 0xba, 0xa9, 0x37, 0xb5, + 0xff, 0x2c, 0xa9, 0xe6, 0x95, 0x48, 0xb2, 0xc8, +}; + +const struct testvec bf_cbc_448_1_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno1_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno1_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno1_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno1_vec3_ctxt, + }, +}; + +/* + * IV method encblkno8, blkno 0. + */ +static const uint8_t bf_cbc_448_encblkno8_vec0_ctxt[SECSIZE] = { + 0x91, 0xb4, 0x8f, 0x78, 0x34, 0xbe, 0x03, 0xe9, + 0x4b, 0xca, 0xf4, 0xfa, 0x27, 0x99, 0xa0, 0xd0, + 0xa0, 0x85, 0xf9, 0xca, 0xcc, 0x2e, 0x0d, 0x41, + 0x91, 0xdb, 0xf9, 0x71, 0xcd, 0x49, 0xf7, 0x66, + 0x9b, 0x0c, 0x70, 0x49, 0x36, 0x72, 0xf4, 0xc0, + 0x17, 0xdd, 0xd8, 0x6a, 0xd2, 0x17, 0xfe, 0x50, + 0xa3, 0x2b, 0xa8, 0x7c, 0x9c, 0x12, 0x8c, 0x08, + 0x3d, 0xb5, 0x20, 0xc0, 0x83, 0xc1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 0x08, 0xf2, 0x05, + 0xad, 0xe5, 0xe0, 0xd8, 0x2e, 0x09, 0xbe, 0x3a, + 0xf2, 0xdc, 0xeb, 0x14, 0xe6, 0x8c, 0x21, 0x20, + 0xbb, 0x42, 0x6a, 0xba, 0x55, 0x79, 0x54, 0x8b, + 0xa8, 0x43, 0x14, 0x28, 0x66, 0xd2, 0x44, 0x65, + 0x9c, 0xa9, 0xdc, 0x3b, 0x3f, 0xab, 0x36, 0xb4, + 0xbc, 0x9d, 0x22, 0x92, 0x24, 0xa8, 0x29, 0x18, + 0x98, 0x3a, 0xbe, 0xa1, 0xb4, 0xf8, 0x7f, 0xea, + 0x2f, 0x58, 0x69, 0xce, 0xee, 0x99, 0x76, 0x2c, + 0x53, 0x84, 0xf5, 0x9e, 0xa3, 0x98, 0xe6, 0x94, + 0x39, 0xfa, 0xfa, 0x6d, 0x66, 0xe2, 0x39, 0x2b, + 0x4b, 0x84, 0x14, 0x89, 0x18, 0xa2, 0x03, 0xdd, +}; + +/* + * IV method encblkno8, blkno 1. + */ +static const uint8_t bf_cbc_448_encblkno8_vec1_ctxt[SECSIZE] = { + 0x90, 0x3d, 0xee, 0x58, 0xf7, 0xe3, 0xc4, 0x18, + 0xaf, 0xfa, 0xaf, 0xed, 0x9a, 0x45, 0xe7, 0xa8, + 0xbe, 0xcd, 0x0f, 0xb9, 0x53, 0x18, 0xc6, 0x14, + 0xbe, 0xbb, 0x90, 0x1c, 0x5c, 0x60, 0x93, 0xcb, + 0x62, 0xb3, 0xdb, 0x31, 0x19, 0x39, 0xce, 0x3f, + 0xe4, 0x8f, 0x44, 0xc1, 0x10, 0x80, 0x05, 0x6b, + 0x77, 0xe3, 0xe1, 0xe5, 0xd2, 0x6d, 0x93, 0xf2, + 0xb3, 0x81, 0x03, 0xf8, 0xbc, 0x7b, 0x5a, 0x71, + 0x15, 0x16, 0x3a, 0x2f, 0x03, 0xbb, 0x67, 0x6a, + 0xd9, 0xf5, 0x63, 0x6f, 0x3d, 0x75, 0x1b, 0x0a, + 0x4b, 0x9d, 0x04, 0x11, 0x7e, 0xe8, 0x3e, 0x2d, + 0x04, 0x8f, 0xbf, 0x8a, 0xb2, 0x35, 0x76, 0xc5, + 0xcc, 0x6d, 0x9e, 0x99, 0x71, 0x13, 0xf6, 0x5e, + 0xeb, 0x74, 0x96, 0x8a, 0x29, 0x38, 0x0b, 0x25, + 0x4b, 0x89, 0xa9, 0x43, 0x3c, 0x2f, 0x03, 0x14, + 0x8d, 0x0f, 0xe3, 0xe7, 0x01, 0xd1, 0x2e, 0x14, + 0x08, 0x51, 0xba, 0x06, 0x39, 0x76, 0x35, 0xbc, + 0x14, 0xa6, 0x16, 0x36, 0x47, 0xcc, 0x48, 0xe0, + 0xd6, 0xd7, 0x07, 0xb0, 0xf0, 0x30, 0x6c, 0xf8, + 0x68, 0x9d, 0x6c, 0x4b, 0x69, 0x33, 0x78, 0x0e, + 0x4a, 0xfa, 0x97, 0xfb, 0x0c, 0x0d, 0x0a, 0xc3, + 0x4b, 0x7b, 0x77, 0x77, 0x18, 0x9a, 0x74, 0x85, + 0x2f, 0xae, 0xc7, 0x90, 0x45, 0x4b, 0xa2, 0x06, + 0x3e, 0xa2, 0x48, 0xe7, 0x6c, 0x86, 0x65, 0x78, + 0x97, 0x0b, 0x97, 0xc1, 0x70, 0x91, 0x12, 0x79, + 0xae, 0xf0, 0x2b, 0x44, 0xe9, 0x84, 0x8d, 0x78, + 0x53, 0xf8, 0x3a, 0xf5, 0x9f, 0x27, 0x3d, 0x49, + 0x69, 0xd1, 0x18, 0xa4, 0xb2, 0xd0, 0xbb, 0xf2, + 0x57, 0x76, 0xb7, 0x77, 0x16, 0x2f, 0xf8, 0x0c, + 0xa5, 0x86, 0x43, 0x0d, 0x2d, 0xfe, 0x84, 0xc6, + 0xbb, 0x58, 0x81, 0x47, 0x3d, 0xa3, 0x93, 0xb0, + 0x50, 0xfc, 0x25, 0xf7, 0xc5, 0x05, 0xe5, 0xf2, + 0xb3, 0x79, 0x12, 0xe4, 0x37, 0x71, 0x2d, 0xe8, + 0xa5, 0x0b, 0xce, 0x67, 0x51, 0x4f, 0xab, 0xc7, + 0x7b, 0x3b, 0xac, 0x78, 0x97, 0x82, 0x02, 0xf4, + 0x62, 0x20, 0x1b, 0x8b, 0xac, 0x07, 0x3b, 0xd7, + 0x0b, 0x99, 0x27, 0x85, 0x52, 0x7a, 0x79, 0x18, + 0xfb, 0x81, 0x3a, 0x05, 0x76, 0x6c, 0x3c, 0x6a, + 0x35, 0xe1, 0x2b, 0x03, 0x48, 0x70, 0x1a, 0xa8, + 0x30, 0x33, 0x61, 0xe2, 0xd8, 0x99, 0x86, 0x7f, + 0xfd, 0xe0, 0x4a, 0xe4, 0x62, 0xa1, 0xac, 0xcb, + 0xb8, 0x8a, 0xf3, 0xaa, 0xd6, 0x61, 0x9d, 0xc5, + 0xdb, 0xf5, 0x53, 0x39, 0x1d, 0xd7, 0xf8, 0x96, + 0xc6, 0x2b, 0xca, 0xbf, 0x83, 0x4e, 0x89, 0x63, + 0x53, 0x6f, 0x17, 0xaa, 0xf3, 0x61, 0x9b, 0x75, + 0x8c, 0x5a, 0xf8, 0x21, 0x84, 0x52, 0xb8, 0x76, + 0xbc, 0xf5, 0x9b, 0xd6, 0x98, 0x26, 0x58, 0xec, + 0xdd, 0xa8, 0xf1, 0xee, 0x9e, 0x14, 0x24, 0x94, + 0x7c, 0xb6, 0x45, 0x8b, 0xc7, 0x85, 0x50, 0x4e, + 0x30, 0xd7, 0x51, 0x8c, 0x33, 0xeb, 0xeb, 0x5d, + 0x52, 0x58, 0x43, 0xcb, 0x25, 0x4a, 0x77, 0x34, + 0xe6, 0x70, 0x5b, 0x6f, 0x8f, 0xe8, 0x07, 0xee, + 0x76, 0x4a, 0xad, 0xab, 0x11, 0x8a, 0x1b, 0x92, + 0x60, 0x79, 0xb8, 0xe0, 0x88, 0xa7, 0x3a, 0xe0, + 0x15, 0xf6, 0x57, 0xf0, 0xe8, 0x87, 0xda, 0xf8, + 0x90, 0x4e, 0xe7, 0xb3, 0xb4, 0xe7, 0x73, 0x5c, + 0xd3, 0x69, 0xfb, 0x23, 0x4f, 0x4f, 0xc8, 0xd2, + 0xfb, 0xf5, 0xf5, 0x76, 0x80, 0xb6, 0xb7, 0xe2, + 0xb7, 0x96, 0x1a, 0x97, 0x12, 0x40, 0x16, 0x86, + 0xd6, 0x66, 0xf5, 0x46, 0x9e, 0x04, 0x62, 0xaa, + 0x9c, 0xc9, 0x45, 0x39, 0x5c, 0xd3, 0x58, 0x40, + 0xb4, 0x32, 0xd8, 0x6c, 0x19, 0xfa, 0xa5, 0x5f, + 0x1e, 0x83, 0x5a, 0x32, 0x5e, 0x1d, 0xab, 0xa9, + 0x48, 0x1b, 0x1b, 0x37, 0x66, 0xf8, 0x67, 0xd7, +}; + +/* + * IV method encblkno8, blkno 2. + */ +static const uint8_t bf_cbc_448_encblkno8_vec2_ctxt[SECSIZE] = { + 0xb3, 0x2d, 0x0d, 0x90, 0x7a, 0x50, 0xb6, 0x29, + 0x9d, 0xd4, 0x12, 0x1a, 0xc9, 0x71, 0x56, 0xc4, + 0xce, 0x3d, 0x74, 0xf9, 0x91, 0xe4, 0x79, 0x8a, + 0x42, 0x34, 0x1a, 0xd4, 0x84, 0xaa, 0x01, 0x85, + 0x13, 0xe8, 0xab, 0xaa, 0xb6, 0x81, 0x82, 0xd6, + 0x32, 0xd6, 0x9f, 0x63, 0x69, 0x55, 0x10, 0x5f, + 0x2e, 0xb3, 0x51, 0x74, 0x80, 0x5c, 0xe9, 0x8d, + 0x27, 0xd8, 0x41, 0x2d, 0x27, 0x07, 0xb4, 0x13, + 0xcd, 0xc0, 0xb3, 0x96, 0xaa, 0x59, 0x9c, 0x3e, + 0x16, 0x9e, 0x18, 0xa5, 0x92, 0x52, 0x59, 0x19, + 0x19, 0x62, 0xeb, 0xd9, 0xdf, 0x9d, 0x10, 0x77, + 0xfb, 0x3c, 0xf1, 0xeb, 0x70, 0xf6, 0x6a, 0x9b, + 0xad, 0x99, 0x35, 0xd7, 0xf8, 0xde, 0x2b, 0x52, + 0x85, 0xdd, 0x36, 0x07, 0x3a, 0x88, 0xa6, 0xbb, + 0x98, 0x7a, 0xe3, 0xb0, 0xe6, 0xae, 0x33, 0x5d, + 0x47, 0x0c, 0x6c, 0xd4, 0x84, 0x33, 0x7e, 0xf4, + 0xea, 0xfd, 0xf1, 0x1c, 0xdb, 0x8b, 0xfe, 0x01, + 0x77, 0xa3, 0x07, 0x21, 0x09, 0xac, 0x0c, 0xe4, + 0x63, 0xaa, 0x3d, 0xb3, 0x05, 0xf8, 0x73, 0x03, + 0x69, 0x53, 0x2f, 0xd3, 0x53, 0x29, 0xf2, 0x02, + 0x60, 0x41, 0xed, 0xc7, 0xe9, 0x2e, 0xba, 0x54, + 0xa4, 0xfe, 0x26, 0xf0, 0xd9, 0x2c, 0x58, 0x2d, + 0x90, 0x94, 0x19, 0xf9, 0xe5, 0xaa, 0xe2, 0x13, + 0x9a, 0x67, 0x90, 0x44, 0x61, 0x36, 0xd0, 0x3f, + 0xe7, 0xe8, 0x7e, 0x47, 0x2b, 0x84, 0x97, 0xe2, + 0x0b, 0x8a, 0xfa, 0x2f, 0xbc, 0x1a, 0x70, 0xed, + 0xb2, 0x93, 0x36, 0x0e, 0xe6, 0xb1, 0xa2, 0x5a, + 0x04, 0x04, 0x8d, 0x2f, 0x82, 0xdb, 0x49, 0x5e, + 0x1b, 0x90, 0xc1, 0x27, 0x2a, 0x2f, 0x64, 0x5b, + 0xce, 0x35, 0x06, 0x0d, 0xb6, 0x05, 0x50, 0x5a, + 0x90, 0xc8, 0x21, 0xd0, 0xf0, 0xb9, 0xf3, 0x43, + 0x25, 0xd8, 0xb9, 0x86, 0xb7, 0xd0, 0x29, 0x75, + 0xdc, 0xf6, 0xf6, 0x14, 0x5e, 0x1f, 0xad, 0x54, + 0x28, 0x63, 0x92, 0xcd, 0xcd, 0x75, 0xb2, 0xe8, + 0xf3, 0x1f, 0xfd, 0x88, 0x72, 0x04, 0xab, 0xe2, + 0x77, 0x21, 0xc1, 0xb4, 0x87, 0xa7, 0x98, 0x86, + 0x2d, 0x7f, 0x01, 0x24, 0xed, 0x3a, 0x23, 0x83, + 0xb7, 0xa4, 0xb7, 0x08, 0x4e, 0xee, 0x10, 0x77, + 0x29, 0x22, 0xab, 0xea, 0x4a, 0x68, 0x1f, 0x7f, + 0xd6, 0xe6, 0x90, 0x11, 0xbc, 0x23, 0x2e, 0x47, + 0x78, 0xea, 0x1d, 0x33, 0x7c, 0x02, 0x09, 0x55, + 0x7a, 0xbc, 0xa7, 0x3d, 0x9a, 0xd0, 0x4d, 0x40, + 0x6c, 0xc2, 0x99, 0xc2, 0xe9, 0x0e, 0xcf, 0x06, + 0x82, 0x61, 0x5c, 0x76, 0xca, 0xef, 0x8f, 0xd3, + 0x78, 0x2a, 0xae, 0x39, 0x29, 0x4e, 0xc1, 0x2c, + 0xb1, 0xbc, 0xcd, 0x76, 0x4f, 0x25, 0xf0, 0x5b, + 0x78, 0x3a, 0xa4, 0x39, 0x52, 0x5a, 0xc7, 0xcf, + 0x17, 0x3d, 0xb0, 0x39, 0x63, 0xf9, 0xf9, 0xfb, + 0x6f, 0x35, 0xb7, 0xf1, 0x49, 0x10, 0xd8, 0x12, + 0x8d, 0xa2, 0xdf, 0xc5, 0x26, 0x37, 0xd1, 0xb8, + 0xef, 0xdc, 0x04, 0x1b, 0x0d, 0x60, 0xbf, 0xbc, + 0xc0, 0xff, 0x56, 0x8b, 0xd3, 0x6e, 0x71, 0xfc, + 0x87, 0x00, 0x86, 0x10, 0x78, 0x3b, 0xce, 0x8b, + 0xe8, 0x5f, 0x8c, 0xce, 0x03, 0xa2, 0x89, 0x8c, + 0x16, 0x00, 0x0e, 0xd8, 0x53, 0xaf, 0x7f, 0x77, + 0x78, 0x40, 0x5e, 0x5e, 0xd1, 0x7d, 0xf8, 0x41, + 0xa8, 0x1e, 0xa5, 0xe5, 0xe9, 0xd6, 0x17, 0x2c, + 0x2f, 0x1b, 0xff, 0xef, 0xf5, 0x53, 0x31, 0xf3, + 0x5b, 0xe4, 0x84, 0x7c, 0xe2, 0x45, 0x3c, 0x82, + 0x5b, 0xf6, 0x03, 0x35, 0xdd, 0x03, 0x22, 0xbe, + 0x77, 0x9c, 0x6a, 0x7d, 0xc8, 0x29, 0x41, 0x53, + 0xbb, 0xab, 0x6e, 0xa5, 0x00, 0xaf, 0x3b, 0x1d, + 0x76, 0x12, 0xac, 0x44, 0x5c, 0x7d, 0xd2, 0x3b, + 0x3a, 0x95, 0xb0, 0xa9, 0x4f, 0x27, 0x76, 0x17, +}; + +/* + * IV method encblkno8, blkno 3. + */ +static const uint8_t bf_cbc_448_encblkno8_vec3_ctxt[SECSIZE] = { + 0x8e, 0xc4, 0x56, 0x64, 0x1e, 0x2a, 0x0d, 0x60, + 0x54, 0x5c, 0xcd, 0xe0, 0x6d, 0xa7, 0x4c, 0x30, + 0x7e, 0x85, 0x21, 0xdf, 0xaa, 0xb2, 0x32, 0xde, + 0xc0, 0xc6, 0x56, 0xe0, 0x43, 0xc2, 0x3e, 0x6c, + 0x8c, 0x62, 0x35, 0xaa, 0xf9, 0xba, 0xc9, 0x52, + 0x38, 0x72, 0x06, 0xcc, 0x02, 0xa2, 0xb8, 0x85, + 0xf7, 0xcc, 0xe6, 0x8c, 0x86, 0x8f, 0x9c, 0xd6, + 0x1f, 0xf8, 0x24, 0x9d, 0xca, 0xe8, 0xed, 0x3c, + 0x80, 0x0b, 0xaf, 0x0c, 0x78, 0x4f, 0x5b, 0x2a, + 0x0f, 0xfe, 0xe5, 0xe6, 0x12, 0x8a, 0xff, 0xc7, + 0x6a, 0x97, 0xd9, 0xcb, 0xc8, 0x6a, 0x83, 0x12, + 0xa1, 0x12, 0x84, 0xc8, 0x72, 0x1c, 0xb7, 0x68, + 0x23, 0x24, 0xff, 0x5a, 0x78, 0x99, 0x9d, 0xb8, + 0x03, 0x70, 0x0a, 0x09, 0xa1, 0x3d, 0xfe, 0xe0, + 0xc5, 0x1b, 0xea, 0x58, 0xbc, 0x52, 0x70, 0xa2, + 0x4e, 0xcc, 0x43, 0xfb, 0xb7, 0xc4, 0xbd, 0xb6, + 0xa9, 0x1e, 0xff, 0xf6, 0x69, 0xaa, 0xab, 0xa4, + 0xd7, 0x07, 0x0d, 0xda, 0x41, 0x4b, 0xe3, 0xa5, + 0xef, 0x94, 0x9f, 0xb4, 0xd8, 0xd1, 0x41, 0xd0, + 0x9e, 0xa0, 0x0a, 0x70, 0xdb, 0xb8, 0x5e, 0x27, + 0xc6, 0x08, 0x38, 0x6a, 0x31, 0xe3, 0xa0, 0xd6, + 0x90, 0xad, 0x19, 0x0c, 0x7e, 0x1d, 0x21, 0xc8, + 0x66, 0x30, 0x73, 0x8e, 0x06, 0x97, 0xec, 0xc6, + 0xfe, 0x5c, 0xc6, 0xc0, 0xd1, 0x5c, 0x5f, 0xf8, + 0x01, 0xb3, 0xac, 0x18, 0x66, 0x1e, 0x04, 0xaf, + 0xa7, 0xd3, 0x6d, 0x10, 0x74, 0xa1, 0x9a, 0x36, + 0x10, 0xa0, 0xd6, 0x28, 0x61, 0x93, 0x98, 0x14, + 0x67, 0x6f, 0x7d, 0x52, 0x86, 0x48, 0x17, 0x99, + 0x53, 0xa3, 0xee, 0xe5, 0x93, 0xf6, 0x80, 0xe1, + 0x52, 0xf0, 0x39, 0x48, 0x5c, 0x20, 0x05, 0xd9, + 0xae, 0xa2, 0xe3, 0x25, 0x4e, 0x60, 0x84, 0xf8, + 0xad, 0xd6, 0xf6, 0x95, 0x8e, 0x95, 0xd0, 0x49, + 0x1c, 0x65, 0xd0, 0xc8, 0xa5, 0x26, 0xc0, 0xdf, + 0x32, 0xbe, 0xbc, 0xb7, 0x6d, 0xe5, 0x5e, 0x6d, + 0x38, 0x7d, 0x03, 0xd5, 0x94, 0x7a, 0x14, 0x2b, + 0x02, 0xe0, 0x09, 0x00, 0x50, 0xf1, 0x52, 0x69, + 0x06, 0x33, 0x4b, 0x5b,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x63, + 0xc9, 0x67, 0x7e, 0x51, 0x99, 0x9c, 0xcb, 0x47, + 0xa9, 0xc8, 0x5e, 0x83, 0x87, 0x55, 0x7c, 0x45, + 0x3a, 0xb4, 0xfe, 0x97, 0x24, 0x17, 0x1d, 0x5e, + 0xdf, 0xe0, 0xe8, 0x17, 0xa6, 0x31, 0x99, 0xeb, + 0xb7, 0xb5, 0xd5, 0xd7, 0x7c, 0x2f, 0x22, 0x26, +}; + +const struct testvec bf_cbc_448_8_vectors[] = { + { + .blkno = 0, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno8_vec0_ctxt, + }, + { + .blkno = 1, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno8_vec1_ctxt, + }, + { + .blkno = 2, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno8_vec2_ctxt, + }, + { + .blkno = 3, + .ptxt = bf_cbc_ptxt, + .ctxt = bf_cbc_448_encblkno8_vec3_ctxt, + }, +}; + +static int +open_disk(const char *devpath, const char *imgpath, size_t size) +{ + int fd; + + fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600); + if (fd < 0) + return -1; + + if (ftruncate(fd, size) < 0) + goto fail; + + if (rump_pub_etfs_register_withsize(devpath, + imgpath, RUMP_ETFS_BLK, 0, size) < 0) { + goto fail; + } + + unlink(imgpath); + return fd; +fail: + close(fd); + unlink(imgpath); + return -1; +} + +static int +open_cgd(int devno) +{ + char devpath[32]; + + sprintf(devpath, "/dev/rcgd%d%c", devno, getrawpartition() + 'a'); + + return rump_sys_open(devpath, O_RDWR, 0); +} + +static int +configure_cgd(int fd, const char *dkpath, const char *alg, + const char *ivmethod, const char *key, size_t keylen) +{ + struct cgd_ioctl ci; + + memset(&ci, 0, sizeof(ci)); + ci.ci_disk = dkpath; + ci.ci_alg = alg; + ci.ci_ivmethod = ivmethod; + ci.ci_keylen = 8 * keylen - 8; /* Exclude the NUL terminator. */ + ci.ci_key = key; + ci.ci_blocksize = 64; + + return rump_sys_ioctl(fd, CGDIOCSET, &ci); +} + +static int +unconfigure_cgd(int fd) +{ + struct cgd_ioctl ci; + + return rump_sys_ioctl(fd, CGDIOCCLR, &ci); +} + +static int +write_testvec(int cgdfd, const struct testvec *tv) +{ + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + return -1; + + if (rump_sys_write(cgdfd, tv->ptxt, SECSIZE) != SECSIZE) + return -1; + + return 0; +} + +static int +read_testvec(int cgdfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (rump_sys_lseek(cgdfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (rump_sys_read(cgdfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ptxt, SECSIZE); +fail: + free(buf); + return res; +} + +static int +check_testvec(int dkfd, const struct testvec *tv) +{ + char *buf; + int res = -1; + + buf = malloc(SECSIZE); + if (buf == NULL) + return -1; + + if (lseek(dkfd, tv->blkno * SECSIZE, SEEK_SET) < 0) + goto fail; + + if (read(dkfd, buf, SECSIZE) != SECSIZE) + goto fail; + + res = memcmp(buf, tv->ctxt, SECSIZE); +fail: + free(buf); + return res; +} + +ATF_TC(cgd_bf_cbc_128_encblkno1); +ATF_TC_HEAD(cgd_bf_cbc_128_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 128 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_bf_cbc_128_encblkno1, tc) +{ + const char imgpath[] = "blowfish-cbc-128-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_128_key, sizeof(bf_cbc_128_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_1_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_1_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_1_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_128_key, sizeof(bf_cbc_128_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_bf_cbc_128_encblkno8); +ATF_TC_HEAD(cgd_bf_cbc_128_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 128 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_bf_cbc_128_encblkno8, tc) +{ + const char imgpath[] = "blowfish-cbc-128-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_128_key, sizeof(bf_cbc_128_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_8_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_8_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_8_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_128_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_128_key, sizeof(bf_cbc_128_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_128_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_128_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_bf_cbc_256_encblkno1); +ATF_TC_HEAD(cgd_bf_cbc_256_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 256 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_bf_cbc_256_encblkno1, tc) +{ + const char imgpath[] = "blowfish-cbc-256-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_256_key, sizeof(bf_cbc_256_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_1_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_1_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_1_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_256_key, sizeof(bf_cbc_256_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_bf_cbc_256_encblkno8); +ATF_TC_HEAD(cgd_bf_cbc_256_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 256 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_bf_cbc_256_encblkno8, tc) +{ + const char imgpath[] = "blowfish-cbc-256-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_256_key, sizeof(bf_cbc_256_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_8_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_8_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_8_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_256_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_256_key, sizeof(bf_cbc_256_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_256_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_256_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_bf_cbc_448_encblkno1); +ATF_TC_HEAD(cgd_bf_cbc_448_encblkno1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 448 bits key, ivmethod encblkno1"); +} + +ATF_TC_BODY(cgd_bf_cbc_448_encblkno1, tc) +{ + const char imgpath[] = "blowfish-cbc-448-encblkno1.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_448_key, sizeof(bf_cbc_448_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_1_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_1_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_1_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno1", + bf_cbc_448_key, sizeof(bf_cbc_448_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_1_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_1_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_1_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_1_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_1_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_1_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_1_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_1_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TC(cgd_bf_cbc_448_encblkno8); +ATF_TC_HEAD(cgd_bf_cbc_448_encblkno8, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test blowfish-cbc with 448 bits key, ivmethod encblkno8"); +} + +ATF_TC_BODY(cgd_bf_cbc_448_encblkno8, tc) +{ + const char imgpath[] = "blowfish-cbc-448-encblkno8.img"; + const char *dkpath = "/dev/dk"; + const size_t dksize = 4 * SECSIZE; /* Last blkno is 3. */ + int dkfd, cgdfd; + + rump_init(); + + RL(dkfd = open_disk(dkpath, imgpath, dksize)); + + RL(cgdfd = open_cgd(0)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_448_key, sizeof(bf_cbc_448_key))); + + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_8_vectors[0]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_8_vectors[1]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_8_vectors[2]), 0); + ATF_CHECK_EQ(write_testvec(cgdfd, &bf_cbc_448_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(configure_cgd(cgdfd, dkpath, "blowfish-cbc", "encblkno8", + bf_cbc_448_key, sizeof(bf_cbc_448_key))); + + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_8_vectors[0]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_8_vectors[1]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_8_vectors[2]), 0); + ATF_CHECK_EQ(read_testvec(cgdfd, &bf_cbc_448_8_vectors[3]), 0); + + RL(unconfigure_cgd(cgdfd)); + RL(rump_sys_close(cgdfd)); + + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_8_vectors[0]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_8_vectors[1]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_8_vectors[2]), 0); + ATF_CHECK_EQ(check_testvec(dkfd, &bf_cbc_448_8_vectors[3]), 0); + + RL(close(dkfd)); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, cgd_bf_cbc_128_encblkno1); + ATF_TP_ADD_TC(tp, cgd_bf_cbc_128_encblkno8); + ATF_TP_ADD_TC(tp, cgd_bf_cbc_256_encblkno1); + ATF_TP_ADD_TC(tp, cgd_bf_cbc_256_encblkno8); + ATF_TP_ADD_TC(tp, cgd_bf_cbc_448_encblkno1); + ATF_TP_ADD_TC(tp, cgd_bf_cbc_448_encblkno8); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/fs/ffs/ffs_common.sh b/contrib/netbsd-tests/fs/ffs/ffs_common.sh index eaf7142..ee94a15 100755 --- a/contrib/netbsd-tests/fs/ffs/ffs_common.sh +++ b/contrib/netbsd-tests/fs/ffs/ffs_common.sh @@ -1,4 +1,4 @@ -# $NetBSD: ffs_common.sh,v 1.2 2013/07/29 13:15:24 skrll Exp $ +# $NetBSD: ffs_common.sh,v 1.3 2016/10/08 13:23:53 gson Exp $ create_ffs() { @@ -45,7 +45,7 @@ test_case() eval "${name}_head() { \ atf_set "descr" "${descr}" - atf_set "timeout" "60" + atf_set "timeout" "120" }" eval "${name}_body() { \ RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \ diff --git a/contrib/netbsd-tests/fs/fifofs/t_fifo.c b/contrib/netbsd-tests/fs/fifofs/t_fifo.c index c4a2060..4b37bb8 100644 --- a/contrib/netbsd-tests/fs/fifofs/t_fifo.c +++ b/contrib/netbsd-tests/fs/fifofs/t_fifo.c @@ -1,9 +1,10 @@ /* Test case written by Bharat Joshi */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fifo.c,v 1.1 2011/12/21 00:17:07 christos Exp $"); +__RCSID("$NetBSD: t_fifo.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include <sys/types.h> #include <sys/wait.h> +#include <sys/stat.h> #include <stdio.h> #include <stdlib.h> diff --git a/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh b/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh index 241d46d..4d8fede 100755 --- a/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh +++ b/contrib/netbsd-tests/fs/psshfs/t_psshfs.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.7 2013/03/16 07:54:04 jmmv Exp $ +# $NetBSD: t_psshfs.sh,v 1.8 2016/09/05 08:53:57 christos Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -262,6 +262,26 @@ setattr_cache_cleanup() { stop_ssh } +atf_test_case read_empty_file cleanup +read_empty_file_head() { + atf_set "descr" "Checks whether an empty file can be read" + # This test is supposed to make sure psshfs does not hang + # when reading from an empty file, hence the timeout. + atf_set "timeout" 8 +} +read_empty_file_body() { + require_puffs + start_ssh + atf_check mkdir root mnt + atf_check -x ': > root/empty' + mount_psshfs root mnt + atf_check cat mnt/empty +} +read_empty_file_cleanup() { + umount mnt + stop_ssh +} + # ------------------------------------------------------------------------- # Initialization. # ------------------------------------------------------------------------- @@ -271,4 +291,5 @@ atf_init_test_cases() { atf_add_test_case pwd atf_add_test_case ls #atf_add_test_case setattr_cache + atf_add_test_case read_empty_file } diff --git a/contrib/netbsd-tests/fs/puffs/t_basic.c b/contrib/netbsd-tests/fs/puffs/t_basic.c index ce5e4ea..735108d 100644 --- a/contrib/netbsd-tests/fs/puffs/t_basic.c +++ b/contrib/netbsd-tests/fs/puffs/t_basic.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_basic.c,v 1.12 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_basic.c,v 1.13 2016/12/01 14:49:04 hannken Exp $ */ #include <sys/types.h> #include <sys/mount.h> @@ -286,7 +286,7 @@ ATF_TC_BODY(inactive_reclaim, tc) rump_sys_close(fd); syncbar(FSTEST_MNTNAME); - ATF_REQUIRE_EQ(pargs->pta_vn_toserv_ops[PUFFS_VN_INACTIVE], 1); + ATF_REQUIRE(pargs->pta_vn_toserv_ops[PUFFS_VN_INACTIVE] > 0); ATF_REQUIRE_EQ(pargs->pta_vn_toserv_ops[PUFFS_VN_RECLAIM], 1); FSTEST_EXIT(); @@ -383,7 +383,7 @@ ATF_TC_BODY(unlink_accessible, tc) syncbar(FSTEST_MNTNAME); ATF_REQUIRE_EQ(pargs->pta_vn_toserv_ops[PUFFS_VN_RECLAIM], 1); - ATF_REQUIRE_EQ(pargs->pta_vn_toserv_ops[PUFFS_VN_INACTIVE], ianow+1); + ATF_REQUIRE(pargs->pta_vn_toserv_ops[PUFFS_VN_INACTIVE] > ianow); ATF_REQUIRE_STREQ(buf, MAGICSTR); diff --git a/contrib/netbsd-tests/fs/vfs/t_vnops.c b/contrib/netbsd-tests/fs/vfs/t_vnops.c index 08203dd..978fadb 100644 --- a/contrib/netbsd-tests/fs/vfs/t_vnops.c +++ b/contrib/netbsd-tests/fs/vfs/t_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_vnops.c,v 1.55 2016/01/28 10:10:09 martin Exp $ */ +/* $NetBSD: t_vnops.c,v 1.58 2016/08/29 02:31:46 kre Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -28,6 +28,7 @@ #include <sys/stat.h> #include <sys/statvfs.h> +#include <sys/time.h> #include <assert.h> #include <atf-c.h> @@ -55,10 +56,10 @@ atf_tc_skip("symlinks not supported by file system") static char * -md(char *buf, const char *base, const char *tail) +md(char *buf, size_t buflen, const char *base, const char *tail) { - sprintf(buf, "%s/%s", base, tail); + snprintf(buf, buflen, "%s/%s", base, tail); return buf; } @@ -69,11 +70,11 @@ lookup_simple(const atf_tc_t *tc, const char *mountpath) struct stat sb1, sb2; strcpy(final, mountpath); - sprintf(pb, "%s/../%s", mountpath, basename(final)); + snprintf(pb, sizeof(pb), "%s/../%s", mountpath, basename(final)); if (rump_sys_stat(pb, &sb1) == -1) atf_tc_fail_errno("stat 1"); - sprintf(pb, "%s/./../%s", mountpath, basename(final)); + snprintf(pb, sizeof(pb), "%s/./../%s", mountpath, basename(final)); if (rump_sys_stat(pb, &sb2) == -1) atf_tc_fail_errno("stat 2"); @@ -85,22 +86,38 @@ lookup_complex(const atf_tc_t *tc, const char *mountpath) { char pb[MAXPATHLEN]; struct stat sb1, sb2; + struct timespec atplus1, onesec; USES_DIRS; - if (FSTYPE_UDF(tc)) - atf_tc_expect_fail("PR kern/49033"); - - sprintf(pb, "%s/dir", mountpath); + snprintf(pb, sizeof(pb), "%s/dir", mountpath); if (rump_sys_mkdir(pb, 0777) == -1) atf_tc_fail_errno("mkdir"); if (rump_sys_stat(pb, &sb1) == -1) atf_tc_fail_errno("stat 1"); - sprintf(pb, "%s/./dir/../././dir/.", mountpath); + snprintf(pb, sizeof(pb), "%s/./dir/../././dir/.", mountpath); if (rump_sys_stat(pb, &sb2) == -1) atf_tc_fail_errno("stat 2"); + /* + * The lookup is permitted to modify the access time of + * any directories searched - such a directory is the + * subject of this test. Any difference should cause + * the 2nd lookup atime tp be >= the first, if it is ==, all is + * OK (atime is not required to be modified by the search, or + * both references may happen within the came clock tick), if the + * 2nd lookup atime is > the first, but not "too much" greater, + * just set it back, so the memcmp just below succeeds + * (assuming all else is OK). + */ + onesec.tv_sec = 1; + onesec.tv_nsec = 0; + timespecadd(&sb1.st_atimespec, &onesec, &atplus1); + if (timespeccmp(&sb2.st_atimespec, &sb1.st_atimespec, >) && + timespeccmp(&sb2.st_atimespec, &atplus1, <)) + sb2.st_atimespec = sb1.st_atimespec; + if (memcmp(&sb1, &sb2, sizeof(sb1)) != 0) { printf("what\tsb1\t\tsb2\n"); @@ -133,9 +150,6 @@ lookup_complex(const atf_tc_t *tc, const char *mountpath) atf_tc_fail("stat results differ, see ouput for more details"); } - if (FSTYPE_UDF(tc)) - atf_tc_fail("random failure of PR kern/49033 " - "did not happen this time"); } static void @@ -147,7 +161,7 @@ dir_simple(const atf_tc_t *tc, const char *mountpath) USES_DIRS; /* check we can create directories */ - sprintf(pb, "%s/dir", mountpath); + snprintf(pb, sizeof(pb), "%s/dir", mountpath); if (rump_sys_mkdir(pb, 0777) == -1) atf_tc_fail_errno("mkdir"); if (rump_sys_stat(pb, &sb) == -1) @@ -169,11 +183,11 @@ dir_notempty(const atf_tc_t *tc, const char *mountpath) USES_DIRS; /* check we can create directories */ - sprintf(pb, "%s/dir", mountpath); + snprintf(pb, sizeof(pb), "%s/dir", mountpath); if (rump_sys_mkdir(pb, 0777) == -1) atf_tc_fail_errno("mkdir"); - sprintf(pb2, "%s/dir/file", mountpath); + snprintf(pb2, sizeof(pb2), "%s/dir/file", mountpath); fd = rump_sys_open(pb2, O_RDWR | O_CREAT, 0777); if (fd == -1) atf_tc_fail_errno("create file"); @@ -205,9 +219,9 @@ dir_rmdirdotdot(const atf_tc_t *tc, const char *mp) RL(rump_sys_mkdir("subtest", 0777)); RL(rump_sys_chdir("subtest")); - md(pb, mp, "test/subtest"); + md(pb, sizeof(pb), mp, "test/subtest"); RL(rump_sys_rmdir(pb)); - md(pb, mp, "test"); + md(pb, sizeof(pb), mp, "test"); RL(rump_sys_rmdir(pb)); if (FSTYPE_NFS(tc)) @@ -225,7 +239,7 @@ checkfile(const char *path, struct stat *refp) struct stat sb; static int n = 1; - md(buf, path, "file"); + md(buf, sizeof(buf), path, "file"); if (rump_sys_stat(buf, &sb) == -1) atf_tc_fail_errno("cannot stat file %d (%s)", n, buf); if (memcmp(&sb, refp, sizeof(sb)) != 0) @@ -244,18 +258,18 @@ rename_dir(const atf_tc_t *tc, const char *mp) USES_DIRS; - md(pb1, mp, "dir1"); + md(pb1, sizeof(pb1), mp, "dir1"); if (rump_sys_mkdir(pb1, 0777) == -1) atf_tc_fail_errno("mkdir 1"); - md(pb2, mp, "dir2"); + md(pb2, sizeof(pb2), mp, "dir2"); if (rump_sys_mkdir(pb2, 0777) == -1) atf_tc_fail_errno("mkdir 2"); - md(pb2, mp, "dir2/subdir"); + md(pb2, sizeof(pb2), mp, "dir2/subdir"); if (rump_sys_mkdir(pb2, 0777) == -1) atf_tc_fail_errno("mkdir 3"); - md(pb3, mp, "dir1/file"); + md(pb3, sizeof(pb3), mp, "dir1/file"); if (rump_sys_mknod(pb3, S_IFREG | 0777, -1) == -1) atf_tc_fail_errno("create file"); if (rump_sys_stat(pb3, &ref) == -1) @@ -266,13 +280,13 @@ rename_dir(const atf_tc_t *tc, const char *mp) */ /* rename within directory */ - md(pb3, mp, "dir3"); + md(pb3, sizeof(pb3), mp, "dir3"); if (rump_sys_rename(pb1, pb3) == -1) atf_tc_fail_errno("rename 1"); checkfile(pb3, &ref); /* rename directory onto itself (two ways, should fail) */ - md(pb1, mp, "dir3/."); + md(pb1, sizeof(pb1), mp, "dir3/."); if (rump_sys_rename(pb1, pb3) != -1 || errno != EINVAL) atf_tc_fail_errno("rename 2"); if (rump_sys_rename(pb3, pb1) != -1 || errno != EISDIR) @@ -281,13 +295,13 @@ rename_dir(const atf_tc_t *tc, const char *mp) checkfile(pb3, &ref); /* rename father of directory into directory */ - md(pb1, mp, "dir2/dir"); - md(pb2, mp, "dir2"); + md(pb1, sizeof(pb1), mp, "dir2/dir"); + md(pb2, sizeof(pb2), mp, "dir2"); if (rump_sys_rename(pb2, pb1) != -1 || errno != EINVAL) atf_tc_fail_errno("rename 4"); /* same for grandfather */ - md(pb1, mp, "dir2/subdir/dir2"); + md(pb1, sizeof(pb1), mp, "dir2/subdir/dir2"); if (rump_sys_rename(pb2, pb1) != -1 || errno != EINVAL) atf_tc_fail("rename 5"); @@ -298,29 +312,29 @@ rename_dir(const atf_tc_t *tc, const char *mp) atf_tc_fail("rename 6"); /* cross-directory rename */ - md(pb1, mp, "dir3"); - md(pb2, mp, "dir2/somedir"); + md(pb1, sizeof(pb1), mp, "dir3"); + md(pb2, sizeof(pb2), mp, "dir2/somedir"); if (rump_sys_rename(pb1, pb2) == -1) atf_tc_fail_errno("rename 7"); checkfile(pb2, &ref); /* move to parent directory */ - md(pb1, mp, "dir2/somedir/../../dir3"); + md(pb1, sizeof(pb1), mp, "dir2/somedir/../../dir3"); if (rump_sys_rename(pb2, pb1) == -1) atf_tc_fail_errno("rename 8"); - md(pb1, mp, "dir2/../dir3"); + md(pb1, sizeof(pb1), mp, "dir2/../dir3"); checkfile(pb1, &ref); /* atomic cross-directory rename */ - md(pb3, mp, "dir2/subdir"); + md(pb3, sizeof(pb3), mp, "dir2/subdir"); if (rump_sys_rename(pb1, pb3) == -1) atf_tc_fail_errno("rename 9"); checkfile(pb3, &ref); /* rename directory over an empty directory */ - md(pb1, mp, "parent"); - md(pb2, mp, "parent/dir1"); - md(pb3, mp, "parent/dir2"); + md(pb1, sizeof(pb1), mp, "parent"); + md(pb2, sizeof(pb2), mp, "parent/dir1"); + md(pb3, sizeof(pb3), mp, "parent/dir2"); RL(rump_sys_mkdir(pb1, 0777)); RL(rump_sys_mkdir(pb2, 0777)); RL(rump_sys_mkdir(pb3, 0777)); @@ -467,15 +481,15 @@ create_many(const atf_tc_t *tc, const char *mp) for (i = 0; i < nfiles; i++) { int fd; - sprintf(buf, TESTFN "%d", i); + snprintf(buf, sizeof(buf), TESTFN "%d", i); RL(fd = rump_sys_open(buf, O_RDWR|O_CREAT|O_EXCL, 0666)); RL(rump_sys_close(fd)); } /* wipe them out */ for (i = 0; i < nfiles; i++) { - sprintf(buf, TESTFN "%d", i); - RL(rump_sys_unlink(buf)); + snprintf(buf, sizeof(buf), TESTFN "%d", i); + RLF(rump_sys_unlink(buf), "%s", buf); } #undef TESTFN @@ -499,12 +513,12 @@ create_nonalphanum(const atf_tc_t *tc, const char *mp) for (i = 0; i < 256; i++) { int fd; - sprintf(buf, "%c", i); + snprintf(buf, sizeof(buf), "%c", i); fd = rump_sys_open(buf, O_RDWR|O_CREAT|O_EXCL, 0666); if (fd == -1) continue; - RL(rump_sys_close(fd)); - RL(rump_sys_unlink(buf)); + RLF(rump_sys_close(fd), "%d", fd); + RLF(rump_sys_unlink(buf), "%s", buf); } printf("\n"); @@ -632,7 +646,7 @@ symlink_len(const atf_tc_t *tc, const char *mp, size_t len) USES_SYMLINKS; - RL(rump_sys_chdir(mp)); + RLF(rump_sys_chdir(mp), "%s", mp); buf = malloc(len + 1); ATF_REQUIRE(buf); diff --git a/contrib/netbsd-tests/h_macros.h b/contrib/netbsd-tests/h_macros.h index 29b4e99..dd730c9 100644 --- a/contrib/netbsd-tests/h_macros.h +++ b/contrib/netbsd-tests/h_macros.h @@ -1,4 +1,4 @@ -/* $NetBSD: h_macros.h,v 1.12 2016/08/04 11:49:07 jakllsch Exp $ */ +/* $NetBSD: h_macros.h,v 1.13 2016/08/20 15:49:08 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -45,6 +45,8 @@ ATF_CHECK_MSG((x) != (v), "%s: %s", #x, strerror(errno)) #define RL(x) REQUIRE_LIBC(x, -1) +#define RLF(x, fmt, arg) \ + ATF_CHECK_MSG((x) != -1, "%s [" fmt "]: %s", #x, arg, strerror(errno)) #define RZ(x) \ do { \ int RZ_rv = x; \ diff --git a/contrib/netbsd-tests/kernel/msg.h b/contrib/netbsd-tests/kernel/msg.h new file mode 100644 index 0000000..547400e --- /dev/null +++ b/contrib/netbsd-tests/kernel/msg.h @@ -0,0 +1,136 @@ +/* $NetBSD: msg.h,v 1.1 2016/12/05 20:10:10 christos Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +struct msg_fds { + int pfd[2]; + int cfd[2]; +}; + +#define CLOSEFD(fd) do { \ + if (fd != -1) { \ + close(fd); \ + fd = -1; \ + } \ +} while (/*CONSTCOND*/ 0) + +static int +msg_open(struct msg_fds *fds) +{ + if (pipe(fds->pfd) == -1) + return -1; + if (pipe(fds->cfd) == -1) { + close(fds->pfd[0]); + close(fds->pfd[1]); + return -1; + } + return 0; +} + +static void +msg_close(struct msg_fds *fds) +{ + CLOSEFD(fds->pfd[0]); + CLOSEFD(fds->pfd[1]); + CLOSEFD(fds->cfd[0]); + CLOSEFD(fds->cfd[1]); +} + +static int +msg_write_child(const char *info, struct msg_fds *fds, void *msg, size_t len) +{ + ssize_t rv; + CLOSEFD(fds->cfd[1]); + CLOSEFD(fds->pfd[0]); + + printf("Send %s\n", info); + rv = write(fds->pfd[1], msg, len); + if (rv != (ssize_t)len) + return 1; +// printf("Wait %s\n", info); + rv = read(fds->cfd[0], msg, len); + if (rv != (ssize_t)len) + return 1; + return 0; +} + +static int +msg_write_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) +{ + ssize_t rv; + CLOSEFD(fds->pfd[1]); + CLOSEFD(fds->cfd[0]); + + printf("Send %s\n", info); + rv = write(fds->cfd[1], msg, len); + if (rv != (ssize_t)len) + return 1; +// printf("Wait %s\n", info); + rv = read(fds->pfd[0], msg, len); + if (rv != (ssize_t)len) + return 1; + return 0; +} + +static int +msg_read_parent(const char *info, struct msg_fds *fds, void *msg, size_t len) +{ + ssize_t rv; + CLOSEFD(fds->pfd[1]); + CLOSEFD(fds->cfd[0]); + + printf("Wait %s\n", info); + rv = read(fds->pfd[0], msg, len); + if (rv != (ssize_t)len) + return 1; +// printf("Send %s\n", info); + rv = write(fds->cfd[1], msg, len); + if (rv != (ssize_t)len) + return 1; + return 0; +} + +static int +msg_read_child(const char *info, struct msg_fds *fds, void *msg, size_t len) +{ + ssize_t rv; + CLOSEFD(fds->cfd[1]); + CLOSEFD(fds->pfd[0]); + + printf("Wait %s\n", info); + rv = read(fds->cfd[0], msg, len); + if (rv != (ssize_t)len) + return 1; +// printf("Send %s\n", info); + rv = write(fds->pfd[1], msg, len); + if (rv != (ssize_t)len) + return 1; + return 0; +} diff --git a/contrib/netbsd-tests/kernel/t_mqueue.c b/contrib/netbsd-tests/kernel/t_mqueue.c index aa98d91..485269f 100644 --- a/contrib/netbsd-tests/kernel/t_mqueue.c +++ b/contrib/netbsd-tests/kernel/t_mqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mqueue.c,v 1.4 2014/03/02 19:56:48 jmmv Exp $ */ +/* $NetBSD: t_mqueue.c,v 1.5 2017/01/10 22:10:22 christos Exp $ */ /* * Test for POSIX message queue priority handling. @@ -14,6 +14,7 @@ #endif #include <atf-c.h> +#include <sys/stat.h> #include <stdio.h> #include <stdlib.h> diff --git a/contrib/netbsd-tests/kernel/t_ptrace.c b/contrib/netbsd-tests/kernel/t_ptrace.c new file mode 100644 index 0000000..074a953 --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace.c @@ -0,0 +1,208 @@ +/* $NetBSD: t_ptrace.c,v 1.17 2016/11/13 22:59:31 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__RCSID("$NetBSD: t_ptrace.c,v 1.17 2016/11/13 22:59:31 kamil Exp $"); + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/ptrace.h> +#include <sys/stat.h> +#include <sys/sysctl.h> +#include <err.h> +#include <errno.h> +#include <unistd.h> + +#include <atf-c.h> + +#include "../h_macros.h" + +/* + * A child process cannot call atf functions and expect them to magically + * work like in the parent. + * The printf(3) messaging from a child will not work out of the box as well + * without estabilishing a communication protocol with its parent. To not + * overcomplicate the tests - do not log from a child and use err(3)/errx(3) + * wrapped with FORKEE_ASSERT()/FORKEE_ASSERTX() as that is guaranteed to work. + */ +#define FORKEE_ASSERTX(x) \ +do { \ + int ret = (x); \ + if (!ret) \ + errx(EXIT_FAILURE, "%s:%d %s(): Assertion failed for: %s", \ + __FILE__, __LINE__, __func__, #x); \ +} while (0) + +#define FORKEE_ASSERT(x) \ +do { \ + int ret = (x); \ + if (!ret) \ + err(EXIT_FAILURE, "%s:%d %s(): Assertion failed for: %s", \ + __FILE__, __LINE__, __func__, #x); \ +} while (0) + +ATF_TC(attach_pid0); +ATF_TC_HEAD(attach_pid0, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that a debugger cannot attach to PID 0"); +} + +ATF_TC_BODY(attach_pid0, tc) +{ + errno = 0; + ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 0, NULL, 0) == -1); +} + +ATF_TC(attach_pid1); +ATF_TC_HEAD(attach_pid1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that a debugger cannot attach to PID 1 (as non-root)"); + + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} + +ATF_TC_BODY(attach_pid1, tc) +{ + ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 1, NULL, 0) == -1); +} + +ATF_TC(attach_pid1_securelevel); +ATF_TC_HEAD(attach_pid1_securelevel, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that a debugger cannot attach to PID 1 with " + "securelevel >= 1 (as root)"); + + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(attach_pid1_securelevel, tc) +{ + int level; + size_t len = sizeof(level); + + ATF_REQUIRE(sysctlbyname("kern.securelevel", &level, &len, NULL, 0) + != -1); + + if (level < 1) { + atf_tc_skip("Test must be run with securelevel >= 1"); + } + + ATF_REQUIRE_ERRNO(EPERM, ptrace(PT_ATTACH, 1, NULL, 0) == -1); +} + +ATF_TC(attach_self); +ATF_TC_HEAD(attach_self, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that a debugger cannot attach to self (as it's nonsense)"); +} + +ATF_TC_BODY(attach_self, tc) +{ + ATF_REQUIRE_ERRNO(EINVAL, ptrace(PT_ATTACH, getpid(), NULL, 0) == -1); +} + +ATF_TC(attach_chroot); +ATF_TC_HEAD(attach_chroot, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that a debugger cannot trace another process unless the " + "process's root directory is at or below the tracing process's " + "root"); + + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(attach_chroot, tc) +{ + char buf[PATH_MAX]; + pid_t child; + int fds_toparent[2], fds_fromparent[2]; + int rv; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ + + (void)memset(buf, '\0', sizeof(buf)); + ATF_REQUIRE(getcwd(buf, sizeof(buf)) != NULL); + (void)strlcat(buf, "/dir", sizeof(buf)); + + ATF_REQUIRE(mkdir(buf, 0500) == 0); + ATF_REQUIRE(chdir(buf) == 0); + + ATF_REQUIRE(pipe(fds_toparent) == 0); + ATF_REQUIRE(pipe(fds_fromparent) == 0); + child = atf_utils_fork(); + if (child == 0) { + FORKEE_ASSERT(close(fds_toparent[0]) == 0); + FORKEE_ASSERT(close(fds_fromparent[1]) == 0); + + FORKEE_ASSERT(chroot(buf) == 0); + + rv = write(fds_toparent[1], &msg, sizeof(msg)); + FORKEE_ASSERTX(rv == sizeof(msg)); + + ATF_REQUIRE_ERRNO(EPERM, + ptrace(PT_ATTACH, getppid(), NULL, 0) == -1); + + rv = read(fds_fromparent[0], &msg, sizeof(msg)); + FORKEE_ASSERTX(rv == sizeof(msg)); + + _exit(0); + } + ATF_REQUIRE(close(fds_toparent[1]) == 0); + ATF_REQUIRE(close(fds_fromparent[0]) == 0); + + printf("Waiting for chrooting of the child PID %d", child); + rv = read(fds_toparent[0], &msg, sizeof(msg)); + ATF_REQUIRE(rv == sizeof(msg)); + + printf("Child is ready, it will try to PT_ATTACH to parent\n"); + rv = write(fds_fromparent[1], &msg, sizeof(msg)); + ATF_REQUIRE(rv == sizeof(msg)); + + printf("fds_fromparent is no longer needed - close it\n"); + ATF_REQUIRE(close(fds_fromparent[1]) == 0); + + printf("fds_toparent is no longer needed - close it\n"); + ATF_REQUIRE(close(fds_toparent[0]) == 0); +} + +ATF_TP_ADD_TCS(tp) +{ + setvbuf(stdout, NULL, _IONBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); + ATF_TP_ADD_TC(tp, attach_pid0); + ATF_TP_ADD_TC(tp, attach_pid1); + ATF_TP_ADD_TC(tp, attach_pid1_securelevel); + ATF_TP_ADD_TC(tp, attach_self); + ATF_TP_ADD_TC(tp, attach_chroot); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait.c b/contrib/netbsd-tests/kernel/t_ptrace_wait.c new file mode 100644 index 0000000..e502a03 --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_wait.c @@ -0,0 +1,5082 @@ +/* $NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__RCSID("$NetBSD: t_ptrace_wait.c,v 1.53 2017/01/10 05:08:24 kamil Exp $"); + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/ptrace.h> +#include <sys/resource.h> +#include <sys/stat.h> +#include <sys/sysctl.h> +#include <sys/wait.h> +#include <machine/reg.h> +#include <err.h> +#include <errno.h> +#include <signal.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <strings.h> +#include <unistd.h> + +#include <atf-c.h> + +#include "../h_macros.h" + +#include "t_ptrace_wait.h" +#include "msg.h" + +#define PARENT_TO_CHILD(info, fds, msg) \ + ATF_REQUIRE(msg_write_child(info " to child " # fds, &fds, &msg, sizeof(msg)) == 0) + +#define CHILD_FROM_PARENT(info, fds, msg) \ + FORKEE_ASSERT(msg_read_parent(info " from parent " # fds, &fds, &msg, sizeof(msg)) == 0) + +#define CHILD_TO_PARENT(info, fds, msg) \ + FORKEE_ASSERT(msg_write_parent(info " to parent " # fds, &fds, &msg, sizeof(msg)) == 0) + +#define PARENT_FROM_CHILD(info, fds, msg) \ + ATF_REQUIRE(msg_read_child(info " from parent " # fds, &fds, &msg, sizeof(msg)) == 0) + +ATF_TC(traceme1); +ATF_TC_HEAD(traceme1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify SIGSTOP followed by _exit(2) in a child"); +} + +ATF_TC_BODY(traceme1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(traceme2); +ATF_TC_HEAD(traceme2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify SIGSTOP followed by _exit(2) in a child"); +} + +static int traceme2_caught = 0; + +static void +traceme2_sighandler(int sig) +{ + FORKEE_ASSERT_EQ(sig, SIGINT); + + ++traceme2_caught; +} + +ATF_TC_BODY(traceme2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP, sigsent = SIGINT; + pid_t child, wpid; + struct sigaction sa; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + sa.sa_handler = traceme2_sighandler; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + + FORKEE_ASSERT(sigaction(sigsent, &sa, NULL) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(traceme2_caught, 1); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and with " + "signal %s to be sent\n", strsignal(sigsent)); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, sigsent) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the exited child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(traceme3); +ATF_TC_HEAD(traceme3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify SIGSTOP followed by termination by a signal in a child"); +} + +ATF_TC_BODY(traceme3, tc) +{ + const int sigval = SIGSTOP, sigsent = SIGINT /* Without core-dump */; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + /* NOTREACHED */ + FORKEE_ASSERTX(0 && + "Child should be terminated by a signal from its parent"); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and with " + "signal %s to be sent\n", strsignal(sigsent)); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, sigsent) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_signaled(status, sigsent, 0); + + printf("Before calling %s() for the exited child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(traceme4); +ATF_TC_HEAD(traceme4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify SIGSTOP followed by SIGCONT and _exit(2) in a child"); +} + +ATF_TC_BODY(traceme4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP, sigsent = SIGCONT; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before raising %s from child\n", strsignal(sigsent)); + FORKEE_ASSERT(raise(sigsent) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(),child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigsent); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the exited child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(attach1); +ATF_TC_HEAD(attach1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer sees process termination before the parent"); +} + +ATF_TC_BODY(attach1, tc) +{ + struct msg_fds parent_tracee, parent_tracer; + const int exitval_tracee = 5; + const int exitval_tracer = 10; + pid_t tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + // Wait for parent to let us exit + CHILD_FROM_PARENT("exit tracee", parent_tracee, msg); + _exit(exitval_tracee); + } + + printf("Spawn debugger\n"); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + tracer = atf_utils_fork(); + if (tracer == 0) { + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("tracer ready", parent_tracer, msg); + + /* Wait for parent to tell use that tracee should have exited */ + CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + printf("Tracee %d exited with %d\n", tracee, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer); + } + + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("tracer ready", parent_tracer, msg); + + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("exit tracee", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + + printf("Assert that there is no status about tracee %d - " + "Tracer must detect zombie first - calling %s()\n", tracee, + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Tell the tracer child should have exited\n"); + PARENT_TO_CHILD("wait for tracee exit", parent_tracer, msg); + printf("Wait for tracer to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + + printf("Wait from tracer child to complete waiting for tracee\n"); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracer, &status, 0), + tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracer); + msg_close(&parent_tracee); +} +#endif + +#if defined(TWAIT_HAVE_PID) +ATF_TC(attach2); +ATF_TC_HEAD(attach2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that any tracer sees process termination before its " + "parent"); +} + +ATF_TC_BODY(attach2, tc) +{ + struct msg_fds parent_tracer, parent_tracee; + const int exitval_tracee = 5; + const int exitval_tracer1 = 10, exitval_tracer2 = 20; + pid_t tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + /* Wait for message from the parent */ + CHILD_FROM_PARENT("Message 1", parent_tracee, msg); + _exit(exitval_tracee); + } + + printf("Spawn debugger\n"); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + tracer = atf_utils_fork(); + if (tracer == 0) { + /* Fork again and drop parent to reattach to PID 1 */ + tracer = atf_utils_fork(); + if (tracer != 0) + _exit(exitval_tracer1); + + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("Message 1", parent_tracer, msg); + CHILD_FROM_PARENT("Message 2", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer2); + } + printf("Wait for the tracer process (direct child) to exit calling " + "%s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracer, &status, 0), tracer); + + validate_status_exited(status, exitval_tracer1); + + printf("Wait for the non-exited tracee process with %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, NULL, WNOHANG), 0); + + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("Message 1", parent_tracer, msg); + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("Message 1", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + printf("Assert that there is no status about tracee - " + "Tracer must detect zombie first - calling %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Resume the tracer and let it detect exited tracee\n"); + PARENT_TO_CHILD("Message 2", parent_tracer, msg); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracer); + msg_close(&parent_tracee); + +} +#endif + +ATF_TC(attach3); +ATF_TC_HEAD(attach3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer parent can PT_ATTACH to its child"); +} + +ATF_TC_BODY(attach3, tc) +{ + struct msg_fds parent_tracee; + const int exitval_tracee = 5; + pid_t tracee, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + CHILD_FROM_PARENT("Message 1", parent_tracee, msg); + printf("Parent should now attach to tracee\n"); + + CHILD_FROM_PARENT("Message 2", parent_tracee, msg); + /* Wait for message from the parent */ + _exit(exitval_tracee); + } + PARENT_TO_CHILD("Message 1", parent_tracee, msg); + + printf("Before calling PT_ATTACH for tracee %d\n", tracee); + ATF_REQUIRE(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + printf("Wait for the stopped tracee process with %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + validate_status_stopped(status, SIGSTOP); + + printf("Resume tracee with PT_CONTINUE\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + printf("Let the tracee exit now\n"); + PARENT_TO_CHILD("Message 2", parent_tracee, msg); + + printf("Wait for tracee to exit with %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + validate_status_exited(status, exitval_tracee); + + printf("Before calling %s() for tracee\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, + wpid = TWAIT_GENERIC(tracee, &status, 0)); + + msg_close(&parent_tracee); +} + +ATF_TC(attach4); +ATF_TC_HEAD(attach4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer child can PT_ATTACH to its parent"); +} + +ATF_TC_BODY(attach4, tc) +{ + struct msg_fds parent_tracee; + const int exitval_tracer = 5; + pid_t tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Spawn tracer\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + tracer = atf_utils_fork(); + if (tracer == 0) { + + /* Wait for message from the parent */ + CHILD_FROM_PARENT("Message 1", parent_tracee, msg); + + printf("Attach to parent PID %d with PT_ATTACH from child\n", + getppid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, getppid(), NULL, 0) != -1); + + printf("Wait for the stopped parent process with %s()\n", + TWAIT_FNAME); + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(getppid(), &status, 0), getppid()); + + forkee_status_stopped(status, SIGSTOP); + + printf("Resume parent with PT_DETACH\n"); + FORKEE_ASSERT(ptrace(PT_DETACH, getppid(), (void *)1, 0) + != -1); + + /* Tell parent we are ready */ + CHILD_TO_PARENT("Message 1", parent_tracee, msg); + + _exit(exitval_tracer); + } + + printf("Wait for the tracer to become ready\n"); + PARENT_TO_CHILD("Message 1", parent_tracee, msg); + printf("Allow the tracer to exit now\n"); + PARENT_FROM_CHILD("Message 1", parent_tracee, msg); + + printf("Wait for tracer to exit with %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracer, &status, 0), tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Before calling %s() for tracer\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, + wpid = TWAIT_GENERIC(tracer, &status, 0)); + + msg_close(&parent_tracee); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(attach5); +ATF_TC_HEAD(attach5, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer sees its parent when attached to tracer " + "(check getppid(2))"); +} + +ATF_TC_BODY(attach5, tc) +{ + struct msg_fds parent_tracer, parent_tracee; + const int exitval_tracee = 5; + const int exitval_tracer = 10; + pid_t parent, tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + parent = getppid(); + + /* Emit message to the parent */ + CHILD_TO_PARENT("tracee ready", parent_tracee, msg); + CHILD_FROM_PARENT("exit tracee", parent_tracee, msg); + + FORKEE_ASSERT_EQ(parent, getppid()); + + _exit(exitval_tracee); + } + printf("Wait for child to record its parent identifier (pid)\n"); + PARENT_FROM_CHILD("tracee ready", parent_tracee, msg); + + printf("Spawn debugger\n"); + tracer = atf_utils_fork(); + if (tracer == 0) { + /* No IPC to communicate with the child */ + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("tracer ready", parent_tracer, msg); + + /* Wait for parent to tell use that tracee should have exited */ + CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer); + } + + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("tracer ready", parent_tracer, msg); + + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("exit tracee", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + printf("Assert that there is no status about tracee - " + "Tracer must detect zombie first - calling %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Tell the tracer child should have exited\n"); + PARENT_TO_CHILD("wait for tracee exit", parent_tracer, msg); + + printf("Wait from tracer child to complete waiting for tracee\n"); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracer, &status, 0), + tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracer); + msg_close(&parent_tracee); +} +#endif + +#if defined(TWAIT_HAVE_PID) +ATF_TC(attach6); +ATF_TC_HEAD(attach6, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer sees its parent when attached to tracer " + "(check sysctl(7) and struct kinfo_proc2)"); +} + +ATF_TC_BODY(attach6, tc) +{ + struct msg_fds parent_tracee, parent_tracer; + const int exitval_tracee = 5; + const int exitval_tracer = 10; + pid_t parent, tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int name[CTL_MAXNAME]; + struct kinfo_proc2 kp; + size_t len = sizeof(kp); + unsigned int namelen; + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + parent = getppid(); + + /* Emit message to the parent */ + CHILD_TO_PARENT("Message 1", parent_tracee, msg); + CHILD_FROM_PARENT("Message 2", parent_tracee, msg); + + namelen = 0; + name[namelen++] = CTL_KERN; + name[namelen++] = KERN_PROC2; + name[namelen++] = KERN_PROC_PID; + name[namelen++] = getpid(); + name[namelen++] = len; + name[namelen++] = 1; + + FORKEE_ASSERT(sysctl(name, namelen, &kp, &len, NULL, 0) == 0); + FORKEE_ASSERT_EQ(parent, kp.p_ppid); + + _exit(exitval_tracee); + } + + printf("Wait for child to record its parent identifier (pid)\n"); + PARENT_FROM_CHILD("Message 1", parent_tracee, msg); + + printf("Spawn debugger\n"); + tracer = atf_utils_fork(); + if (tracer == 0) { + /* No IPC to communicate with the child */ + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("Message 1", parent_tracer, msg); + + CHILD_FROM_PARENT("Message 2", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer); + } + + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("Message 1", parent_tracer, msg); + + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("Message 1", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + printf("Assert that there is no status about tracee - " + "Tracer must detect zombie first - calling %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Resume the tracer and let it detect exited tracee\n"); + PARENT_TO_CHILD("Message 2", parent_tracer, msg); + + printf("Wait for tracer to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracer, &status, 0), + tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracee); + msg_close(&parent_tracer); +} +#endif + +#if defined(TWAIT_HAVE_PID) +ATF_TC(attach7); +ATF_TC_HEAD(attach7, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Assert that tracer sees its parent when attached to tracer " + "(check /proc/curproc/status 3rd column)"); +} + +ATF_TC_BODY(attach7, tc) +{ + struct msg_fds parent_tracee, parent_tracer; + int rv; + const int exitval_tracee = 5; + const int exitval_tracer = 10; + pid_t parent, tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + FILE *fp; + struct stat st; + const char *fname = "/proc/curproc/status"; + char s_executable[MAXPATHLEN]; + int s_pid, s_ppid; + /* + * Format: + * EXECUTABLE PID PPID ... + */ + + ATF_REQUIRE((rv = stat(fname, &st)) == 0 || (errno == ENOENT)); + if (rv != 0) { + atf_tc_skip("/proc/curproc/status not found"); + } + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + parent = getppid(); + + // Wait for parent to let us exit + CHILD_TO_PARENT("tracee ready", parent_tracee, msg); + CHILD_FROM_PARENT("tracee exit", parent_tracee, msg); + + FORKEE_ASSERT((fp = fopen(fname, "r")) != NULL); + fscanf(fp, "%s %d %d", s_executable, &s_pid, &s_ppid); + FORKEE_ASSERT(fclose(fp) == 0); + FORKEE_ASSERT_EQ(parent, s_ppid); + + _exit(exitval_tracee); + } + + printf("Wait for child to record its parent identifier (pid)\n"); + PARENT_FROM_CHILD("tracee ready", parent_tracee, msg); + + printf("Spawn debugger\n"); + tracer = atf_utils_fork(); + if (tracer == 0) { + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("tracer ready", parent_tracer, msg); + + /* Wait for parent to tell use that tracee should have exited */ + CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer); + } + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("tracer ready", parent_tracer, msg); + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("tracee exit", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + printf("Assert that there is no status about tracee - " + "Tracer must detect zombie first - calling %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Resume the tracer and let it detect exited tracee\n"); + PARENT_TO_CHILD("Message 2", parent_tracer, msg); + + printf("Wait for tracer to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracer, &status, 0), + tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracee); + msg_close(&parent_tracer); +} +#endif + +ATF_TC(eventmask1); +ATF_TC_HEAD(eventmask1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that empty EVENT_MASK is preserved"); +} + +ATF_TC_BODY(eventmask1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_event_t set_event, get_event; + const int len = sizeof(ptrace_event_t); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + set_event.pe_set_event = 0; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1); + ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1); + ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(eventmask2); +ATF_TC_HEAD(eventmask2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that PTRACE_FORK in EVENT_MASK is preserved"); +} + +ATF_TC_BODY(eventmask2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_event_t set_event, get_event; + const int len = sizeof(ptrace_event_t); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + set_event.pe_set_event = PTRACE_FORK; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &set_event, len) != -1); + ATF_REQUIRE(ptrace(PT_GET_EVENT_MASK, child, &get_event, len) != -1); + ATF_REQUIRE(memcmp(&set_event, &get_event, len) == 0); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(fork1); +ATF_TC_HEAD(fork1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that fork(2) is intercepted by ptrace(2) with EVENT_MASK " + "set to PTRACE_FORK"); +} + +ATF_TC_BODY(fork1, tc) +{ + const int exitval = 5; + const int exitval2 = 15; + const int sigval = SIGSTOP; + pid_t child, child2, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_state_t state; + const int slen = sizeof(state); + ptrace_event_t event; + const int elen = sizeof(event); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT((child2 = fork()) != 1); + + if (child2 == 0) + _exit(exitval2); + + FORKEE_REQUIRE_SUCCESS + (wpid = TWAIT_GENERIC(child2, &status, 0), child2); + + forkee_status_exited(status, exitval2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Enable PTRACE_FORK in EVENT_MASK for the child %d\n", child); + event.pe_set_event = PTRACE_FORK; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK); + + child2 = state.pe_other_pid; + printf("Reported PTRACE_FORK event with forkee %d\n", child2); + + printf("Before calling %s() for the forkee %d of the child %d\n", + TWAIT_FNAME, child2, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_stopped(status, SIGTRAP); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child2, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK); + ATF_REQUIRE_EQ(state.pe_other_pid, child); + + printf("Before resuming the forkee process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child2, (void *)1, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the forkee - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_exited(status, exitval2); + + printf("Before calling %s() for the forkee - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, + wpid = TWAIT_GENERIC(child2, &status, 0)); + + printf("Before calling %s() for the child - expected stopped " + "SIGCHLD\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGCHLD); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +ATF_TC(fork2); +ATF_TC_HEAD(fork2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that fork(2) is not intercepted by ptrace(2) with empty " + "EVENT_MASK"); +} + +ATF_TC_BODY(fork2, tc) +{ + const int exitval = 5; + const int exitval2 = 15; + const int sigval = SIGSTOP; + pid_t child, child2, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_event_t event; + const int elen = sizeof(event); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT((child2 = fork()) != 1); + + if (child2 == 0) + _exit(exitval2); + + FORKEE_REQUIRE_SUCCESS + (wpid = TWAIT_GENERIC(child2, &status, 0), child2); + + forkee_status_exited(status, exitval2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Set empty EVENT_MASK for the child %d\n", child); + event.pe_set_event = 0; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected stopped " + "SIGCHLD\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGCHLD); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(vfork1); +ATF_TC_HEAD(vfork1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that vfork(2) is intercepted by ptrace(2) with EVENT_MASK " + "set to PTRACE_VFORK"); +} + +ATF_TC_BODY(vfork1, tc) +{ + const int exitval = 5; + const int exitval2 = 15; + const int sigval = SIGSTOP; + pid_t child, child2, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_state_t state; + const int slen = sizeof(state); + ptrace_event_t event; + const int elen = sizeof(event); + + /* + * ptrace(2) command PT_SET_EVENT_MASK: option PTRACE_VFORK unsupported + */ +#ifndef PTRACE_VFORK +#define PTRACE_VFORK 0 +#endif + atf_tc_expect_fail("PR kern/51630"); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT((child2 = vfork()) != 1); + + if (child2 == 0) + _exit(exitval2); + + FORKEE_REQUIRE_SUCCESS + (wpid = TWAIT_GENERIC(child2, &status, 0), child2); + + forkee_status_exited(status, exitval2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Enable PTRACE_VFORK in EVENT_MASK for the child %d\n", child); + event.pe_set_event = PTRACE_VFORK; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK); + + child2 = state.pe_other_pid; + printf("Reported PTRACE_VFORK event with forkee %d\n", child2); + + printf("Before calling %s() for the forkee %d of the child %d\n", + TWAIT_FNAME, child2, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_stopped(status, SIGTRAP); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child2, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_VFORK); + ATF_REQUIRE_EQ(state.pe_other_pid, child); + + printf("Before resuming the forkee process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child2, (void *)1, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the forkee - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_exited(status, exitval2); + + printf("Before calling %s() for the forkee - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, + wpid = TWAIT_GENERIC(child2, &status, 0)); + + printf("Before calling %s() for the child - expected stopped " + "SIGCHLD\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGCHLD); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +ATF_TC(vfork2); +ATF_TC_HEAD(vfork2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that vfork(2) is not intercepted by ptrace(2) with empty " + "EVENT_MASK"); +} + +ATF_TC_BODY(vfork2, tc) +{ + const int exitval = 5; + const int exitval2 = 15; + const int sigval = SIGSTOP; + pid_t child, child2, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_event_t event; + const int elen = sizeof(event); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT((child2 = vfork()) != 1); + + if (child2 == 0) + _exit(exitval2); + + FORKEE_REQUIRE_SUCCESS + (wpid = TWAIT_GENERIC(child2, &status, 0), child2); + + forkee_status_exited(status, exitval2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Set empty EVENT_MASK for the child %d\n", child); + event.pe_set_event = 0; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected stopped " + "SIGCHLD\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGCHLD); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d1); +ATF_TC_HEAD(io_read_d1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_D and len = sizeof(uint8_t)"); +} + +ATF_TC_BODY(io_read_d1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint8_t lookup_me = 0; + const uint8_t magic = 0xab; + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me = magic; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d2); +ATF_TC_HEAD(io_read_d2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_D and len = sizeof(uint16_t)"); +} + +ATF_TC_BODY(io_read_d2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint16_t lookup_me = 0; + const uint16_t magic = 0x1234; + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me = magic; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx16 " != expected %" PRIx16, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d3); +ATF_TC_HEAD(io_read_d3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_D and len = sizeof(uint32_t)"); +} + +ATF_TC_BODY(io_read_d3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint32_t lookup_me = 0; + const uint32_t magic = 0x1234abcd; + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me = magic; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx32 " != expected %" PRIx32, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d4); +ATF_TC_HEAD(io_read_d4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_D and len = sizeof(uint64_t)"); +} + +ATF_TC_BODY(io_read_d4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint64_t lookup_me = 0; + const uint64_t magic = 0x1234abcd9876dcfa; + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me = magic; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx64 " != expected %" PRIx64, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_write_d1); +ATF_TC_HEAD(io_write_d1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_WRITE_D and len = sizeof(uint8_t)"); +} + +ATF_TC_BODY(io_write_d1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint8_t lookup_me = 0; + const uint8_t magic = 0xab; + struct ptrace_io_desc io = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me, magic); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + lookup_me = magic; + + printf("Write new lookup_me to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_write_d2); +ATF_TC_HEAD(io_write_d2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_WRITE_D and len = sizeof(uint16_t)"); +} + +ATF_TC_BODY(io_write_d2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint16_t lookup_me = 0; + const uint16_t magic = 0xab12; + struct ptrace_io_desc io = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me, magic); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + lookup_me = magic; + + printf("Write new lookup_me to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_write_d3); +ATF_TC_HEAD(io_write_d3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_WRITE_D and len = sizeof(uint32_t)"); +} + +ATF_TC_BODY(io_write_d3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint32_t lookup_me = 0; + const uint32_t magic = 0xab127643; + struct ptrace_io_desc io = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me, magic); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + lookup_me = magic; + + printf("Write new lookup_me to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_write_d4); +ATF_TC_HEAD(io_write_d4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_WRITE_D and len = sizeof(uint64_t)"); +} + +ATF_TC_BODY(io_write_d4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint64_t lookup_me = 0; + const uint64_t magic = 0xab12764376490123; + struct ptrace_io_desc io = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me, magic); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + lookup_me = magic; + + printf("Write new lookup_me to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d1); +ATF_TC_HEAD(read_d1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_D called once"); +} + +ATF_TC_BODY(read_d1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me = 0; + const int magic = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me = magic; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me = ptrace(PT_READ_D, child, &lookup_me, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %#x != expected %#x", lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d2); +ATF_TC_HEAD(read_d2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_D called twice"); +} + +ATF_TC_BODY(read_d2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me1 = magic1; + lookup_me2 = magic2; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_D, child, &lookup_me1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_D, child, &lookup_me2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d3); +ATF_TC_HEAD(read_d3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_D called three times"); +} + +ATF_TC_BODY(read_d3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); + const int magic3 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me1 = magic1; + lookup_me2 = magic2; + lookup_me3 = magic3; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_D, child, &lookup_me1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_D, child, &lookup_me2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Read new lookup_me3 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me3 = ptrace(PT_READ_D, child, &lookup_me3, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, + "got value %#x != expected %#x", lookup_me3, magic3); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d4); +ATF_TC_HEAD(read_d4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_D called four times"); +} + +ATF_TC_BODY(read_d4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + int lookup_me4 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); + const int magic3 = (int)random(); + const int magic4 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me1 = magic1; + lookup_me2 = magic2; + lookup_me3 = magic3; + lookup_me4 = magic4; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_D, child, &lookup_me1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_D, child, &lookup_me2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Read new lookup_me3 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me3 = ptrace(PT_READ_D, child, &lookup_me3, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, + "got value %#x != expected %#x", lookup_me3, magic3); + + printf("Read new lookup_me4 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me4 = ptrace(PT_READ_D, child, &lookup_me4, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me4, magic4, + "got value %#x != expected %#x", lookup_me4, magic4); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(write_d1); +ATF_TC_HEAD(write_d1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_WRITE_D called once"); +} + +ATF_TC_BODY(write_d1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me = 0; + const int magic = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me, magic); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Write new lookup_me to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me, magic) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(write_d2); +ATF_TC_HEAD(write_d2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_WRITE_D called twice"); +} + +ATF_TC_BODY(write_d2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me1, magic1); + FORKEE_ASSERT_EQ(lookup_me2, magic2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Write new lookup_me1 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me1, magic1) != -1); + + printf("Write new lookup_me2 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me2, magic2) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(write_d3); +ATF_TC_HEAD(write_d3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_WRITE_D called three times"); +} + +ATF_TC_BODY(write_d3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); + const int magic3 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me1, magic1); + FORKEE_ASSERT_EQ(lookup_me2, magic2); + FORKEE_ASSERT_EQ(lookup_me3, magic3); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Write new lookup_me1 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me1, magic1) != -1); + + printf("Write new lookup_me2 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me2, magic2) != -1); + + printf("Write new lookup_me3 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me3, magic3) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(write_d4); +ATF_TC_HEAD(write_d4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_WRITE_D called four times"); +} + +ATF_TC_BODY(write_d4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + int lookup_me4 = 0; + const int magic1 = (int)random(); + const int magic2 = (int)random(); + const int magic3 = (int)random(); + const int magic4 = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me1, magic1); + FORKEE_ASSERT_EQ(lookup_me2, magic2); + FORKEE_ASSERT_EQ(lookup_me3, magic3); + FORKEE_ASSERT_EQ(lookup_me4, magic4); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Write new lookup_me1 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me1, magic1) != -1); + + printf("Write new lookup_me2 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me2, magic2) != -1); + + printf("Write new lookup_me3 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me3, magic3) != -1); + + printf("Write new lookup_me4 to tracee (PID=%d) from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_WRITE_D, child, &lookup_me4, magic4) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d_write_d_handshake1); +ATF_TC_HEAD(io_read_d_write_d_handshake1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_D and PIOD_WRITE_D handshake"); +} + +ATF_TC_BODY(io_read_d_write_d_handshake1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint8_t lookup_me_fromtracee = 0; + const uint8_t magic_fromtracee = (uint8_t)random(); + uint8_t lookup_me_totracee = 0; + const uint8_t magic_totracee = (uint8_t)random(); + struct ptrace_io_desc io_fromtracee = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me_fromtracee, + .piod_addr = &lookup_me_fromtracee, + .piod_len = sizeof(lookup_me_fromtracee) + }; + struct ptrace_io_desc io_totracee = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me_totracee, + .piod_addr = &lookup_me_totracee, + .piod_len = sizeof(lookup_me_totracee) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me_fromtracee = magic_fromtracee; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me_totracee, magic_totracee); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me_fromtracee PID=%d by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io_fromtracee, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me_fromtracee, magic_fromtracee, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me_fromtracee, + magic_fromtracee); + + lookup_me_totracee = magic_totracee; + + printf("Write lookup_me_totracee to PID=%d by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io_totracee, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me_totracee, magic_totracee, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me_totracee, + magic_totracee); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_d_write_d_handshake2); +ATF_TC_HEAD(io_read_d_write_d_handshake2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_WRITE_D and PIOD_READ_D handshake"); +} + +ATF_TC_BODY(io_read_d_write_d_handshake2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint8_t lookup_me_fromtracee = 0; + const uint8_t magic_fromtracee = (uint8_t)random(); + uint8_t lookup_me_totracee = 0; + const uint8_t magic_totracee = (uint8_t)random(); + struct ptrace_io_desc io_fromtracee = { + .piod_op = PIOD_READ_D, + .piod_offs = &lookup_me_fromtracee, + .piod_addr = &lookup_me_fromtracee, + .piod_len = sizeof(lookup_me_fromtracee) + }; + struct ptrace_io_desc io_totracee = { + .piod_op = PIOD_WRITE_D, + .piod_offs = &lookup_me_totracee, + .piod_addr = &lookup_me_totracee, + .piod_len = sizeof(lookup_me_totracee) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me_fromtracee = magic_fromtracee; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me_totracee, magic_totracee); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + lookup_me_totracee = magic_totracee; + + printf("Write lookup_me_totracee to PID=%d by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io_totracee, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me_totracee, magic_totracee, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me_totracee, + magic_totracee); + + printf("Read lookup_me_fromtracee PID=%d by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io_fromtracee, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me_fromtracee, magic_fromtracee, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me_fromtracee, + magic_fromtracee); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d_write_d_handshake1); +ATF_TC_HEAD(read_d_write_d_handshake1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_D with PT_WRITE_D handshake"); +} + +ATF_TC_BODY(read_d_write_d_handshake1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me_fromtracee = 0; + const int magic_fromtracee = (int)random(); + int lookup_me_totracee = 0; + const int magic_totracee = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me_fromtracee = magic_fromtracee; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me_totracee, magic_totracee); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me_fromtracee PID=%d by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me_fromtracee = + ptrace(PT_READ_D, child, &lookup_me_fromtracee, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me_fromtracee, magic_fromtracee, + "got value %#x != expected %#x", lookup_me_fromtracee, + magic_fromtracee); + + printf("Write new lookup_me_totracee to PID=%d from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE + (ptrace(PT_WRITE_D, child, &lookup_me_totracee, magic_totracee) + != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_d_write_d_handshake2); +ATF_TC_HEAD(read_d_write_d_handshake2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_WRITE_D with PT_READ_D handshake"); +} + +ATF_TC_BODY(read_d_write_d_handshake2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me_fromtracee = 0; + const int magic_fromtracee = (int)random(); + int lookup_me_totracee = 0; + const int magic_totracee = (int)random(); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + lookup_me_fromtracee = magic_fromtracee; + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(lookup_me_totracee, magic_totracee); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Write new lookup_me_totracee to PID=%d from tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE + (ptrace(PT_WRITE_D, child, &lookup_me_totracee, magic_totracee) + != -1); + + printf("Read new lookup_me_fromtracee PID=%d by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me_fromtracee = + ptrace(PT_READ_D, child, &lookup_me_fromtracee, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me_fromtracee, magic_fromtracee, + "got value %#x != expected %#x", lookup_me_fromtracee, + magic_fromtracee); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +/* These dummy functions are used to be copied with ptrace(2) calls */ +static int __used +dummy_fn1(int a, int b, int c, int d) +{ + + a *= 1; + b += 2; + c -= 3; + d /= 4; + + return a + b * c - d; +} + +static int __used +dummy_fn2(int a, int b, int c, int d) +{ + + a *= 4; + b += 3; + c -= 2; + d /= 1; + + return a + b * c - d; +} + +static int __used +dummy_fn3(int a, int b, int c, int d) +{ + + a *= 10; + b += 20; + c -= 30; + d /= 40; + + return a + b * c - d; +} + +static int __used +dummy_fn4(int a, int b, int c, int d) +{ + + a *= 40; + b += 30; + c -= 20; + d /= 10; + + return a + b * c - d; +} + +ATF_TC(io_read_i1); +ATF_TC_HEAD(io_read_i1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_I and len = sizeof(uint8_t)"); +} + +ATF_TC_BODY(io_read_i1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint8_t lookup_me = 0; + uint8_t magic; + memcpy(&magic, dummy_fn1, sizeof(magic)); + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_I, + .piod_offs = dummy_fn1, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx8 " != expected %" PRIx8, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_i2); +ATF_TC_HEAD(io_read_i2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_I and len = sizeof(uint16_t)"); +} + +ATF_TC_BODY(io_read_i2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint16_t lookup_me = 0; + uint16_t magic; + memcpy(&magic, dummy_fn1, sizeof(magic)); + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_I, + .piod_offs = dummy_fn1, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx16 " != expected %" PRIx16, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_i3); +ATF_TC_HEAD(io_read_i3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_I and len = sizeof(uint32_t)"); +} + +ATF_TC_BODY(io_read_i3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint32_t lookup_me = 0; + uint32_t magic; + memcpy(&magic, dummy_fn1, sizeof(magic)); + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_I, + .piod_offs = dummy_fn1, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx32 " != expected %" PRIx32, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(io_read_i4); +ATF_TC_HEAD(io_read_i4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_IO with PIOD_READ_I and len = sizeof(uint64_t)"); +} + +ATF_TC_BODY(io_read_i4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + uint64_t lookup_me = 0; + uint64_t magic; + memcpy(&magic, dummy_fn1, sizeof(magic)); + struct ptrace_io_desc io = { + .piod_op = PIOD_READ_I, + .piod_offs = dummy_fn1, + .piod_addr = &lookup_me, + .piod_len = sizeof(lookup_me) + }; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + ATF_REQUIRE(ptrace(PT_IO, child, &io, 0) != -1); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %" PRIx64 " != expected %" PRIx64, lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_i1); +ATF_TC_HEAD(read_i1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_I called once"); +} + +ATF_TC_BODY(read_i1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me = 0; + int magic; + memcpy(&magic, dummy_fn1, sizeof(magic)); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me = ptrace(PT_READ_I, child, dummy_fn1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me, magic, + "got value %#x != expected %#x", lookup_me, magic); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_i2); +ATF_TC_HEAD(read_i2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_I called twice"); +} + +ATF_TC_BODY(read_i2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int magic1; + int magic2; + memcpy(&magic1, dummy_fn1, sizeof(magic1)); + memcpy(&magic2, dummy_fn2, sizeof(magic2)); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_I, child, dummy_fn1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_I, child, dummy_fn2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_i3); +ATF_TC_HEAD(read_i3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_I called three times"); +} + +ATF_TC_BODY(read_i3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + int magic1; + int magic2; + int magic3; + memcpy(&magic1, dummy_fn1, sizeof(magic1)); + memcpy(&magic2, dummy_fn2, sizeof(magic2)); + memcpy(&magic3, dummy_fn3, sizeof(magic3)); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_I, child, dummy_fn1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_I, child, dummy_fn2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Read new lookup_me3 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me3 = ptrace(PT_READ_I, child, dummy_fn3, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, + "got value %#x != expected %#x", lookup_me3, magic3); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(read_i4); +ATF_TC_HEAD(read_i4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_READ_I called four times"); +} + +ATF_TC_BODY(read_i4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; + int lookup_me1 = 0; + int lookup_me2 = 0; + int lookup_me3 = 0; + int lookup_me4 = 0; + int magic1; + int magic2; + int magic3; + int magic4; + memcpy(&magic1, dummy_fn1, sizeof(magic1)); + memcpy(&magic2, dummy_fn2, sizeof(magic2)); + memcpy(&magic3, dummy_fn3, sizeof(magic3)); + memcpy(&magic4, dummy_fn4, sizeof(magic4)); +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Read new lookup_me1 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me1 = ptrace(PT_READ_I, child, dummy_fn1, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me1, magic1, + "got value %#x != expected %#x", lookup_me1, magic1); + + printf("Read new lookup_me2 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me2 = ptrace(PT_READ_I, child, dummy_fn2, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me2, magic2, + "got value %#x != expected %#x", lookup_me2, magic2); + + printf("Read new lookup_me3 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me3 = ptrace(PT_READ_I, child, dummy_fn3, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me3, magic3, + "got value %#x != expected %#x", lookup_me3, magic3); + + printf("Read new lookup_me4 from tracee (PID=%d) by tracer (PID=%d)\n", + child, getpid()); + errno = 0; + lookup_me4 = ptrace(PT_READ_I, child, dummy_fn4, 0); + ATF_REQUIRE_EQ(errno, 0); + + ATF_REQUIRE_EQ_MSG(lookup_me4, magic4, + "got value %#x != expected %#x", lookup_me4, magic4); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(HAVE_GPREGS) +ATF_TC(regs1); +ATF_TC_HEAD(regs1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify plain PT_GETREGS call without further steps"); +} + +ATF_TC_BODY(regs1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_GPREGS) +ATF_TC(regs2); +ATF_TC_HEAD(regs2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify plain PT_GETREGS call and retrieve PC"); +} + +ATF_TC_BODY(regs2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Retrieved PC=%" PRIxREGISTER "\n", PTRACE_REG_PC(&r)); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_GPREGS) +ATF_TC(regs3); +ATF_TC_HEAD(regs3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify plain PT_GETREGS call and retrieve SP"); +} + +ATF_TC_BODY(regs3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Retrieved SP=%" PRIxREGISTER "\n", PTRACE_REG_SP(&r)); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_GPREGS) +ATF_TC(regs4); +ATF_TC_HEAD(regs4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify plain PT_GETREGS call and retrieve INTRV"); +} + +ATF_TC_BODY(regs4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Retrieved INTRV=%" PRIxREGISTER "\n", PTRACE_REG_INTRV(&r)); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_GPREGS) +ATF_TC(regs5); +ATF_TC_HEAD(regs5, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_GETREGS and PT_SETREGS calls without changing regs"); +} + +ATF_TC_BODY(regs5, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct reg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Call SETREGS for the child process (without changed regs)\n"); + ATF_REQUIRE(ptrace(PT_GETREGS, child, &r, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_FPREGS) +ATF_TC(fpregs1); +ATF_TC_HEAD(fpregs1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify plain PT_GETFPREGS call without further steps"); +} + +ATF_TC_BODY(fpregs1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct fpreg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETFPREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETFPREGS, child, &r, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(HAVE_FPREGS) +ATF_TC(fpregs2); +ATF_TC_HEAD(fpregs2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_GETFPREGS and PT_SETFPREGS calls without changing " + "regs"); +} + +ATF_TC_BODY(fpregs2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct fpreg r; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Call GETFPREGS for the child process\n"); + ATF_REQUIRE(ptrace(PT_GETFPREGS, child, &r, 0) != -1); + + printf("Call SETFPREGS for the child (without changed regs)\n"); + ATF_REQUIRE(ptrace(PT_SETFPREGS, child, &r, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(PT_STEP) +ATF_TC(step1); +ATF_TC_HEAD(step1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify single PT_STEP call"); +} + +ATF_TC_BODY(step1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int happy; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + happy = check_happy(100); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(happy, check_happy(100)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and " + "without signal to be sent (use PT_STEP)\n"); + ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(PT_STEP) +ATF_TC(step2); +ATF_TC_HEAD(step2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_STEP called twice"); +} + +ATF_TC_BODY(step2, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int happy; + int N = 2; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + happy = check_happy(999); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(happy, check_happy(999)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + while (N --> 0) { + printf("Before resuming the child process where it left off " + "and without signal to be sent (use PT_STEP)\n"); + ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), + child); + + validate_status_stopped(status, SIGTRAP); + } + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(PT_STEP) +ATF_TC(step3); +ATF_TC_HEAD(step3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_STEP called three times"); +} + +ATF_TC_BODY(step3, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int happy; + int N = 3; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + happy = check_happy(999); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(happy, check_happy(999)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + while (N --> 0) { + printf("Before resuming the child process where it left off " + "and without signal to be sent (use PT_STEP)\n"); + ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), + child); + + validate_status_stopped(status, SIGTRAP); + } + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(PT_STEP) +ATF_TC(step4); +ATF_TC_HEAD(step4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify PT_STEP called four times"); +} + +ATF_TC_BODY(step4, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int happy; + int N = 4; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + happy = check_happy(999); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(happy, check_happy(999)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + while (N --> 0) { + printf("Before resuming the child process where it left off " + "and without signal to be sent (use PT_STEP)\n"); + ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), + child); + + validate_status_stopped(status, SIGTRAP); + } + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +ATF_TC(kill1); +ATF_TC_HEAD(kill1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that PT_CONTINUE with SIGKILL terminates child"); +} + +ATF_TC_BODY(kill1, tc) +{ + const int sigval = SIGSTOP, sigsent = SIGKILL; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + /* NOTREACHED */ + FORKEE_ASSERTX(0 && + "Child should be terminated by a signal from its parent"); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, sigsent) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_signaled(status, sigsent, 0); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(kill2); +ATF_TC_HEAD(kill2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that PT_KILL terminates child"); +} + +ATF_TC_BODY(kill2, tc) +{ + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + /* NOTREACHED */ + FORKEE_ASSERTX(0 && + "Child should be terminated by a signal from its parent"); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_KILL, child, (void*)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_signaled(status, SIGKILL, 0); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(lwpinfo1); +ATF_TC_HEAD(lwpinfo1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic LWPINFO call for single thread (PT_TRACE_ME)"); +} + +ATF_TC_BODY(lwpinfo1, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct ptrace_lwpinfo info = {0, 0}; + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_LWPINFO for child\n"); + ATF_REQUIRE(ptrace(PT_LWPINFO, child, &info, sizeof(info)) != -1); + + printf("Assert that there exists a thread\n"); + ATF_REQUIRE(info.pl_lwpid > 0); + + printf("Assert that lwp thread %d received event PL_EVENT_SIGNAL\n", + info.pl_lwpid); + ATF_REQUIRE_EQ_MSG(info.pl_event, PL_EVENT_SIGNAL, + "Received event %d != expected event %d", + info.pl_event, PL_EVENT_SIGNAL); + + printf("Before calling ptrace(2) with PT_LWPINFO for child\n"); + ATF_REQUIRE(ptrace(PT_LWPINFO, child, &info, sizeof(info)) != -1); + + printf("Assert that there are no more lwp threads in child\n"); + ATF_REQUIRE_EQ(info.pl_lwpid, 0); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(lwpinfo2); +ATF_TC_HEAD(lwpinfo2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic LWPINFO call for single thread (PT_ATTACH from " + "tracer)"); +} + +ATF_TC_BODY(lwpinfo2, tc) +{ + struct msg_fds parent_tracee, parent_tracer; + const int exitval_tracee = 5; + const int exitval_tracer = 10; + pid_t tracee, tracer, wpid; + uint8_t msg = 0xde; /* dummy message for IPC based on pipe(2) */ +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct ptrace_lwpinfo info = {0, 0}; + + printf("Spawn tracee\n"); + ATF_REQUIRE(msg_open(&parent_tracee) == 0); + ATF_REQUIRE(msg_open(&parent_tracer) == 0); + tracee = atf_utils_fork(); + if (tracee == 0) { + + /* Wait for message from the parent */ + CHILD_TO_PARENT("tracee ready", parent_tracee, msg); + CHILD_FROM_PARENT("tracee exit", parent_tracee, msg); + + _exit(exitval_tracee); + } + PARENT_FROM_CHILD("tracee ready", parent_tracee, msg); + + printf("Spawn debugger\n"); + tracer = atf_utils_fork(); + if (tracer == 0) { + /* No IPC to communicate with the child */ + printf("Before calling PT_ATTACH from tracee %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1); + + /* Wait for tracee and assert that it was stopped w/ SIGSTOP */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_stopped(status, SIGSTOP); + + printf("Before calling ptrace(2) with PT_LWPINFO for child\n"); + FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &info, sizeof(info)) + != -1); + + printf("Assert that there exists a thread\n"); + FORKEE_ASSERTX(info.pl_lwpid > 0); + + printf("Assert that lwp thread %d received event " + "PL_EVENT_SIGNAL\n", info.pl_lwpid); + FORKEE_ASSERT_EQ(info.pl_event, PL_EVENT_SIGNAL); + + printf("Before calling ptrace(2) with PT_LWPINFO for child\n"); + FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &info, sizeof(info)) + != -1); + + printf("Assert that there are no more lwp threads in child\n"); + FORKEE_ASSERTX(info.pl_lwpid == 0); + + /* Resume tracee with PT_CONTINUE */ + FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1); + + /* Inform parent that tracer has attached to tracee */ + CHILD_TO_PARENT("tracer ready", parent_tracer, msg); + /* Wait for parent */ + CHILD_FROM_PARENT("tracer wait", parent_tracer, msg); + + /* Wait for tracee and assert that it exited */ + FORKEE_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, 0), tracee); + + forkee_status_exited(status, exitval_tracee); + + printf("Before exiting of the tracer process\n"); + _exit(exitval_tracer); + } + + printf("Wait for the tracer to attach to the tracee\n"); + PARENT_FROM_CHILD("tracer ready", parent_tracer, msg); + + printf("Resume the tracee and let it exit\n"); + PARENT_TO_CHILD("tracee exit", parent_tracee, msg); + + printf("Detect that tracee is zombie\n"); + await_zombie(tracee); + + printf("Assert that there is no status about tracee - " + "Tracer must detect zombie first - calling %s()\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS( + wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), 0); + + printf("Resume the tracer and let it detect exited tracee\n"); + PARENT_TO_CHILD("tracer wait", parent_tracer, msg); + + printf("Wait for tracer to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracer, &status, 0), + tracer); + + validate_status_exited(status, exitval_tracer); + + printf("Wait for tracee to finish its job and exit - calling %s()\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG), + tracee); + + validate_status_exited(status, exitval_tracee); + + msg_close(&parent_tracer); + msg_close(&parent_tracee); +} +#endif + +ATF_TC(siginfo1); +ATF_TC_HEAD(siginfo1, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic PT_GET_SIGINFO call for SIGTRAP from tracee"); +} + +ATF_TC_BODY(siginfo1, tc) +{ + const int exitval = 5; + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct ptrace_siginfo info; + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Signal traced to lwpid=%d\n", info.psi_lwpid); + printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(siginfo2); +ATF_TC_HEAD(siginfo2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls without " + "modification of SIGINT from tracee"); +} + +static int siginfo2_caught = 0; + +static void +siginfo2_sighandler(int sig) +{ + FORKEE_ASSERT_EQ(sig, SIGINT); + + ++siginfo2_caught; +} + +ATF_TC_BODY(siginfo2, tc) +{ + const int exitval = 5; + const int sigval = SIGINT; + pid_t child, wpid; + struct sigaction sa; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct ptrace_siginfo info; + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + sa.sa_handler = siginfo2_sighandler; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + + FORKEE_ASSERT(sigaction(sigval, &sa, NULL) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(siginfo2_caught, 1); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Signal traced to lwpid=%d\n", info.psi_lwpid); + printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); + + printf("Before calling ptrace(2) with PT_SET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_SET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, sigval) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(siginfo3); +ATF_TC_HEAD(siginfo3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic PT_GET_SIGINFO and PT_SET_SIGINFO calls with " + "setting signal to new value"); +} + +static int siginfo3_caught = 0; + +static void +siginfo3_sigaction(int sig, siginfo_t *info, void *ctx) +{ + FORKEE_ASSERT_EQ(sig, SIGTRAP); + + FORKEE_ASSERT_EQ(info->si_signo, SIGTRAP); + FORKEE_ASSERT_EQ(info->si_code, TRAP_BRKPT); + + ++siginfo3_caught; +} + +ATF_TC_BODY(siginfo3, tc) +{ + const int exitval = 5; + const int sigval = SIGINT; + const int sigfaked = SIGTRAP; + const int sicodefaked = TRAP_BRKPT; + pid_t child, wpid; + struct sigaction sa; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + struct ptrace_siginfo info; + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + sa.sa_sigaction = siginfo3_sigaction; + sa.sa_flags = SA_SIGINFO; + sigemptyset(&sa.sa_mask); + + FORKEE_ASSERT(sigaction(sigfaked, &sa, NULL) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(siginfo3_caught, 1); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Signal traced to lwpid=%d\n", info.psi_lwpid); + printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); + + printf("Before setting new faked signal to signo=%d si_code=%d\n", + sigfaked, sicodefaked); + info.psi_siginfo.si_signo = sigfaked; + info.psi_siginfo.si_code = sicodefaked; + + printf("Before calling ptrace(2) with PT_SET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_SET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigfaked); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, sicodefaked); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, sigfaked) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +ATF_TC(siginfo4); +ATF_TC_HEAD(siginfo4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Detect SIGTRAP TRAP_EXEC from tracee"); +} + +ATF_TC_BODY(siginfo4, tc) +{ + const int sigval = SIGTRAP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + + struct ptrace_siginfo info; + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before calling execve(2) from child\n"); + execlp("/bin/echo", "/bin/echo", NULL); + + FORKEE_ASSERT(0 && "Not reached"); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Signal traced to lwpid=%d\n", info.psi_lwpid); + printf("Signal properties: si_signo=%#x si_code=%#x si_errno=%#x\n", + info.psi_siginfo.si_signo, info.psi_siginfo.si_code, + info.psi_siginfo.si_errno); + + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_EXEC); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} + +#if defined(TWAIT_HAVE_PID) +ATF_TC(siginfo5); +ATF_TC_HEAD(siginfo5, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify that fork(2) is intercepted by ptrace(2) with EVENT_MASK " + "set to PTRACE_FORK and reports correct signal information"); +} + +ATF_TC_BODY(siginfo5, tc) +{ + const int exitval = 5; + const int exitval2 = 15; + const int sigval = SIGSTOP; + pid_t child, child2, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + ptrace_state_t state; + const int slen = sizeof(state); + ptrace_event_t event; + const int elen = sizeof(event); + struct ptrace_siginfo info; + + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT((child2 = fork()) != 1); + + if (child2 == 0) + _exit(exitval2); + + FORKEE_REQUIRE_SUCCESS + (wpid = TWAIT_GENERIC(child2, &status, 0), child2); + + forkee_status_exited(status, exitval2); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); + + printf("Enable PTRACE_FORK in EVENT_MASK for the child %d\n", child); + event.pe_set_event = PTRACE_FORK; + ATF_REQUIRE(ptrace(PT_SET_EVENT_MASK, child, &event, elen) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child %d\n", TWAIT_FNAME, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_CHLD); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK); + + child2 = state.pe_other_pid; + printf("Reported PTRACE_FORK event with forkee %d\n", child2); + + printf("Before calling %s() for the forkee %d of the child %d\n", + TWAIT_FNAME, child2, child); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_stopped(status, SIGTRAP); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_CHLD); + + ATF_REQUIRE(ptrace(PT_GET_PROCESS_STATE, child2, &state, slen) != -1); + ATF_REQUIRE_EQ(state.pe_report_event, PTRACE_FORK); + ATF_REQUIRE_EQ(state.pe_other_pid, child); + + printf("Before resuming the forkee process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child2, (void *)1, 0) != -1); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the forkee - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child2, &status, 0), + child2); + + validate_status_exited(status, exitval2); + + printf("Before calling %s() for the forkee - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, + wpid = TWAIT_GENERIC(child2, &status, 0)); + + printf("Before calling %s() for the child - expected stopped " + "SIGCHLD\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGCHLD); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGCHLD); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, CLD_EXITED); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child - expected exited\n", + TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child - expected no process\n", + TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +#if defined(PT_STEP) +ATF_TC(siginfo6); +ATF_TC_HEAD(siginfo6, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify single PT_STEP call with signal information check"); +} + +ATF_TC_BODY(siginfo6, tc) +{ + const int exitval = 5; + const int sigval = SIGSTOP; + pid_t child, wpid; +#if defined(TWAIT_HAVE_STATUS) + int status; +#endif + int happy; + struct ptrace_siginfo info; + + memset(&info, 0, sizeof(info)); + + printf("Before forking process PID=%d\n", getpid()); + ATF_REQUIRE((child = fork()) != -1); + if (child == 0) { + printf("Before calling PT_TRACE_ME from child %d\n", getpid()); + FORKEE_ASSERT(ptrace(PT_TRACE_ME, 0, NULL, 0) != -1); + + happy = check_happy(100); + + printf("Before raising %s from child\n", strsignal(sigval)); + FORKEE_ASSERT(raise(sigval) == 0); + + FORKEE_ASSERT_EQ(happy, check_happy(100)); + + printf("Before exiting of the child process\n"); + _exit(exitval); + } + printf("Parent process PID=%d, child's PID=%d\n", getpid(), child); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, sigval); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, sigval); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, SI_LWP); + + printf("Before resuming the child process where it left off and " + "without signal to be sent (use PT_STEP)\n"); + ATF_REQUIRE(ptrace(PT_STEP, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_stopped(status, SIGTRAP); + + printf("Before calling ptrace(2) with PT_GET_SIGINFO for child\n"); + ATF_REQUIRE(ptrace(PT_GET_SIGINFO, child, &info, sizeof(info)) != -1); + + printf("Before checking siginfo_t\n"); + ATF_REQUIRE_EQ(info.psi_siginfo.si_signo, SIGTRAP); + ATF_REQUIRE_EQ(info.psi_siginfo.si_code, TRAP_TRACE); + + printf("Before resuming the child process where it left off and " + "without signal to be sent\n"); + ATF_REQUIRE(ptrace(PT_CONTINUE, child, (void *)1, 0) != -1); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(child, &status, 0), child); + + validate_status_exited(status, exitval); + + printf("Before calling %s() for the child\n", TWAIT_FNAME); + TWAIT_REQUIRE_FAILURE(ECHILD, wpid = TWAIT_GENERIC(child, &status, 0)); +} +#endif + +ATF_TP_ADD_TCS(tp) +{ + setvbuf(stdout, NULL, _IONBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); + ATF_TP_ADD_TC(tp, traceme1); + ATF_TP_ADD_TC(tp, traceme2); + ATF_TP_ADD_TC(tp, traceme3); + ATF_TP_ADD_TC(tp, traceme4); + + ATF_TP_ADD_TC_HAVE_PID(tp, attach1); + ATF_TP_ADD_TC_HAVE_PID(tp, attach2); + ATF_TP_ADD_TC(tp, attach3); + ATF_TP_ADD_TC(tp, attach4); + ATF_TP_ADD_TC_HAVE_PID(tp, attach5); + ATF_TP_ADD_TC_HAVE_PID(tp, attach6); + ATF_TP_ADD_TC_HAVE_PID(tp, attach7); + + ATF_TP_ADD_TC(tp, eventmask1); + ATF_TP_ADD_TC(tp, eventmask2); + + ATF_TP_ADD_TC_HAVE_PID(tp, fork1); + ATF_TP_ADD_TC(tp, fork2); + + ATF_TP_ADD_TC_HAVE_PID(tp, vfork1); + ATF_TP_ADD_TC(tp, vfork2); + + ATF_TP_ADD_TC(tp, io_read_d1); + ATF_TP_ADD_TC(tp, io_read_d2); + ATF_TP_ADD_TC(tp, io_read_d3); + ATF_TP_ADD_TC(tp, io_read_d4); + + ATF_TP_ADD_TC(tp, io_write_d1); + ATF_TP_ADD_TC(tp, io_write_d2); + ATF_TP_ADD_TC(tp, io_write_d3); + ATF_TP_ADD_TC(tp, io_write_d4); + + ATF_TP_ADD_TC(tp, read_d1); + ATF_TP_ADD_TC(tp, read_d2); + ATF_TP_ADD_TC(tp, read_d3); + ATF_TP_ADD_TC(tp, read_d4); + + ATF_TP_ADD_TC(tp, write_d1); + ATF_TP_ADD_TC(tp, write_d2); + ATF_TP_ADD_TC(tp, write_d3); + ATF_TP_ADD_TC(tp, write_d4); + + ATF_TP_ADD_TC(tp, io_read_d_write_d_handshake1); + ATF_TP_ADD_TC(tp, io_read_d_write_d_handshake2); + + ATF_TP_ADD_TC(tp, read_d_write_d_handshake1); + ATF_TP_ADD_TC(tp, read_d_write_d_handshake2); + + ATF_TP_ADD_TC(tp, io_read_i1); + ATF_TP_ADD_TC(tp, io_read_i2); + ATF_TP_ADD_TC(tp, io_read_i3); + ATF_TP_ADD_TC(tp, io_read_i4); + + ATF_TP_ADD_TC(tp, read_i1); + ATF_TP_ADD_TC(tp, read_i2); + ATF_TP_ADD_TC(tp, read_i3); + ATF_TP_ADD_TC(tp, read_i4); + + ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs1); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs2); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs3); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs4); + ATF_TP_ADD_TC_HAVE_GPREGS(tp, regs5); + + ATF_TP_ADD_TC_HAVE_FPREGS(tp, fpregs1); + ATF_TP_ADD_TC_HAVE_FPREGS(tp, fpregs2); + + ATF_TP_ADD_TC_PT_STEP(tp, step1); + ATF_TP_ADD_TC_PT_STEP(tp, step2); + ATF_TP_ADD_TC_PT_STEP(tp, step3); + ATF_TP_ADD_TC_PT_STEP(tp, step4); + + ATF_TP_ADD_TC(tp, kill1); + ATF_TP_ADD_TC(tp, kill2); + + ATF_TP_ADD_TC(tp, lwpinfo1); + ATF_TP_ADD_TC_HAVE_PID(tp, lwpinfo2); + + ATF_TP_ADD_TC(tp, siginfo1); + ATF_TP_ADD_TC(tp, siginfo2); + ATF_TP_ADD_TC(tp, siginfo3); + ATF_TP_ADD_TC(tp, siginfo4); + ATF_TP_ADD_TC_HAVE_PID(tp, siginfo5); + ATF_TP_ADD_TC_PT_STEP(tp, siginfo6); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait.h b/contrib/netbsd-tests/kernel/t_ptrace_wait.h new file mode 100644 index 0000000..9c6921c --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_wait.h @@ -0,0 +1,431 @@ +/* $NetBSD: t_ptrace_wait.h,v 1.7 2017/01/09 22:09:20 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* Detect plain wait(2) use-case */ +#if !defined(TWAIT_WAITPID) && \ + !defined(TWAIT_WAITID) && \ + !defined(TWAIT_WAIT3) && \ + !defined(TWAIT_WAIT4) && \ + !defined(TWAIT_WAIT6) +#define TWAIT_WAIT +#endif + +/* + * There are two classes of wait(2)-like functions: + * - wait4(2)-like accepting pid_t, optional options parameter, struct rusage* + * - wait6(2)-like accepting idtype_t, id_t, struct wrusage, mandatory options + * + * The TWAIT_FNAME value is to be used for convenience in debug messages. + * + * The TWAIT_GENERIC() macro is designed to reuse the same unmodified + * code with as many wait(2)-like functions as possible. + * + * In a common use-case wait4(2) and wait6(2)-like function can work the almost + * the same way, however there are few important differences: + * wait6(2) must specify P_PID for idtype to match wpid from wait4(2). + * To behave like wait4(2), wait6(2) the 'options' to wait must include + * WEXITED|WTRUNCATED. + * + * There are two helper macros (they purpose it to mach more than one + * wait(2)-like function): + * The TWAIT_HAVE_STATUS - specifies whether a function can retrieve + * status (as integer value). + * The TWAIT_HAVE_PID - specifies whether a function can request + * exact process identifier + * The TWAIT_HAVE_RUSAGE - specifies whether a function can request + * the struct rusage value + * + */ + +#if defined(TWAIT_WAIT) +# define TWAIT_FNAME "wait" +# define TWAIT_WAIT4TYPE(a,b,c,d) wait((b)) +# define TWAIT_GENERIC(a,b,c) wait((b)) +# define TWAIT_HAVE_STATUS 1 +#elif defined(TWAIT_WAITPID) +# define TWAIT_FNAME "waitpid" +# define TWAIT_WAIT4TYPE(a,b,c,d) waitpid((a),(b),(c)) +# define TWAIT_GENERIC(a,b,c) waitpid((a),(b),(c)) +# define TWAIT_HAVE_PID 1 +# define TWAIT_HAVE_STATUS 1 +#elif defined(TWAIT_WAITID) +# define TWAIT_FNAME "waitid" +# define TWAIT_GENERIC(a,b,c) \ + waitid(P_PID,(a),NULL,(c)|WEXITED|WTRAPPED) +# define TWAIT_WAIT6TYPE(a,b,c,d,e,f) waitid((a),(b),(f),(d)) +# define TWAIT_HAVE_PID 1 +#elif defined(TWAIT_WAIT3) +# define TWAIT_FNAME "wait3" +# define TWAIT_WAIT4TYPE(a,b,c,d) wait3((b),(c),(d)) +# define TWAIT_GENERIC(a,b,c) wait3((b),(c),NULL) +# define TWAIT_HAVE_STATUS 1 +# define TWAIT_HAVE_RUSAGE 1 +#elif defined(TWAIT_WAIT4) +# define TWAIT_FNAME "wait4" +# define TWAIT_WAIT4TYPE(a,b,c,d) wait4((a),(b),(c),(d)) +# define TWAIT_GENERIC(a,b,c) wait4((a),(b),(c),NULL) +# define TWAIT_HAVE_PID 1 +# define TWAIT_HAVE_STATUS 1 +# define TWAIT_HAVE_RUSAGE 1 +#elif defined(TWAIT_WAIT6) +# define TWAIT_FNAME "wait6" +# define TWAIT_WAIT6TYPE(a,b,c,d,e,f) wait6((a),(b),(c),(d),(e),(f)) +# define TWAIT_GENERIC(a,b,c) \ + wait6(P_PID,(a),(b),(c)|WEXITED|WTRAPPED,NULL,NULL) +# define TWAIT_HAVE_PID 1 +# define TWAIT_HAVE_STATUS 1 +#endif + +/* + * There are 3 groups of tests: + * - TWAIT_GENERIC() (wait, wait2, waitpid, wait3, wait4, wait6) + * - TWAIT_WAIT4TYPE() (wait2, waitpid, wait3, wait4) + * - TWAIT_WAIT6TYPE() (waitid, wait6) + * + * Tests only in the above categories are allowed. However some tests are not + * possible in the context requested functionality to be verified, therefore + * there are helper macros: + * - TWAIT_HAVE_PID (wait2, waitpid, waitid, wait4, wait6) + * - TWAIT_HAVE_STATUS (wait, wait2, waitpid, wait3, wait4, wait6) + * - TWAIT_HAVE_RUSAGE (wait3, wait4) + * - TWAIT_HAVE_RETPID (wait, wait2, waitpid, wait3, wait4, wait6) + * + * If there is an intention to test e.g. wait6(2) specific features in the + * ptrace(2) context, find the most matching group and with #ifdefs reduce + * functionality of less featured than wait6(2) interface (TWAIT_WAIT6TYPE). + * + * For clarity never use negative preprocessor checks, like: + * #if !defined(TWAIT_WAIT4) + * always refer to checks for positive values. + */ + +#define TEST_REQUIRE_EQ(x, y) \ +do { \ + uintmax_t vx = (x); \ + uintmax_t vy = (y); \ + int ret = vx == vy; \ + if (!ret) \ + ATF_REQUIRE_EQ_MSG(vx, vy, "%s(%ju) == %s(%ju)", \ + #x, vx, #y, vy); \ +} while (/*CONSTCOND*/0) + +/* + * A child process cannot call atf functions and expect them to magically + * work like in the parent. + * The printf(3) messaging from a child will not work out of the box as well + * without estabilishing a communication protocol with its parent. To not + * overcomplicate the tests - do not log from a child and use err(3)/errx(3) + * wrapped with FORKEE_ASSERT()/FORKEE_ASSERTX() as that is guaranteed to work. + */ +#define FORKEE_ASSERT_EQ(x, y) \ +do { \ + uintmax_t vx = (x); \ + uintmax_t vy = (y); \ + int ret = vx == vy; \ + if (!ret) \ + errx(EXIT_FAILURE, "%s:%d %s(): Assertion failed for: " \ + "%s(%ju) == %s(%ju)", __FILE__, __LINE__, __func__, \ + #x, vx, #y, vy); \ +} while (/*CONSTCOND*/0) + +#define FORKEE_ASSERTX(x) \ +do { \ + int ret = (x); \ + if (!ret) \ + errx(EXIT_FAILURE, "%s:%d %s(): Assertion failed for: %s",\ + __FILE__, __LINE__, __func__, #x); \ +} while (/*CONSTCOND*/0) + +#define FORKEE_ASSERT(x) \ +do { \ + int ret = (x); \ + if (!ret) \ + err(EXIT_FAILURE, "%s:%d %s(): Assertion failed for: %s",\ + __FILE__, __LINE__, __func__, #x); \ +} while (/*CONSTCOND*/0) + +/* + * Simplify logic for functions using general purpose registers add HAVE_GPREGS + * + * For platforms that do not implement all needed calls for simplicity assume + * that they are unsupported at all. + */ +#if defined(PT_GETREGS) \ + && defined(PT_SETREGS) \ + && defined(PTRACE_REG_PC) \ + && defined(PTRACE_REG_SET_PC) \ + && defined(PTRACE_REG_SP) \ + && defined(PTRACE_REG_INTRV) +#define HAVE_GPREGS +#endif + +/* Add guards for floating point registers */ +#if defined(PT_GETFPREGS) \ + && defined(PT_SETFPREGS) +#define HAVE_FPREGS +#endif + +/* Add guards for cpu debug registers */ +#if defined(PT_GETDBREGS) \ + && defined(PT_SETDBREGS) +#define HAVE_DBREGS +#endif + +/* + * If waitid(2) returns because one or more processes have a state change to + * report, 0 is returned. If an error is detected, a value of -1 is returned + * and errno is set to indicate the error. If WNOHANG is specified and there + * are no stopped, continued or exited children, 0 is returned. + */ +#if defined(TWAIT_WAITID) +#define TWAIT_REQUIRE_SUCCESS(a,b) TEST_REQUIRE_EQ((a), 0) +#define TWAIT_REQUIRE_FAILURE(a,b) ATF_REQUIRE_ERRNO((a),(b) == -1) +#define FORKEE_REQUIRE_SUCCESS(a,b) FORKEE_ASSERT_EQ(a, 0) +#define FORKEE_REQUIRE_FAILURE(a,b) \ + FORKEE_ASSERTX(((a) == errno) && ((b) == -1)) +#else +#define TWAIT_REQUIRE_SUCCESS(a,b) TEST_REQUIRE_EQ((a), (b)) +#define TWAIT_REQUIRE_FAILURE(a,b) ATF_REQUIRE_ERRNO((a),(b) == -1) +#define FORKEE_REQUIRE_SUCCESS(a,b) FORKEE_ASSERT_EQ(a, b) +#define FORKEE_REQUIRE_FAILURE(a,b) \ + FORKEE_ASSERTX(((a) == errno) && ((b) == -1)) +#endif + +/* + * Helper tools to verify whether status reports exited value + */ +#if TWAIT_HAVE_STATUS +static void __used +validate_status_exited(int status, int expected) +{ + ATF_REQUIRE_MSG(WIFEXITED(status), "Reported !exited process"); + ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process"); + ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process"); + ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process"); + + ATF_REQUIRE_EQ_MSG(WEXITSTATUS(status), expected, + "The process has exited with invalid value %d != %d", + WEXITSTATUS(status), expected); +} + +static void __used +forkee_status_exited(int status, int expected) +{ + FORKEE_ASSERTX(WIFEXITED(status)); + FORKEE_ASSERTX(!WIFCONTINUED(status)); + FORKEE_ASSERTX(!WIFSIGNALED(status)); + FORKEE_ASSERTX(!WIFSTOPPED(status)); + + FORKEE_ASSERT_EQ(WEXITSTATUS(status), expected); +} + +static void __used +validate_status_continued(int status) +{ + ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process"); + ATF_REQUIRE_MSG(WIFCONTINUED(status), "Reported !continued process"); + ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process"); + ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process"); +} + +static void __used +forkee_status_continued(int status) +{ + FORKEE_ASSERTX(!WIFEXITED(status)); + FORKEE_ASSERTX(WIFCONTINUED(status)); + FORKEE_ASSERTX(!WIFSIGNALED(status)); + FORKEE_ASSERTX(!WIFSTOPPED(status)); +} + +static void __used +validate_status_signaled(int status, int expected_termsig, int expected_core) +{ + ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process"); + ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process"); + ATF_REQUIRE_MSG(WIFSIGNALED(status), "Reported !signaled process"); + ATF_REQUIRE_MSG(!WIFSTOPPED(status), "Reported stopped process"); + + ATF_REQUIRE_EQ_MSG(WTERMSIG(status), expected_termsig, + "Unexpected signal received"); + + ATF_REQUIRE_EQ_MSG(WCOREDUMP(status), expected_core, + "Unexpectedly core file %s generated", expected_core ? "not" : ""); +} + +static void __used +forkee_status_signaled(int status, int expected_termsig, int expected_core) +{ + FORKEE_ASSERTX(!WIFEXITED(status)); + FORKEE_ASSERTX(!WIFCONTINUED(status)); + FORKEE_ASSERTX(WIFSIGNALED(status)); + FORKEE_ASSERTX(!WIFSTOPPED(status)); + + FORKEE_ASSERT_EQ(WTERMSIG(status), expected_termsig); + FORKEE_ASSERT_EQ(WCOREDUMP(status), expected_core); +} + +static void __used +validate_status_stopped(int status, int expected) +{ + ATF_REQUIRE_MSG(!WIFEXITED(status), "Reported exited process"); + ATF_REQUIRE_MSG(!WIFCONTINUED(status), "Reported continued process"); + ATF_REQUIRE_MSG(!WIFSIGNALED(status), "Reported signaled process"); + ATF_REQUIRE_MSG(WIFSTOPPED(status), "Reported !stopped process"); + + char st[128], ex[128]; + strlcpy(st, strsignal(WSTOPSIG(status)), sizeof(st)); + strlcpy(ex, strsignal(expected), sizeof(ex)); + + ATF_REQUIRE_EQ_MSG(WSTOPSIG(status), expected, + "Unexpected stop signal received [%s] != [%s]", st, ex); +} + +static void __used +forkee_status_stopped(int status, int expected) +{ + FORKEE_ASSERTX(!WIFEXITED(status)); + FORKEE_ASSERTX(!WIFCONTINUED(status)); + FORKEE_ASSERTX(!WIFSIGNALED(status)); + FORKEE_ASSERTX(WIFSTOPPED(status)); + + FORKEE_ASSERT_EQ(WSTOPSIG(status), expected); +} +#else +#define validate_status_exited(a,b) +#define forkee_status_exited(a,b) +#define validate_status_continued(a,b) +#define forkee_status_continued(a,b) +#define validate_status_signaled(a,b,c) +#define forkee_status_signaled(a,b,c) +#define validate_status_stopped(a,b) +#define forkee_status_stopped(a,b) +#endif + +/* This function is currently designed to be run in the main/parent process */ +static void __used +await_zombie(pid_t process) +{ + struct kinfo_proc2 p; + size_t len = sizeof(p); + + const int name[] = { + [0] = CTL_KERN, + [1] = KERN_PROC2, + [2] = KERN_PROC_PID, + [3] = process, + [4] = sizeof(p), + [5] = 1 + }; + + const size_t namelen = __arraycount(name); + + /* Await the process becoming a zombie */ + while(1) { + ATF_REQUIRE(sysctl(name, namelen, &p, &len, NULL, 0) == 0); + + if (p.p_stat == LSZOMB) + break; + + ATF_REQUIRE(usleep(1000) == 0); + } +} + +/* Happy number sequence -- this function is used to just consume cpu cycles */ +#define HAPPY_NUMBER 1 + +/* If n is not happy then its sequence ends in the cycle: + * 4, 16, 37, 58, 89, 145, 42, 20, 4, ... */ +#define SAD_NUMBER 4 + +/* Calculate the sum of the squares of the digits of n */ +static unsigned __used +dsum(unsigned n) +{ + unsigned sum, x; + for (sum = 0; n; n /= 10) { + x = n % 10; + sum += x * x; + } + return sum; +} + +/* + * XXX: Disabled optimization is required to make tests for hardware assisted + * traps in .text functional + * + * Tested with GCC 5.4 on NetBSD 7.99.47 amd64 + */ +static int __used +#ifdef __clang__ +__attribute__((__optnone__)) +#else +__attribute__((__optimize__("O0"))) +#endif +check_happy(unsigned n) +{ + for (;;) { + unsigned total = dsum(n); + + if (total == HAPPY_NUMBER) + return 1; + if (total == SAD_NUMBER) + return 0; + + n = total; + } +} + +#if defined(TWAIT_HAVE_PID) +#define ATF_TP_ADD_TC_HAVE_PID(a,b) ATF_TP_ADD_TC(a,b) +#else +#define ATF_TP_ADD_TC_HAVE_PID(a,b) +#endif + +#if defined(HAVE_GPREGS) +#define ATF_TP_ADD_TC_HAVE_GPREGS(a,b) ATF_TP_ADD_TC(a,b) +#else +#define ATF_TP_ADD_TC_HAVE_GPREGS(a,b) +#endif + +#if defined(HAVE_FPREGS) +#define ATF_TP_ADD_TC_HAVE_FPREGS(a,b) ATF_TP_ADD_TC(a,b) +#else +#define ATF_TP_ADD_TC_HAVE_FPREGS(a,b) +#endif + +#if defined(PT_STEP) +#define ATF_TP_ADD_TC_PT_STEP(a,b) ATF_TP_ADD_TC(a,b) +#else +#define ATF_TP_ADD_TC_PT_STEP(a,b) +#endif + +#if defined(__HAVE_PTRACE_WATCHPOINTS) +#define ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(a,b) ATF_TP_ADD_TC(a,b) +#else +#define ATF_TP_ADD_TC_HAVE_PTRACE_WATCHPOINTS(a,b) +#endif diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait3.c b/contrib/netbsd-tests/kernel/t_ptrace_wait3.c new file mode 100644 index 0000000..c136431 --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_wait3.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_ptrace_wait3.c,v 1.1 2016/11/07 21:09:03 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_WAIT3 +#include "t_ptrace_wait.c" diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait4.c b/contrib/netbsd-tests/kernel/t_ptrace_wait4.c new file mode 100644 index 0000000..7ae771b --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_wait4.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_ptrace_wait4.c,v 1.1 2016/11/07 21:09:03 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_WAIT4 +#include "t_ptrace_wait.c" diff --git a/contrib/netbsd-tests/kernel/t_ptrace_wait6.c b/contrib/netbsd-tests/kernel/t_ptrace_wait6.c new file mode 100644 index 0000000..122cb1d --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_wait6.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_ptrace_wait6.c,v 1.1 2016/11/07 21:09:03 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_WAIT6 +#include "t_ptrace_wait.c" diff --git a/contrib/netbsd-tests/kernel/t_ptrace_waitid.c b/contrib/netbsd-tests/kernel/t_ptrace_waitid.c new file mode 100644 index 0000000..1c09be7 --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_waitid.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_ptrace_waitid.c,v 1.1 2016/11/07 21:09:03 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_WAITID +#include "t_ptrace_wait.c" diff --git a/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c b/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c new file mode 100644 index 0000000..c8f107d --- /dev/null +++ b/contrib/netbsd-tests/kernel/t_ptrace_waitpid.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_ptrace_waitpid.c,v 1.1 2016/11/07 21:09:03 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_WAITPID +#include "t_ptrace_wait.c" diff --git a/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c b/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c index 474cfc7..8ca38b4 100644 --- a/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c +++ b/contrib/netbsd-tests/lib/libc/arch/sparc64/exec_prot_support.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_prot_support.c,v 1.1 2011/07/18 23:16:10 jym Exp $ */ +/* $NetBSD: exec_prot_support.c,v 1.2 2016/12/31 11:51:20 martin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,12 +30,13 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: exec_prot_support.c,v 1.1 2011/07/18 23:16:10 jym Exp $"); +__RCSID("$NetBSD: exec_prot_support.c,v 1.2 2016/12/31 11:51:20 martin Exp $"); #include "../../common/exec_prot.h" int exec_prot_support(void) { - return NOTIMPL; + + return PERPAGE_XP; } diff --git a/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S b/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S index 3495260..ec8bcdd 100644 --- a/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S +++ b/contrib/netbsd-tests/lib/libc/arch/sparc64/return_one.S @@ -1,8 +1,11 @@ -/* $NetBSD: return_one.S,v 1.1 2011/07/18 23:16:10 jym Exp $ */ +/* $NetBSD: return_one.S,v 1.2 2016/12/31 11:51:20 martin Exp $ */ #include <machine/asm.h> -.globl return_one, return_one_end; +.global return_one_end -return_one: return_one_end: - nop +ENTRY(return_one) +return_one: + retl + mov 1, %o0 +return_one_end: diff --git a/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c b/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c index 99235ea..7de4f61 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_faccessat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/faccessat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c b/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c index 6598059..a7bb683 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchmodat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/fchmodat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c b/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c index 2ca14cf..631d55a 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fchownat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -40,10 +42,6 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); #include <string.h> #include <unistd.h> #include <pwd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/fchownat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c b/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c index 30b26a7..b9aa017 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_fexecve.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $ */ +/* $NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fexecve.c,v 1.2 2013/03/17 04:35:59 jmmv Exp $"); +__RCSID("$NetBSD: t_fexecve.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include <sys/wait.h> @@ -70,9 +70,7 @@ ATF_TC_BODY(fexecve, tc) error = 76; else error = EXIT_FAILURE; -#ifdef __FreeBSD__ (void)close(fd); -#endif err(error, "fexecve"); } } diff --git a/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c b/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c index b23f625..c17961f 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_fstatat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/fstatat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c index 3736dfa..5c496c8 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_mkfifoat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_mkfifoat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mkfifoat.c,v 1.3 2017/01/10 15:15:09 christos Exp $"); #include <atf-c.h> #include <errno.h> @@ -63,9 +63,7 @@ ATF_TC_BODY(mkfifoat_fd, tc) ATF_REQUIRE((fd = mkfifoat(dfd, BASEFIFO, mode)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FIFO, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mkfifoat_fdcwd); diff --git a/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c b/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c index e8f71cd..7c3ab9b 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_mknodat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_mknodat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_mknodat.c,v 1.4 2017/01/10 15:15:09 christos Exp $"); #include <atf-c.h> #include <errno.h> @@ -80,9 +80,7 @@ ATF_TC_BODY(mknodat_fd, tc) ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(access(FILE, F_OK) == 0); -#ifdef __FreeBSD__ (void)close(dfd); -#endif } ATF_TC(mknodat_fdcwd); diff --git a/contrib/netbsd-tests/lib/libc/c063/t_o_search.c b/contrib/netbsd-tests/lib/libc/c063/t_o_search.c index d9dbe19..7cefa8b 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_o_search.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_o_search.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,9 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_o_search.c,v 1.5 2017/01/10 22:25:01 christos Exp $"); #include <atf-c.h> + +#include <sys/param.h> +#include <sys/stat.h> + #include <errno.h> #include <fcntl.h> #include <limits.h> @@ -40,7 +44,6 @@ __RCSID("$NetBSD: t_o_search.c,v 1.4 2013/03/17 04:46:06 jmmv Exp $"); #include <string.h> #include <unistd.h> #include <pwd.h> -#include <sys/param.h> /* * dholland 20130112: disable tests that require O_SEARCH semantics diff --git a/contrib/netbsd-tests/lib/libc/c063/t_openat.c b/contrib/netbsd-tests/lib/libc/c063/t_openat.c index 5112efc..f7c8c74 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_openat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_openat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_openat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/openat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c b/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c index c9bc267..cf14652 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_readlinkat.c,v 1.4 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/readlinkat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c b/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c index 220c4b2..9897b92 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_unlinkat.c,v 1.3 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,10 +41,6 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #define DIR "dir" #define FILE "dir/unlinkat" diff --git a/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c b/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c index bbfa28b..682c2df 100644 --- a/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c +++ b/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $ */ +/* $NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $"); +__RCSID("$NetBSD: t_utimensat.c,v 1.6 2017/01/10 15:13:56 christos Exp $"); +#include <sys/param.h> +#include <sys/stat.h> +#include <sys/time.h> #include <atf-c.h> #include <errno.h> #include <fcntl.h> @@ -39,11 +42,6 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 2013/03/17 04:46:06 jmmv Exp $"); #include <stdio.h> #include <string.h> #include <unistd.h> -#include <sys/param.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif -#include <sys/time.h> #define DIR "dir" #define FILE "dir/utimensat" diff --git a/contrib/netbsd-tests/lib/libc/db/h_db.c b/contrib/netbsd-tests/lib/libc/db/h_db.c index dfb1385..dd19a03 100644 --- a/contrib/netbsd-tests/lib/libc/db/h_db.c +++ b/contrib/netbsd-tests/lib/libc/db/h_db.c @@ -1,4 +1,4 @@ -/* $NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $ */ +/* $NetBSD: h_db.c,v 1.3 2016/09/24 21:18:22 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993, 1994\ #if 0 static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; #else -__RCSID("$NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $"); +__RCSID("$NetBSD: h_db.c,v 1.3 2016/09/24 21:18:22 christos Exp $"); #endif #endif /* not lint */ @@ -57,12 +57,13 @@ __RCSID("$NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $"); #include <unistd.h> #include <err.h> #include <db.h> +#include "btree.h" enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA }; static void compare(DBT *, DBT *); static DBTYPE dbtype(const char *); -static void dump(DB *, int); +static void dump(DB *, int, int); static void get(DB *, DBT *); static void getdata(DB *, DBT *, DBT *); static void put(DB *, DBT *, DBT *); @@ -73,6 +74,9 @@ static void *rfile(char *, size_t *); static void seq(DB *, DBT *); static u_int setflags(char *); static void *setinfo(DBTYPE, char *); +#ifdef __NetBSD__ +static void unlinkpg(DB *); +#endif static void usage(void) __attribute__((__noreturn__)); static void *xcopy(void *, size_t); static void chkcmd(enum S); @@ -82,6 +86,9 @@ static void chkkey(enum S); #ifdef STATISTICS extern void __bt_stat(DB *); #endif +#ifdef __NetBSD__ +extern int __bt_relink(BTREE *, PAGE *); +#endif static DBTYPE type; /* Database type. */ static void *infop; /* Iflags. */ @@ -315,8 +322,16 @@ lkey: switch (command) { } break; case 'o': - dump(dbp, p[1] == 'r'); + dump(dbp, p[1] == 'r', 0); + break; +#ifdef __NetBSD__ + case 'O': + dump(dbp, p[1] == 'r', 1); break; + case 'u': + unlinkpg(dbp); + break; +#endif default: errx(1, "line %zu: %s: unknown command character", lineno, p); @@ -483,17 +498,25 @@ seq(DB *dbp, DBT *kp) } static void -dump(DB *dbp, int rev) +dump(DB *dbp, int rev, int recurse) { DBT key, data; int xflags, nflags; if (rev) { xflags = R_LAST; +#ifdef __NetBSD__ + nflags = recurse ? R_RPREV : R_PREV; +#else nflags = R_PREV; +#endif } else { xflags = R_FIRST; +#ifdef __NetBSD__ + nflags = recurse ? R_RNEXT : R_NEXT; +#else nflags = R_NEXT; +#endif } for (;; xflags = nflags) switch (dbp->seq(dbp, &key, &data, xflags)) { @@ -511,6 +534,42 @@ dump(DB *dbp, int rev) done: return; } +#ifdef __NetBSD__ +void +unlinkpg(DB *dbp) +{ + BTREE *t = dbp->internal; + PAGE *h = NULL; + pgno_t pg; + + for (pg = P_ROOT; pg < t->bt_mp->npages; + mpool_put(t->bt_mp, h, 0), pg++) { + if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) + break; + /* Look for a nonempty leaf page that has both left + * and right siblings. */ + if (h->prevpg == P_INVALID || h->nextpg == P_INVALID) + continue; + if (NEXTINDEX(h) == 0) + continue; + if ((h->flags & (P_BLEAF | P_RLEAF))) + break; + } + if (h == NULL || pg == t->bt_mp->npages) { + errx(1, "%s: no appropriate page found", __func__); + return; + } + if (__bt_relink(t, h) != 0) { + perror("unlinkpg"); + goto cleanup; + } + h->prevpg = P_INVALID; + h->nextpg = P_INVALID; +cleanup: + mpool_put(t->bt_mp, h, MPOOL_DIRTY); +} +#endif + static u_int setflags(char *s) { @@ -725,7 +784,11 @@ static void usage(void) { (void)fprintf(stderr, - "Usage: %s [-l] [-f file] [-i info] [-o file] type script\n", - getprogname()); +#ifdef __NetBSD__ + "Usage: %s [-lu] [-f file] [-i info] [-o file] [-O file] " +#else + "Usage: %s [-l] [-f file] [-i info] [-o file] " +#endif + "type script\n", getprogname()); exit(1); } diff --git a/contrib/netbsd-tests/lib/libc/db/t_db.sh b/contrib/netbsd-tests/lib/libc/db/t_db.sh index eb6b8c9..6858e36 100755 --- a/contrib/netbsd-tests/lib/libc/db/t_db.sh +++ b/contrib/netbsd-tests/lib/libc/db/t_db.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_db.sh,v 1.6 2015/11/18 18:35:35 christos Exp $ +# $NetBSD: t_db.sh,v 1.7 2016/09/24 20:12:33 christos Exp $ # # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -563,6 +563,7 @@ delete_recno_body() h_repeated() { + local type="$1" TMPDIR="$(pwd)/db_dir"; export TMPDIR mkdir ${TMPDIR} @@ -581,7 +582,7 @@ h_repeated() } }' >in - $(prog_db) btree in + $(prog_db) $type in } atf_test_case repeated_btree @@ -641,11 +642,10 @@ duplicate_btree_body() h_cursor_flags() { + local type=$1 TMPDIR="$(pwd)/db_dir"; export TMPDIR mkdir ${TMPDIR} - type=$1 - echo $SEVEN_SEVEN | awk '{ for (i = 1; i <= 20; ++i) @@ -784,6 +784,7 @@ h_byte_orders() echo p echo k$i echo d$i + echo S echo g echo k$i done >in @@ -974,6 +975,298 @@ bsize_torture_body() done } +atf_test_case btree_weird_page_split +btree_weird_page_split_head() +{ + atf_set "descr" \ + "Test for a weird page split condition where an insertion " \ + "into index 0 of a page that would cause the new item to " \ + "be the only item on the left page results in index 0 of " \ + "the right page being erroneously skipped; this only " \ + "happens with one particular key+data length for each page size." +} +btree_weird_page_split_body() +{ + for psize in 512 1024 2048 4096 8192; do + echo " page size $psize" + kdsizes=`awk 'BEGIN { + psize = '$psize'; hsize = int(psize/2); + for (kdsize = hsize-40; kdsize <= hsize; kdsize++) { + print kdsize; + } + }' /dev/null` + + # Use a series of keylen+datalen values in the right + # neighborhood to find the one that triggers the bug. + # We could compute the exact size that triggers the + # bug but this additional fuzz may be useful. + + # Insert keys in reverse order to maximize the chances + # for a split on index 0. + + for kdsize in $kdsizes; do + awk 'BEGIN { + kdsize = '$kdsize'; + for (i = 8; i-- > 0; ) { + s = sprintf("a%03d:%09d", i, kdsize); + for (j = 0; j < kdsize-20; j++) { + s = s "x"; + } + printf("p\nka%03d\nd%s\n", i, s); + } + print "o"; + }' /dev/null > in + sed -n 's/^d//p' in | sort > exp + atf_check -o file:exp \ + "$(prog_db)" -i psize=$psize btree in + done + done +} + +# Extremely tricky test attempting to replicate some unusual database +# corruption seen in the field: pieces of the database becoming +# inaccessible to random access, sequential access, or both. The +# hypothesis is that at least some of these are triggered by the bug +# in page splits on index 0 with a particular exact keylen+datalen. +# (See Test 40.) For psize=4096, this size is exactly 2024. + +# The order of operations here relies on very specific knowledge of +# the internals of the btree access method in order to place records +# at specific offsets in a page and to create certain keys on internal +# pages. The to-be-split page immediately prior to the bug-triggering +# split has the following properties: +# +# * is not the leftmost leaf page +# * key on the parent page is compares less than the key of the item +# on index 0 +# * triggering record's key also compares greater than the key on the +# parent page + +# Additionally, we prime the mpool LRU chain so that the head page on +# the chain has the following properties: +# +# * record at index 0 is located where it will not get overwritten by +# items written to the right-hand page during the split +# * key of the record at index 0 compares less than the key of the +# bug-triggering record + +# If the page-split bug exists, this test appears to create a database +# where some records are inaccessible to a search, but still remain in +# the file and are accessible by sequential traversal. At least one +# record gets duplicated out of sequence. + +atf_test_case btree_tricky_page_split +btree_tricky_page_split_head() +{ + atf_set "descr" \ + "btree: no unsearchables due to page split on index 0" +} +btree_tricky_page_split_body() +{ + list=`(for i in a b c d; do + for j in 990 998 999; do + echo g ${i}${j} 1024 + done + done; + echo g y997 2014 + for i in y z; do + for j in 998 999; do + echo g ${i}${j} 1024 + done + done)` + # Exact number for trigger condition accounts for newlines + # retained by dbtest with -ofile but not without; we use + # -ofile, so count newlines. keylen=5,datalen=5+2014 for + # psize=4096 here. + (cat - <<EOF +p z999 1024 +p z998 1024 +p y999 1024 +p y990 1024 +p d999 1024 +p d990 1024 +p c999 1024 +p c990 1024 +p b999 1024 +p b990 1024 +p a999 1024 +p a990 1024 +p y998 1024 +r y990 +p d998 1024 +p d990 1024 +p c998 1024 +p c990 1024 +p b998 1024 +p b990 1024 +p a998 1024 +p a990 1024 +p y997 2014 +S +o +EOF + echo "$list") | + # awk script input: + # {p|g|r} key [datasize] + awk '/^[pgr]/{ + printf("%s\nk%s\n", $1, $2); + } + /^p/{ + s = $2; + for (i = 0; i < $3; i++) { + s = s "x"; + } + printf("d%s\n", s); + } + !/^[pgr]/{ + print $0; + }' > in + (echo "$list"; echo "$list") | awk '{ + s = $2; + for (i = 0; i < $3; i++) { + s = s "x"; + } + print s; + }' > exp + atf_check -o file:exp \ + "$(prog_db)" -i psize=4096 btree in +} + +# Begin FreeBSD +if false; then +# End FreeBSD +atf_test_case btree_recursive_traversal +btree_recursive_traversal_head() +{ + atf_set "descr" \ + "btree: Test for recursive traversal successfully " \ + "retrieving records that are inaccessible to normal " \ + "sequential 'sibling-link' traversal. This works by " \ + "unlinking a few leaf pages but leaving their parent " \ + "links intact. To verify that the unlink actually makes " \ + "records inaccessible, the test first uses 'o' to do a " \ + "normal sequential traversal, followed by 'O' to do a " \ + "recursive traversal." +} +btree_recursive_traversal_body() +{ + fill="abcdefghijklmnopqrstuvwxyzy" + script='{ + for (i = 0; i < 20000; i++) { + printf("p\nkAA%05d\nd%05d%s\n", i, i, $0); + } + print "u"; + print "u"; + print "u"; + print "u"; + }' + (echo $fill | awk "$script"; echo o) > in1 + echo $fill | + awk '{ + for (i = 0; i < 20000; i++) { + if (i >= 5 && i <= 40) + continue; + printf("%05d%s\n", i, $0); + } + }' > exp1 + atf_check -o file:exp1 \ + "$(prog_db)" -i psize=512 btree in1 + echo $fill | + awk '{ + for (i = 0; i < 20000; i++) { + printf("%05d%s\n", i, $0); + } + }' > exp2 + (echo $fill | awk "$script"; echo O) > in2 + atf_check -o file:exp2 \ + "$(prog_db)" -i psize=512 btree in2 +} +# Begin FreeBSD +fi +# End FreeBSD + +atf_test_case btree_byteswap_unaligned_access_bksd +btree_byteswap_unaligned_access_bksd_head() +{ + atf_set "descr" \ + "btree: big key, small data, byteswap unaligned access" +} +btree_byteswap_unaligned_access_bksd_body() +{ + (echo foo; echo bar) | + awk '{ + s = $0 + for (i = 0; i < 488; i++) { + s = s "x"; + } + printf("p\nk%s\ndx\n", s); + }' > in + for order in 1234 4321; do + atf_check \ + "$(prog_db)" -o out -i psize=512,lorder=$order btree in + done +} + +atf_test_case btree_byteswap_unaligned_access_skbd +btree_byteswap_unaligned_access_skbd_head() +{ + atf_set "descr" \ + "btree: small key, big data, byteswap unaligned access" +} +btree_byteswap_unaligned_access_skbd_body() +{ + # 484 = 512 - 20 (header) - 7 ("foo1234") - 1 (newline) + (echo foo1234; echo bar1234) | + awk '{ + s = $0 + for (i = 0; i < 484; i++) { + s = s "x"; + } + printf("p\nk%s\nd%s\n", $0, s); + }' > in + for order in 1234 4321; do + atf_check \ + "$(prog_db)" -o out -i psize=512,lorder=$order btree in + done +} + +atf_test_case btree_known_byte_order +btree_known_byte_order_head() +{ + atf_set "descr" \ + "btree: small key, big data, known byte order" +} +btree_known_byte_order_body() +{ + local a="-i psize=512,lorder=" + + (echo foo1234; echo bar1234) | + awk '{ + s = $0 + for (i = 0; i < 484; i++) { + s = s "x"; + } + printf("%s\n", s); + }' > exp + (echo foo1234; echo bar1234) | + awk '{ + s = $0 + for (i = 0; i < 484; i++) { + s = s "x"; + } + printf("p\nk%s\nd%s\n", $0, s); + }' > in1 + for order in 1234 4321; do + atf_check \ + "$(prog_db)" -f out.$order $a$order btree in1 + done + (echo g; echo kfoo1234; echo g; echo kbar1234) > in2 + for order in 1234 4321; do + atf_check -o file:exp \ + "$(prog_db)" -s -f out.$order $a$order btree in2 + done +} + atf_init_test_cases() { atf_add_test_case small_btree @@ -1002,4 +1295,16 @@ atf_init_test_cases() atf_add_test_case bsize_ffactor atf_add_test_case four_char_hash atf_add_test_case bsize_torture + atf_add_test_case btree_weird_page_split + atf_add_test_case btree_tricky_page_split + # Begin FreeBSD + if false; then + # End FreeBSD + atf_add_test_case btree_recursive_traversal + # Begin FreeBSD + fi + # End FreeBSD + atf_add_test_case btree_byteswap_unaligned_access_bksd + atf_add_test_case btree_byteswap_unaligned_access_skbd + atf_add_test_case btree_known_byte_order } diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c index 5bbf337..74009a8 100644 --- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c +++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fileactions.c,v 1.5 2012/04/09 19:42:07 martin Exp $ */ +/* $NetBSD: t_fileactions.c,v 1.6 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,10 +31,11 @@ */ -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif #include <atf-c.h> + +#include <sys/wait.h> +#include <sys/stat.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -42,7 +43,6 @@ #include <fcntl.h> #include <spawn.h> #include <unistd.h> -#include <sys/wait.h> ATF_TC(t_spawn_openmode); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_assert.c b/contrib/netbsd-tests/lib/libc/gen/t_assert.c index a09c130..ce73015 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_assert.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_assert.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */ +/* $NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,8 +29,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); +__RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); +#include <sys/types.h> +#include <sys/resource.h> +#include <sys/time.h> #include <sys/wait.h> #include <assert.h> @@ -40,11 +43,6 @@ __RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $"); #include <string.h> #include <unistd.h> -#ifdef __FreeBSD__ -#include <sys/types.h> -#include <sys/time.h> -#include <sys/resource.h> - static void disable_corefile(void) { @@ -55,7 +53,6 @@ disable_corefile(void) ATF_REQUIRE(setrlimit(RLIMIT_CORE, &limits) == 0); } -#endif static void handler(int); @@ -82,9 +79,7 @@ ATF_TC_BODY(assert_false, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); @@ -122,9 +117,7 @@ ATF_TC_BODY(assert_true, tc) if (pid == 0) { -#ifdef __FreeBSD__ disable_corefile(); -#endif (void)closefrom(0); (void)memset(&sa, 0, sizeof(struct sigaction)); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_dir.c b/contrib/netbsd-tests/lib/libc/gen/t_dir.c index b37d89d..40de116 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_dir.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_dir.c,v 1.6 2013/10/19 17:45:00 christos Exp $ */ +/* $NetBSD: t_dir.c,v 1.10 2017/01/11 18:15:02 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -26,22 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <atf-c.h> - +#include <sys/stat.h> #include <assert.h> +#include <atf-c.h> #include <dirent.h> #include <err.h> +#include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <sys/stat.h> -#ifdef __FreeBSD__ -#include <errno.h> -#endif ATF_TC(seekdir_basic); ATF_TC_HEAD(seekdir_basic, tc) @@ -58,7 +55,6 @@ ATF_TC_BODY(seekdir_basic, tc) struct dirent *entry; long here; -#ifdef __FreeBSD__ #define CREAT(x, m) do { \ int _creat_fd; \ ATF_REQUIRE_MSG((_creat_fd = creat((x), (m))) != -1, \ @@ -72,12 +68,6 @@ ATF_TC_BODY(seekdir_basic, tc) CREAT("t/a", 0600); CREAT("t/b", 0600); CREAT("t/c", 0600); -#else - mkdir("t", 0755); - creat("t/a", 0600); - creat("t/b", 0600); - creat("t/c", 0600); -#endif dp = opendir("t"); if ( dp == NULL) @@ -85,35 +75,40 @@ ATF_TC_BODY(seekdir_basic, tc) /* skip two for . and .. */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + ".", strerror(errno)); + entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "..", strerror(errno)); /* get first entry */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "first", strerror(errno)); + here = telldir(dp); -#ifdef __FreeBSD__ - ATF_REQUIRE_MSG(here != -1, - "telldir failed: %s", strerror(errno)); -#endif + ATF_REQUIRE_MSG(here != -1, "telldir failed: %s", strerror(errno)); /* get second entry */ entry = readdir(dp); -#ifdef __FreeBSD__ - ATF_REQUIRE_MSG(entry != NULL, - "readdir failed: %s", strerror(errno)); -#endif + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "second", strerror(errno)); + wasname = strdup(entry->d_name); if (wasname == NULL) atf_tc_fail("cannot allocate memory"); /* get third entry */ entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "third", strerror(errno)); /* try to return to the position after the first entry */ seekdir(dp, here); entry = readdir(dp); - - if (entry == NULL) - atf_tc_fail("entry 1 not found"); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "first[1]", strerror(errno)); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("1st seekdir found wrong name"); @@ -121,25 +116,22 @@ ATF_TC_BODY(seekdir_basic, tc) seekdir(dp, here); here = telldir(dp); entry = readdir(dp); - - if (entry == NULL) - atf_tc_fail("entry 2 not found"); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "second[1]", strerror(errno)); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("2nd seekdir found wrong name"); /* One more time, to make sure that telldir() doesn't affect result */ seekdir(dp, here); entry = readdir(dp); + ATF_REQUIRE_MSG(entry != NULL, "readdir[%s] failed: %s", + "third[1]", strerror(errno)); - if (entry == NULL) - atf_tc_fail("entry 3 not found"); if (strcmp(entry->d_name, wasname) != 0) atf_tc_fail("3rd seekdir found wrong name"); closedir(dp); -#ifdef __FreeBSD__ free(wasname); -#endif } ATF_TC(telldir_leak); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c b/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c index c0064c3..69ee8d2 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_fnmatch.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fnmatch.c,v 1.6 2014/10/12 22:33:41 christos Exp $ */ +/* $NetBSD: t_fnmatch.c,v 1.7 2016/10/31 05:08:53 dholland Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_fnmatch.c,v 1.6 2014/10/12 22:33:41 christos Exp $"); +__RCSID("$NetBSD: t_fnmatch.c,v 1.7 2016/10/31 05:08:53 dholland Exp $"); #include <atf-c.h> #include <fnmatch.h> @@ -166,6 +166,7 @@ ATF_TC_BODY(fnmatch_initialbracket, tc) ATF_CHECK(fnmatch("[!]a-]", "b", 0) == 0); ATF_CHECK(fnmatch("[]-_]", "^", 0) == 0); /* range: ']', '^', '_' */ ATF_CHECK(fnmatch("[!]-_]", "X", 0) == 0); + ATF_CHECK(fnmatch("[A-\\\\]", "[", 0) == 0); ATF_CHECK(fnmatch("[a-z]/[a-z]", "a/b", 0) == 0); ATF_CHECK(fnmatch("[*]/b", "*/b", 0) == 0); ATF_CHECK(fnmatch("[?]/b", "?/b", 0) == 0); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_ftok.c b/contrib/netbsd-tests/lib/libc/gen/t_ftok.c index 718d310..4c1ab18 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_ftok.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_ftok.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */ +/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $"); +__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $"); #include <sys/types.h> #include <sys/ipc.h> @@ -68,9 +68,7 @@ ATF_TC_BODY(ftok_link, tc) fd = open(path, O_RDONLY | O_CREAT); ATF_REQUIRE(fd >= 0); -#ifdef __FreeBSD__ (void)close(fd); -#endif ATF_REQUIRE(link(path, hlnk) == 0); ATF_REQUIRE(symlink(path, slnk) == 0); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c b/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c index 53055d2..17eac87 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_humanize_number.c,v 1.8 2012/03/18 07:14:08 jruoho Exp $ */ +/* $NetBSD: t_humanize_number.c,v 1.9 2017/01/10 15:20:44 christos Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -247,9 +247,7 @@ ATF_TC_BODY(humanize_number_basic, tc) newline(); atf_tc_fail_nonfatal("Failed for table entry %d", i); } -#ifdef __FreeBSD__ free(buf); -#endif } ATF_TC(humanize_number_big); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c index e89df69..5e36456 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_sleep.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_sleep.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_sleep.c,v 1.9 2016/08/11 21:34:11 kre Exp $ */ +/* $NetBSD: t_sleep.c,v 1.11 2017/01/10 15:43:59 maya Exp $ */ /*- * Copyright (c) 2006 Frank Kardel @@ -26,8 +26,17 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __FreeBSD__ +#include <sys/types.h> +#endif +#include <sys/cdefs.h> +#include <sys/event.h> +#include <sys/signal.h> +#include <sys/time.h> /* for TIMESPEC_TO_TIMEVAL on FreeBSD */ + #include <atf-c.h> #include <errno.h> +#include <inttypes.h> #include <poll.h> #include <stdio.h> #include <stdlib.h> @@ -35,10 +44,6 @@ #include <time.h> #include <unistd.h> -#include <sys/cdefs.h> -#include <sys/event.h> -#include <sys/signal.h> - #include "isqemu.h" #define BILLION 1000000000LL /* nano-seconds per second */ @@ -49,11 +54,6 @@ #define KEVNT_TIMEOUT 10300 /* measured in milli-seconds */ #define FUZZ (40 * MILLION) /* scheduling fuzz accepted - 40 ms */ -#ifdef __FreeBSD__ -#include <sys/time.h> -#include <inttypes.h> -#endif - /* * Timer notes * diff --git a/contrib/netbsd-tests/lib/libc/gen/t_time.c b/contrib/netbsd-tests/lib/libc/gen/t_time.c index 2905403..15a8d58 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_time.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_time.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $ */ +/* $NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,11 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); +__RCSID("$NetBSD: t_time.c,v 1.4 2017/01/10 15:32:46 christos Exp $"); -#ifdef __FreeBSD__ -#include <sys/time.h> -#endif #include <atf-c.h> #include <errno.h> #include <inttypes.h> @@ -41,6 +38,7 @@ __RCSID("$NetBSD: t_time.c,v 1.3 2014/10/31 12:22:38 justin Exp $"); #include <stdio.h> #include <stdlib.h> #include <time.h> +#include <sys/time.h> #include <unistd.h> ATF_TC(time_copy); diff --git a/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c b/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c index 1c813fb..61121b8 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */ +/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $"); +__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $"); #include <atf-c.h> #include <errno.h> @@ -78,9 +78,7 @@ ATF_TC_BODY(ttyname_err, tc) ATF_REQUIRE(ttyname(fd) == NULL); ATF_REQUIRE(errno == ENOTTY); -#ifdef __FreeBSD__ (void)close(fd); -#endif } } diff --git a/contrib/netbsd-tests/lib/libc/gen/t_vis.c b/contrib/netbsd-tests/lib/libc/gen/t_vis.c index 76f85f4..adb0930 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_vis.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_vis.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_vis.c,v 1.8 2015/05/23 14:02:11 christos Exp $ */ +/* $NetBSD: t_vis.c,v 1.9 2017/01/10 15:16:57 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -144,9 +144,7 @@ ATF_TC_BODY(strunvis_hex, tc) } } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TC(strvis_locale); ATF_TC_HEAD(strvis_locale, tc) { @@ -175,9 +173,7 @@ ATF_TC_BODY(strvis_locale, tc) setlocale(LC_CTYPE, ol); free(ol); } -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ ATF_TP_ADD_TCS(tp) { @@ -186,13 +182,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, strvis_null); ATF_TP_ADD_TC(tp, strvis_empty); ATF_TP_ADD_TC(tp, strunvis_hex); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #ifdef VIS_NOLOCALE -/* End FreeBSD */ ATF_TP_ADD_TC(tp, strvis_locale); -/* Begin FreeBSD: ^/stable/10 doesn't have VIS_NOLOCALE */ #endif /* VIS_NOLOCALE */ -/* End FreeBSD */ return atf_no_error(); } diff --git a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c index 0254743..9c14a22 100644 --- a/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c +++ b/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c @@ -1,7 +1,7 @@ -/* $NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $ */ +/* $NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $"); +__RCSID("$NetBSD: t_rpc.c,v 1.10 2016/08/27 14:36:22 christos Exp $"); #include <sys/types.h> #include <sys/socket.h> @@ -21,7 +21,7 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $"); #define SKIPX(ev, msg, ...) do { \ atf_tc_skip(msg, __VA_ARGS__); \ - return; \ + return ev; \ } while(/*CONSTCOND*/0) #ifdef __FreeBSD__ @@ -32,8 +32,8 @@ __RCSID("$NetBSD: t_rpc.c,v 1.9 2015/11/27 13:59:40 christos Exp $"); #endif #else -#define ERRX(ev, msg, ...) errx(ev, msg, __VA_ARGS__) -#define SKIPX(ev, msg, ...) errx(ev, msg, __VA_ARGS__) +#define ERRX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__) +#define SKIPX(ev, msg, ...) errx(EXIT_FAILURE, msg, __VA_ARGS__) #endif #ifdef DEBUG @@ -89,7 +89,7 @@ onehost(const char *host, const char *transp) __rpc_control(CLCR_SET_RPCB_TIMEOUT, &tv); if ((clnt = clnt_create(host, RPCBPROG, RPCBVERS, transp)) == NULL) - SKIPX(EXIT_FAILURE, "clnt_create (%s)", clnt_spcreateerror("")); + SKIPX(, "clnt_create (%s)", clnt_spcreateerror("")); tv.tv_sec = 1; tv.tv_usec = 0; @@ -101,7 +101,7 @@ onehost(const char *host, const char *transp) if (clnt_call(clnt, RPCBPROC_NULL, xdr_void, NULL, xdr_void, NULL, tv) != RPC_SUCCESS) #endif - ERRX(EXIT_FAILURE, "clnt_call (%s)", clnt_sperror(clnt, "")); + ERRX(, "clnt_call (%s)", clnt_sperror(clnt, "")); clnt_control(clnt, CLGET_SVC_ADDR, (char *) &addr); reply(NULL, &addr, NULL); } @@ -123,13 +123,13 @@ server(struct svc_req *rqstp, SVCXPRT *transp) switch (rqstp->rq_proc) { case NULLPROC: if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) - ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0); + ERRX(, "svc_sendreply failed %d", 0); return; case PLUSONE: break; case DESTROY: if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) - ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 0); + ERRX(, "svc_sendreply failed %d", 0); svc_destroy(transp); exit(0); default: @@ -144,7 +144,7 @@ server(struct svc_req *rqstp, SVCXPRT *transp) DPRINTF("About to increment\n"); num++; if (!svc_sendreply(transp, (xdrproc_t)xdr_int, (void *)&num)) - ERRX(EXIT_FAILURE, "svc_sendreply failed %d", 1); + ERRX(, "svc_sendreply failed %d", 1); DPRINTF("Leaving server procedure.\n"); } @@ -201,13 +201,9 @@ regtest(const char *hostname, const char *transp, const char *arg, int p) svc_fdset_init(p ? SVC_FDSET_POLL : 0); #endif if (!svc_create(server, PROGNUM, VERSNUM, transp)) -#ifdef __NetBSD__ - ERRX(EXIT_FAILURE, "Cannot create server %d", num); -#else { SKIPXI(EXIT_FAILURE, "Cannot create server %d", num); } -#endif switch ((pid = fork())) { case 0: diff --git a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c index 905306d..06f2de0 100644 --- a/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c +++ b/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c @@ -51,10 +51,6 @@ static const char * const inf_strings[] = const char *nan_string = "NaN(x)y"; #endif -#ifdef __FreeBSD__ -#define __HAVE_LONG_DOUBLE -#endif - ATF_TC(strtod_basic); ATF_TC_HEAD(strtod_basic, tc) { diff --git a/contrib/netbsd-tests/lib/libc/string/t_memcpy.c b/contrib/netbsd-tests/lib/libc/string/t_memcpy.c index 5bbd924..64cdb29 100644 --- a/contrib/netbsd-tests/lib/libc/string/t_memcpy.c +++ b/contrib/netbsd-tests/lib/libc/string/t_memcpy.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_memcpy.c,v 1.5 2013/03/17 02:23:31 christos Exp $ */ +/* $NetBSD: t_memcpy.c,v 1.6 2017/01/11 18:05:54 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -108,12 +108,8 @@ ATF_TC_BODY(memcpy_basic, tc) if (i != j) runTest(start[i], start[j]); MD5End(mc, result); -#ifdef __NetBSD__ - ATF_REQUIRE_EQ(strcmp(result, goodResult), 0); -#else ATF_REQUIRE_EQ_MSG(strcmp(result, goodResult), 0, "%s != %s", result, goodResult); -#endif } ATF_TC(memccpy_simple); diff --git a/contrib/netbsd-tests/lib/libc/string/t_memmem.c b/contrib/netbsd-tests/lib/libc/string/t_memmem.c index c11b698..5bf60ce 100644 --- a/contrib/netbsd-tests/lib/libc/string/t_memmem.c +++ b/contrib/netbsd-tests/lib/libc/string/t_memmem.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_memmem.c,v 1.2 2011/07/07 08:27:36 jruoho Exp $ */ +/* $NetBSD: t_memmem.c,v 1.3 2017/01/11 18:07:37 christos Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. diff --git a/contrib/netbsd-tests/lib/libc/string/t_strchr.c b/contrib/netbsd-tests/lib/libc/string/t_strchr.c index 4556b2c..5dd9a62 100644 --- a/contrib/netbsd-tests/lib/libc/string/t_strchr.c +++ b/contrib/netbsd-tests/lib/libc/string/t_strchr.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_strchr.c,v 1.1 2011/07/07 08:59:33 jruoho Exp $ */ +/* $NetBSD: t_strchr.c,v 1.2 2017/01/10 15:34:49 christos Exp $ */ /* * Written by J.T. Conklin <jtc@acorntoolworks.com> @@ -58,12 +58,10 @@ ATF_TC_HEAD(strchr_basic, tc) ATF_TC_BODY(strchr_basic, tc) { -#ifdef __FreeBSD__ void *dl_handle; -#endif - unsigned int t, a; char *off; char buf[32]; + unsigned int t, a; const char *tab[] = { "", @@ -248,12 +246,8 @@ ATF_TC_BODY(strchr_basic, tc) "abcdefgh/abcdefgh/", }; -#ifdef __FreeBSD__ dl_handle = dlopen(NULL, RTLD_LAZY); strchr_fn = dlsym(dl_handle, "test_strlen"); -#else - strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr"); -#endif if (!strchr_fn) strchr_fn = strchr; @@ -288,9 +282,7 @@ ATF_TC_BODY(strchr_basic, tc) verify_strchr(buf + a, 0xff, t, a); } } -#ifdef __FreeBSD__ (void)dlclose(dl_handle); -#endif } ATF_TP_ADD_TCS(tp) diff --git a/contrib/netbsd-tests/lib/libc/string/t_strerror.c b/contrib/netbsd-tests/lib/libc/string/t_strerror.c index 888a826..99b95b4 100644 --- a/contrib/netbsd-tests/lib/libc/string/t_strerror.c +++ b/contrib/netbsd-tests/lib/libc/string/t_strerror.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */ +/* $NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,18 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $"); +__RCSID("$NetBSD: t_strerror.c,v 1.4 2017/01/10 20:35:49 christos Exp $"); #include <atf-c.h> #include <errno.h> +#include <stdio.h> /* Needed for sys_nerr on FreeBSD */ #include <limits.h> #include <locale.h> #include <string.h> -#ifdef __FreeBSD__ -#include <stdio.h> -#endif - ATF_TC(strerror_basic); ATF_TC_HEAD(strerror_basic, tc) { diff --git a/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc b/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc index 7426851..e7822b7 100644 --- a/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc +++ b/contrib/netbsd-tests/lib/libc/sync/cpp_atomic_ops_linkable.cc @@ -1,4 +1,4 @@ -/* $NetBSD: cpp_atomic_ops_linkable.cc,v 1.4 2016/02/27 18:50:39 joerg Exp $ */ +/* $NetBSD: cpp_atomic_ops_linkable.cc,v 1.5 2017/01/11 12:10:26 joerg Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -58,19 +58,13 @@ private: volatile std::atomic<T> m_val; }; -#if defined(__clang__) && defined(__sparc64__) -#define NO_SHORT_ATOMICS -#endif - int main(int argc, char **argv) { -#ifndef NO_SHORT_ATOMICS ATest<char>(); ATest<signed char>(); ATest<unsigned char>(); ATest<short>(); ATest<unsigned short>(); -#endif ATest<int>(); ATest<unsigned int>(); ATest<long>(); @@ -79,29 +73,23 @@ int main(int argc, char **argv) ATest<long long>(); ATest<unsigned long long>(); #endif -#ifndef NO_SHORT_ATOMICS ATest<char16_t>(); -#endif ATest<char32_t>(); ATest<wchar_t>(); -#ifndef NO_SHORT_ATOMICS ATest<int_least8_t>(); ATest<uint_least8_t>(); ATest<int_least16_t>(); ATest<uint_least16_t>(); -#endif ATest<int_least32_t>(); ATest<uint_least32_t>(); #ifdef __HAVE_ATOMIC64_OPS ATest<int_least64_t>(); ATest<uint_least64_t>(); #endif -#ifndef NO_SHORT_ATOMICS ATest<int_fast8_t>(); ATest<uint_fast8_t>(); ATest<int_fast16_t>(); ATest<uint_fast16_t>(); -#endif ATest<int_fast32_t>(); ATest<uint_fast32_t>(); #ifdef __HAVE_ATOMIC64_OPS @@ -115,5 +103,5 @@ int main(int argc, char **argv) #ifdef __HAVE_ATOMIC64_OPS ATest<intmax_t>(); ATest<uintmax_t>(); -#endif /* NO_SHORT_ATOMICS */ +#endif } diff --git a/contrib/netbsd-tests/lib/libc/sys/t_access.c b/contrib/netbsd-tests/lib/libc/sys/t_access.c index 69d2df2..c537eca 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_access.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_access.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_access.c,v 2.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_access.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); + +#ifdef __FreeBSD__ +#include <sys/param.h> /* For __FreeBSD_version */ +#endif + +#include <atf-c.h> + +#include <sys/stat.h> #include <errno.h> #include <fcntl.h> @@ -38,13 +46,6 @@ __RCSID("$NetBSD: t_access.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); #include <stdlib.h> #include <unistd.h> -#include <atf-c.h> - -#ifdef __FreeBSD__ -#include <sys/param.h> -#include <sys/stat.h> -#endif - static const char path[] = "access"; static const int mode[4] = { R_OK, W_OK, X_OK, F_OK }; diff --git a/contrib/netbsd-tests/lib/libc/sys/t_chroot.c b/contrib/netbsd-tests/lib/libc/sys/t_chroot.c index 651dc10..1f1c49b 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_chroot.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_chroot.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $ */ +/* $NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,9 +29,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); +__RCSID("$NetBSD: t_chroot.c,v 1.2 2017/01/10 22:36:29 christos Exp $"); #include <sys/wait.h> +#include <sys/stat.h> #include <atf-c.h> #include <errno.h> @@ -42,10 +43,6 @@ __RCSID("$NetBSD: t_chroot.c,v 1.1 2011/07/07 06:57:53 jruoho Exp $"); #include <string.h> #include <unistd.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif - ATF_TC(chroot_basic); ATF_TC_HEAD(chroot_basic, tc) { diff --git a/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c b/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c new file mode 100644 index 0000000..8c1fd03 --- /dev/null +++ b/contrib/netbsd-tests/lib/libc/sys/t_clock_nanosleep.c @@ -0,0 +1,63 @@ +/* $NetBSD: t_clock_nanosleep.c,v 1.1 2016/11/11 15:30:44 njoly Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__RCSID("$NetBSD: t_clock_nanosleep.c,v 1.1 2016/11/11 15:30:44 njoly Exp $"); + +#include <atf-c.h> +#include <time.h> + +ATF_TC(clock_nanosleep_remain); +ATF_TC_HEAD(clock_nanosleep_remain, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Check clock_nanosleep(2) remaining time"); +} + +ATF_TC_BODY(clock_nanosleep_remain, tc) +{ + struct timespec rqtp, rmtp; + + rqtp.tv_sec = 0; rqtp.tv_nsec = 0; + rmtp.tv_sec = -1; rmtp.tv_nsec = -1; + ATF_REQUIRE(clock_nanosleep(CLOCK_REALTIME, 0, &rqtp, &rmtp) == 0); + ATF_CHECK(rmtp.tv_sec == 0 && rmtp.tv_nsec == 0); + + ATF_REQUIRE(clock_gettime(CLOCK_REALTIME, &rqtp) == 0); + rmtp.tv_sec = -1; rmtp.tv_nsec = -1; + ATF_REQUIRE(clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &rqtp, &rmtp) == 0); + ATF_CHECK(rmtp.tv_sec == -1 && rmtp.tv_nsec == -1); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, clock_nanosleep_remain); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c b/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c index aa5c4d5..f4ee96b 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_getrusage.c @@ -56,6 +56,10 @@ sighandler(int signo) /* Nothing. */ } +#ifdef __FreeBSD__ +#define asm __asm +#endif + static void work(void) { diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c index c31170f..ab8c33f 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mincore.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mincore.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $ */ +/* $NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -59,9 +59,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); +__RCSID("$NetBSD: t_mincore.c,v 1.9 2017/01/10 22:36:29 christos Exp $"); #include <sys/mman.h> +#include <sys/stat.h> #include <sys/shm.h> #include <atf-c.h> @@ -74,10 +75,6 @@ __RCSID("$NetBSD: t_mincore.c,v 1.8 2012/06/08 07:18:58 martin Exp $"); #include <unistd.h> #include <sys/resource.h> -#ifdef __FreeBSD__ -#include <sys/stat.h> -#endif - static long page = 0; static const char path[] = "mincore"; static size_t check_residency(void *, size_t); diff --git a/contrib/netbsd-tests/lib/libc/sys/t_mmap.c b/contrib/netbsd-tests/lib/libc/sys/t_mmap.c index 0ce4a84..738758c 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_mmap.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_mmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $ */ +/* $NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -55,10 +55,11 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); +__RCSID("$NetBSD: t_mmap.c,v 1.10 2017/01/10 22:36:29 christos Exp $"); #include <sys/param.h> #include <sys/mman.h> +#include <sys/stat.h> #include <sys/socket.h> #include <sys/sysctl.h> #include <sys/wait.h> @@ -78,7 +79,6 @@ __RCSID("$NetBSD: t_mmap.c,v 1.9 2015/02/28 13:57:08 martin Exp $"); #ifdef __FreeBSD__ #include <sys/disklabel.h> -#include <sys/stat.h> #include <stdint.h> #endif diff --git a/contrib/netbsd-tests/lib/libc/sys/t_wait.c b/contrib/netbsd-tests/lib/libc/sys/t_wait.c index 027c40d..8653265 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_wait.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_wait.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $ */ +/* $NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_wait.c,v 1.4 2016/04/27 21:14:24 christos Exp $"); +__RCSID("$NetBSD: t_wait.c,v 1.7 2016/11/06 15:04:14 kamil Exp $"); #include <sys/wait.h> #include <sys/resource.h> @@ -64,22 +64,6 @@ ATF_TC_BODY(wait6_invalid, tc) && errno == EINVAL); } -ATF_TC(wait6_noproc); -ATF_TC_HEAD(wait6_noproc, tc) -{ - atf_tc_set_md_var(tc, "descr", - "Test that wait6(2) returns ECHILD with for no processes"); -} - -ATF_TC_BODY(wait6_noproc, tc) -{ - siginfo_t si; - struct wrusage wru; - int st; - ATF_REQUIRE(wait6(P_ALL, 0, &st, WEXITED, &wru, &si) == -1 - && errno == ECHILD); -} - ATF_TC(wait6_exited); ATF_TC_HEAD(wait6_exited, tc) { @@ -96,12 +80,12 @@ ATF_TC_BODY(wait6_exited, tc) switch (pid = fork()) { case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); case 0: exit(0x5a5a5a5a); /*NOTREACHED*/ default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFEXITED(st) && WEXITSTATUS(st) == 0x5a); ATF_REQUIRE(si.si_status = 0x5a5a5a5a); ATF_REQUIRE(si.si_pid == pid); @@ -134,10 +118,10 @@ ATF_TC_BODY(wait6_terminated, tc) sleep(100); /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: ATF_REQUIRE(kill(pid, SIGTERM) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGTERM); ATF_REQUIRE(si.si_status == SIGTERM); ATF_REQUIRE(si.si_pid == pid); @@ -172,9 +156,9 @@ ATF_TC_BODY(wait6_coredumped, tc) *(char *)8 = 0; /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGSEGV && WCOREDUMP(st)); ATF_REQUIRE(si.si_status == SIGSEGV); @@ -210,11 +194,14 @@ ATF_TC_BODY(wait6_stop_and_go, tc) sleep(100); /*FALLTHROUGH*/ case -1: - ATF_REQUIRE(pid > 0); + ATF_REQUIRE(pid > 0); default: ATF_REQUIRE(kill(pid, SIGSTOP) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP); + ATF_REQUIRE(!WIFCONTINUED(st)); ATF_REQUIRE(si.si_status == SIGSTOP); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -225,8 +212,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc) #endif ATF_REQUIRE(kill(pid, SIGCONT) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); ATF_REQUIRE(WIFCONTINUED(st)); + ATF_REQUIRE(!WIFSTOPPED(st)); ATF_REQUIRE(si.si_status == SIGCONT); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -237,8 +227,11 @@ ATF_TC_BODY(wait6_stop_and_go, tc) #endif ATF_REQUIRE(kill(pid, SIGQUIT) == 0); - ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(!WIFCONTINUED(st)); ATF_REQUIRE(si.si_status == SIGQUIT); ATF_REQUIRE(si.si_pid == pid); ATF_REQUIRE(si.si_uid == getuid()); @@ -251,15 +244,80 @@ ATF_TC_BODY(wait6_stop_and_go, tc) } } +ATF_TC(wait6_stopgo_loop); +ATF_TC_HEAD(wait6_stopgo_loop, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait6(2) handled stopped/continued process loop"); +} + +ATF_TC_BODY(wait6_stopgo_loop, tc) +{ + siginfo_t si; + struct wrusage wru; + int st; + pid_t pid; + static const struct rlimit rl = { 0, 0 }; + size_t N = 100; + + ATF_REQUIRE(setrlimit(RLIMIT_CORE, &rl) == 0); + switch (pid = fork()) { + case 0: + sleep(100); + /*FALLTHROUGH*/ + case -1: + ATF_REQUIRE(pid > 0); + } + + printf("Before loop of SIGSTOP/SIGCONT sequence %zu times\n", N); + while (N --> 0) { + ATF_REQUIRE(kill(pid, SIGSTOP) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WSTOPPED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); + ATF_REQUIRE(WIFSTOPPED(st) && WSTOPSIG(st) == SIGSTOP); + ATF_REQUIRE(!WIFCONTINUED(st)); + ATF_REQUIRE(si.si_status == SIGSTOP); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_STOPPED); + + ATF_REQUIRE(kill(pid, SIGCONT) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WCONTINUED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(!WIFSIGNALED(st)); + ATF_REQUIRE(WIFCONTINUED(st)); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(si.si_status == SIGCONT); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_CONTINUED); + } + ATF_REQUIRE(kill(pid, SIGQUIT) == 0); + ATF_REQUIRE(wait6(P_PID, pid, &st, WEXITED, &wru, &si) == pid); + ATF_REQUIRE(!WIFEXITED(st)); + ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGQUIT); + ATF_REQUIRE(!WIFSTOPPED(st)); + ATF_REQUIRE(!WIFCONTINUED(st)); + ATF_REQUIRE(si.si_status == SIGQUIT); + ATF_REQUIRE(si.si_pid == pid); + ATF_REQUIRE(si.si_uid == getuid()); + ATF_REQUIRE(si.si_code == CLD_KILLED); +#ifdef __NetBSD__ + printf("user: %ju system: %ju\n", (uintmax_t)si.si_utime, + (uintmax_t)si.si_utime); +#endif +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, wait6_invalid); - ATF_TP_ADD_TC(tp, wait6_noproc); ATF_TP_ADD_TC(tp, wait6_exited); ATF_TP_ADD_TC(tp, wait6_terminated); ATF_TP_ADD_TC(tp, wait6_coredumped); ATF_TP_ADD_TC(tp, wait6_stop_and_go); + ATF_TP_ADD_TC(tp, wait6_stopgo_loop); return atf_no_error(); } diff --git a/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c new file mode 100644 index 0000000..e5ddcbd --- /dev/null +++ b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc.c @@ -0,0 +1,345 @@ +/* $NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__RCSID("$NetBSD: t_wait_noproc.c,v 1.5 2016/11/09 17:50:19 kamil Exp $"); + +#ifdef __FreeBSD__ +#include <sys/param.h> /* For NBBY -- it's in sys/types.h on NetBSD */ +#endif +#include <sys/wait.h> +#include <sys/resource.h> + +#include <errno.h> +#include <stdio.h> + +#include <atf-c.h> + +#ifndef TWAIT_OPTION +#define TWAIT_OPTION 0 +#endif + +#if TWAIT_OPTION == 0 +ATF_TC(wait); +ATF_TC_HEAD(wait, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait(2) returns ECHILD for no child"); +} + +ATF_TC_BODY(wait, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, wait(NULL) == -1); +} +#endif + +ATF_TC(waitpid); +ATF_TC_HEAD(waitpid, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that waitpid(2) returns ECHILD for WAIT_ANY and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(waitpid, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, waitpid(WAIT_ANY, NULL, TWAIT_OPTION) == -1); +} + +ATF_TC(waitid); +ATF_TC_HEAD(waitid, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that waitid(2) returns ECHILD for P_ALL and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(waitid, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, + waitid(P_ALL, 0, NULL, + WTRAPPED | WEXITED | TWAIT_OPTION) == -1); +} + +ATF_TC(wait3); +ATF_TC_HEAD(wait3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait3(2) returns ECHILD for no child"); +} + +ATF_TC_BODY(wait3, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, wait3(NULL, TWAIT_OPTION, NULL) == -1); +} + +ATF_TC(wait4); +ATF_TC_HEAD(wait4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait4(2) returns ECHILD for WAIT_ANY and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(wait4, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, + wait4(WAIT_ANY, NULL, TWAIT_OPTION, NULL) == -1); +} + +ATF_TC(wait6); +ATF_TC_HEAD(wait6, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait6(2) returns ECHILD for P_ALL and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(wait6, tc) +{ + ATF_REQUIRE_ERRNO(ECHILD, + wait6(P_ALL, 0, NULL, + WTRAPPED | WEXITED | TWAIT_OPTION, NULL, NULL) == -1); +} + +/* + * Generator of valid combinations of options + * Usage: i = 0; while ((o = get_options_wait6(i++)) != -1) {} + */ +static int +get_options6(size_t pos) +{ + int rv = 0; + size_t n; + + /* + * waitid(2) must specify at least one of WEXITED, WUNTRACED, + * WSTOPPED, WTRAPPED or WCONTINUED. Single option WNOWAIT + * isn't valid. + */ + + const int matrix[] = { + WNOWAIT, /* First in order to blacklist it easily */ + WEXITED, + WUNTRACED, + WSTOPPED, /* SUS compatibility, equal to WUNTRACED */ + WTRAPPED, + WCONTINUED + }; + + const size_t M = (1 << __arraycount(matrix)) - 1; + + /* Skip empty and sole WNOWAIT option */ + pos+=2; + + if (pos > M) + return -1; + + for (n = 0; n < __arraycount(matrix); n++) { + if (pos & __BIT(n)) + rv |= matrix[n]; + } + + return rv; +} + +/* + * Generator of valid combinations of options + * Usage: i = 0; while ((o = get_options_wait4(i++)) != -1) {} + */ +static int +get_options4(size_t pos) +{ + int rv = 0; + size_t n; + + const int special[] = { + 0, +#ifdef __NetBSD__ + WALLSIG, + WALTSIG, + __WALL, /* Linux compatibility, equal to WALLSIG */ + __WCLONE /* Linux compatibility, equal to WALTSIG */ +#endif + }; + + const int matrix[] = { + WNOWAIT, + WEXITED, + WUNTRACED, + WSTOPPED, /* SUS compatibility, equal to WUNTRACED */ + WTRAPPED, + WCONTINUED + }; + + const size_t M = (1 << __arraycount(special)) - 1; + + if (pos < __arraycount(special)) + return special[pos]; + + pos -= __arraycount(special); + + ++pos; /* Don't start with empty mask */ + + if (pos > M) + return -1; + + for (n = 0; n < __arraycount(special); n++) { + if (pos & __BIT(n)) + rv |= matrix[n]; + } + + return rv; +} + +ATF_TC(waitpid_options); +ATF_TC_HEAD(waitpid_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that waitpid(2) returns ECHILD for WAIT_ANY and valid " + "combination of options with%s WNOHANG", + TWAIT_OPTION == 0 ? "out" : ""); +} + +ATF_TC_BODY(waitpid_options, tc) +{ + size_t i = 0; + int o; + + while((o = get_options4(i++)) != -1) { + printf("Testing waitpid(2) with options %x\n", o); + + ATF_REQUIRE_ERRNO(ECHILD, + waitpid(WAIT_ANY, NULL, o | TWAIT_OPTION) == -1); + } +} + +ATF_TC(waitid_options); +ATF_TC_HEAD(waitid_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that waitid(2) returns ECHILD for P_ALL and valid " + "combination of options with%s WNOHANG", + TWAIT_OPTION == 0 ? "out" : ""); +} + +ATF_TC_BODY(waitid_options, tc) +{ + size_t i = 0; + int o; + + while((o = get_options6(i++)) != -1) { + printf("Testing waitid(2) with options %x\n", o); + + ATF_REQUIRE_ERRNO(ECHILD, + waitid(P_ALL, 0, NULL, o | TWAIT_OPTION) == -1); + } +} + +ATF_TC(wait3_options); +ATF_TC_HEAD(wait3_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait3(2) returns ECHILD for no child"); +} + +ATF_TC_BODY(wait3_options, tc) +{ + size_t i = 0; + int o; + + while((o = get_options4(i++)) != -1) { + printf("Testing wait3(2) with options %x\n", o); + + ATF_REQUIRE_ERRNO(ECHILD, + wait3(NULL, o | TWAIT_OPTION, NULL) == -1); + } +} + +ATF_TC(wait4_options); +ATF_TC_HEAD(wait4_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait4(2) returns ECHILD for WAIT_ANY and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(wait4_options, tc) +{ + size_t i = 0; + int o; + + while((o = get_options4(i++)) != -1) { + printf("Testing wait4(2) with options %x\n", o); + + ATF_REQUIRE_ERRNO(ECHILD, + wait4(WAIT_ANY, NULL, o | TWAIT_OPTION, NULL) == -1); + } +} + +ATF_TC(wait6_options); +ATF_TC_HEAD(wait6_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that wait6(2) returns ECHILD for P_ALL and option %s", + ___STRING(TWAIT_OPTION)); +} + +ATF_TC_BODY(wait6_options, tc) +{ + size_t i = 0; + int o; + + while((o = get_options6(i++)) != -1) { + printf("Testing wait6(2) with options %x\n", o); + + ATF_REQUIRE_ERRNO(ECHILD, + wait6(P_ALL, 0, NULL, o | TWAIT_OPTION, NULL, NULL) == -1); + } +} + +ATF_TP_ADD_TCS(tp) +{ + +#if TWAIT_OPTION == 0 + ATF_TP_ADD_TC(tp, wait); +#endif + ATF_TP_ADD_TC(tp, waitpid); + ATF_TP_ADD_TC(tp, waitid); + ATF_TP_ADD_TC(tp, wait3); + ATF_TP_ADD_TC(tp, wait4); + ATF_TP_ADD_TC(tp, wait6); + + ATF_TP_ADD_TC(tp, waitpid_options); + ATF_TP_ADD_TC(tp, waitid_options); + ATF_TP_ADD_TC(tp, wait3_options); + ATF_TP_ADD_TC(tp, wait4_options); + ATF_TP_ADD_TC(tp, wait6_options); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c new file mode 100644 index 0000000..45a9998 --- /dev/null +++ b/contrib/netbsd-tests/lib/libc/sys/t_wait_noproc_wnohang.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_wait_noproc_wnohang.c,v 1.1 2016/11/06 15:03:30 kamil Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TWAIT_OPTION WNOHANG +#include "t_wait_noproc.c" diff --git a/contrib/netbsd-tests/lib/libc/t_cdb.c b/contrib/netbsd-tests/lib/libc/t_cdb.c index 5e88e65..97da4a3 100644 --- a/contrib/netbsd-tests/lib/libc/t_cdb.c +++ b/contrib/netbsd-tests/lib/libc/t_cdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $ */ +/* $NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -32,9 +32,12 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_cdb.c,v 1.1 2012/09/27 00:38:57 joerg Exp $"); +__RCSID("$NetBSD: t_cdb.c,v 1.2 2017/01/10 22:24:29 christos Exp $"); #include <atf-c.h> + +#include <sys/stat.h> + #include <assert.h> #include <cdbr.h> #include <cdbw.h> diff --git a/contrib/netbsd-tests/lib/libm/t_casinh.c b/contrib/netbsd-tests/lib/libm/t_casinh.c new file mode 100644 index 0000000..f9f93c3 --- /dev/null +++ b/contrib/netbsd-tests/lib/libm/t_casinh.c @@ -0,0 +1,81 @@ +/* $NetBSD: t_casinh.c,v 1.2 2016/09/20 17:19:28 christos Exp $ */ + +/* + * Written by Maya Rashish + * Public domain. + * + * Testing special values of casinh + * Values from ISO/IEC 9899:201x G.6.2.2 + */ + +#include <atf-c.h> +#include <complex.h> +#include <math.h> + +#define RE(z) (((double *)(&z))[0]) +#define IM(z) (((double *)(&z))[1]) + +static const struct { + double input_re; + double input_im; + double result_re; + double result_im; +} values[] = { + { +0, +0, +0, +0}, + { +5.032E3, +INFINITY, +INFINITY, +M_PI/2}, + { +INFINITY, +5.023E3, +INFINITY, +0}, + { +INFINITY, +INFINITY, +INFINITY, +M_PI/4}, +#ifdef __HAVE_NANF + { +INFINITY, +NAN, +INFINITY, +NAN}, + { +5.032E3, +NAN, +NAN, +NAN}, /* + FE_INVALID optionally raised */ + { +NAN, +0, +NAN, +0}, + { +NAN, -5.023E3, +NAN, +NAN}, /* + FE_INVALID optionally raised */ + { +NAN, +INFINITY, +INFINITY, +NAN}, /* sign of real part of result unspecified */ + { +NAN, +NAN, +NAN, +NAN}, +#endif +}; + +#ifdef __HAVE_NANF +#define both_nan(a,b) (isnan(a) && isnan(b)) +#else +#define both_nan(a,b) 0 +#endif + +#define crude_equality(a,b) ((a == b) || both_nan(a,b)) + +#define ATF_COMPLEX_EQUAL(a,b) do { \ + complex double ci = casinh(a); \ + ATF_CHECK_MSG(crude_equality(creal(ci),creal(b)) && \ + crude_equality(cimag(ci), cimag(b)), \ + "for casinh([%g,%g]) = [%g,%g] != [%g,%g]", \ + creal(a), cimag(a), creal(ci), cimag(ci), creal(b), cimag(b)); \ +} while (0/*CONSTCOND*/) + + +ATF_TC(casinh); +ATF_TC_HEAD(casinh, tc) +{ + atf_tc_set_md_var(tc, "descr","Check casinh family - special values"); +} + +ATF_TC_BODY(casinh, tc) +{ + complex double input; + complex double result; + unsigned int i; + for (i = 0; i < __arraycount(values); i++) { + RE(input) = values[i].input_re; + IM(input) = values[i].input_im; + RE(result) = values[i].result_re; + IM(result) = values[i].result_im; + ATF_COMPLEX_EQUAL(input, result); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, casinh); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/lib/libm/t_fe_round.c b/contrib/netbsd-tests/lib/libm/t_fe_round.c new file mode 100644 index 0000000..fe805b4 --- /dev/null +++ b/contrib/netbsd-tests/lib/libm/t_fe_round.c @@ -0,0 +1,124 @@ +/* + * Written by Maya Rashish <maya@NetBSD.org> + * Public domain. + * + * Testing IEEE-754 rounding modes (and lrint) + */ + +#include <atf-c.h> +#include <fenv.h> +#ifdef __HAVE_FENV +#include <math.h> +#include <stdio.h> +#include <stdlib.h> + +/*#pragma STDC FENV_ACCESS ON gcc?? */ + +#define INT 9223L + +#define EPSILON 0.001 + +static const struct { + int round_mode; + double input; + long int expected; +} values[] = { + { FE_DOWNWARD, 3.7, 3}, + { FE_DOWNWARD, -3.7, -4}, + { FE_DOWNWARD, +0, 0}, + { FE_DOWNWARD, -INT-0.01, -INT-1}, + { FE_DOWNWARD, +INT-0.01, INT-1}, + { FE_DOWNWARD, -INT+0.01, -INT}, + { FE_DOWNWARD, +INT+0.01, INT}, +#if 0 /* cpu bugs? */ + { FE_DOWNWARD, -0, -1}, + + { FE_UPWARD, +0, 1}, +#endif + { FE_UPWARD, -0, 0}, + { FE_UPWARD, -123.7, -123}, + { FE_UPWARD, 123.999, 124}, + { FE_UPWARD, -INT-0.01, -INT}, + { FE_UPWARD, +INT-0.01, INT}, + { FE_UPWARD, -INT+0.01, -INT+1}, + { FE_UPWARD, +INT+0.01, INT+1}, + + { FE_TOWARDZERO, 1.99, 1}, + { FE_TOWARDZERO, -1.99, -1}, + { FE_TOWARDZERO, 0.2, 0}, + { FE_TOWARDZERO, INT+0.01, INT}, + { FE_TOWARDZERO, INT-0.01, INT - 1}, + { FE_TOWARDZERO, -INT+0.01, -INT + 1}, + { FE_TOWARDZERO, +0, 0}, + { FE_TOWARDZERO, -0, 0}, + + { FE_TONEAREST, -INT-0.01, -INT}, + { FE_TONEAREST, +INT-0.01, INT}, + { FE_TONEAREST, -INT+0.01, -INT}, + { FE_TONEAREST, +INT+0.01, INT}, + { FE_TONEAREST, -INT-0.501, -INT-1}, + { FE_TONEAREST, +INT-0.501, INT-1}, + { FE_TONEAREST, -INT+0.501, -INT+1}, + { FE_TONEAREST, +INT+0.501, INT+1}, + { FE_TONEAREST, +0, 0}, + { FE_TONEAREST, -0, 0}, +}; + +ATF_TC(fe_round); +ATF_TC_HEAD(fe_round, tc) +{ + atf_tc_set_md_var(tc, "descr","Checking IEEE 754 rounding modes using lrint"); +} + +ATF_TC_BODY(fe_round, tc) +{ + long int received; + + for (unsigned int i = 0; i < __arraycount(values); i++) { + fesetround(values[i].round_mode); + + received = lrint(values[i].input); + ATF_CHECK_MSG( + (labs(received - values[i].expected) < EPSILON), + "lrint rounding wrong, difference too large\n" + "input: %f (index %d): got %ld, expected %ld\n", + values[i].input, i, received, values[i].expected); + + /* Do we get the same rounding mode out? */ + ATF_CHECK_MSG( + (fegetround() == values[i].round_mode), + "Didn't get the same rounding mode out!\n" + "(index %d) fed in %d rounding mode, got %d out\n", + i, fegetround(), values[i].round_mode); + } +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fe_round); + + return atf_no_error(); +} +#else +ATF_TC(t_nofe_round); + +ATF_TC_HEAD(t_nofe_round, tc) +{ + atf_tc_set_md_var(tc, "descr", + "dummy test case - no fenv.h support"); +} + + +ATF_TC_BODY(t_nofe_round, tc) +{ + atf_tc_skip("no fenv.h support on this architecture"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, t_nofe_round); + return atf_no_error(); +} + +#endif diff --git a/contrib/netbsd-tests/lib/libm/t_ilogb.c b/contrib/netbsd-tests/lib/libm/t_ilogb.c new file mode 100644 index 0000000..b3c2126 --- /dev/null +++ b/contrib/netbsd-tests/lib/libm/t_ilogb.c @@ -0,0 +1,130 @@ +/* $NetBSD: t_ilogb.c,v 1.6 2016/08/26 08:01:55 christos Exp $ */ + +/*- + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Maya Rashish. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __FreeBSD__ +#include <limits.h> +#endif +#include <atf-c.h> +#include <fenv.h> +#include <math.h> + +#ifndef __HAVE_FENV + +# define ATF_CHECK_RAISED_INVALID +# define ATF_CHECK_RAISED_NOTHING + +#else +# define ATF_CHECK_RAISED_INVALID do { \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == FE_INVALID, "r=%#x != %#x\n", r, FE_INVALID); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ +} while (/*CONSTCOND*/0) + +# define ATF_CHECK_RAISED_NOTHING do { \ + int r = fetestexcept(FE_ALL_EXCEPT); \ + ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \ + (void)feclearexcept(FE_ALL_EXCEPT); \ +} while (/*CONSTCOND*/0) +#endif + +ATF_TC(ilogb); +ATF_TC_HEAD(ilogb, tc) +{ + atf_tc_set_md_var(tc, "descr","Check ilogb family"); +} + +ATF_TC_BODY(ilogb, tc) +{ + + ATF_CHECK(ilogbf(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(-0) == FP_ILOGB0); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(-INFINITY) == INT_MAX); + ATF_CHECK_RAISED_INVALID; +#endif + + ATF_CHECK(ilogbf(1024) == 10); + ATF_CHECK_RAISED_NOTHING; + ATF_CHECK(ilogb(1024) == 10); + ATF_CHECK_RAISED_NOTHING; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(1024) == 10); + ATF_CHECK_RAISED_NOTHING; +#endif + +#ifndef __vax__ + ATF_CHECK(ilogbf(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; + ATF_CHECK(ilogb(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; +#ifdef __HAVE_LONG_DOUBLE + ATF_CHECK(ilogbl(NAN) == FP_ILOGBNAN); + ATF_CHECK_RAISED_INVALID; +#endif +#endif +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, ilogb); + + return atf_no_error(); +} diff --git a/contrib/netbsd-tests/lib/libm/t_ldexp.c b/contrib/netbsd-tests/lib/libm/t_ldexp.c index eaf8a4b..251f2ae 100644 --- a/contrib/netbsd-tests/lib/libm/t_ldexp.c +++ b/contrib/netbsd-tests/lib/libm/t_ldexp.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */ +/* $NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $"); +__RCSID("$NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $"); #include <sys/param.h> @@ -96,10 +96,12 @@ struct ldexp_test ldexp_overflow[] = { { 1.0, 1023, 1, " inf" }, { 1.0, -1022, 2046, " inf" }, { 1.0, 1025, SKIP, " inf" }, + { 2.0, INT_MAX,SKIP, " inf" }, { -1.0, 1024, SKIP, " -inf" }, { -1.0, 1023, 1, " -inf" }, { -1.0, -1022, 2046, " -inf" }, { -1.0, 1025, SKIP, " -inf" }, + { -2.0, INT_MAX,SKIP, " -inf" }, { 0, 0, 0, NULL } }; @@ -170,10 +172,8 @@ run_test(struct ldexp_test *table) v = ldexp(table->x, table->exp1); - if (table->exp2 == SKIP) - continue; - - v = ldexp(v, table->exp2); + if (table->exp2 != SKIP) + v = ldexp(v, table->exp2); (void)snprintf(outbuf, sizeof(outbuf), FORMAT, v); diff --git a/contrib/netbsd-tests/lib/libm/t_precision.c b/contrib/netbsd-tests/lib/libm/t_precision.c index c01deba..df2d8a3 100644 --- a/contrib/netbsd-tests/lib/libm/t_precision.c +++ b/contrib/netbsd-tests/lib/libm/t_precision.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $ */ +/* $NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $"); +__RCSID("$NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $"); #include <atf-c.h> @@ -45,7 +45,9 @@ ATF_TC_HEAD(t_precision, tc) } volatile double x = 1; +#if __HAVE_LONG_DOUBLE volatile long double y = 1; +#endif ATF_TC_BODY(t_precision, tc) { @@ -58,7 +60,7 @@ ATF_TC_BODY(t_precision, tc) x += DBL_EPSILON; ATF_CHECK(x == 2.0); -#if !defined(__FreeBSD__) || !defined(__i386__) +#if __HAVE_LONG_DOUBLE y += LDBL_EPSILON; ATF_CHECK(y != 1.0L); y -= 1; diff --git a/contrib/netbsd-tests/lib/libpthread/h_common.h b/contrib/netbsd-tests/lib/libpthread/h_common.h index f4d03bc..2e8b0a1 100644 --- a/contrib/netbsd-tests/lib/libpthread/h_common.h +++ b/contrib/netbsd-tests/lib/libpthread/h_common.h @@ -9,4 +9,10 @@ ATF_REQUIRE_MSG(ret == 0, "%s: %s", #x, strerror(ret)); \ } while (0) +#define PTHREAD_REQUIRE_STATUS(x, v) \ + do { \ + int ret = (x); \ + ATF_REQUIRE_MSG(ret == (v), "%s: %s", #x, strerror(ret)); \ + } while (0) + #endif // H_COMMON_H diff --git a/contrib/netbsd-tests/lib/libpthread/t_mutex.c b/contrib/netbsd-tests/lib/libpthread/t_mutex.c index 1fcd69e..b8d60e6 100644 --- a/contrib/netbsd-tests/lib/libpthread/t_mutex.c +++ b/contrib/netbsd-tests/lib/libpthread/t_mutex.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_mutex.c,v 1.10 2016/07/31 13:01:29 christos Exp $ */ +/* $NetBSD: t_mutex.c,v 1.14 2016/10/31 23:51:20 christos Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,12 +29,17 @@ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_mutex.c,v 1.10 2016/07/31 13:01:29 christos Exp $"); +__RCSID("$NetBSD: t_mutex.c,v 1.14 2016/10/31 23:51:20 christos Exp $"); +#ifdef __FreeBSD__ +#include <sys/time.h> /* For timespecadd */ +#include <inttypes.h> /* For UINT16_MAX */ +#endif #include <pthread.h> #include <stdio.h> #include <string.h> #include <errno.h> +#include <time.h> #include <unistd.h> #include <sys/sched.h> #include <sys/param.h> @@ -47,6 +52,31 @@ static pthread_mutex_t mutex; static pthread_mutex_t static_mutex = PTHREAD_MUTEX_INITIALIZER; static int global_x; +#ifdef TIMEDMUTEX +/* This code is used for verifying non-timed specific code */ +static struct timespec ts_lengthy = { + .tv_sec = UINT16_MAX, + .tv_nsec = 0 +}; +/* This code is used for verifying timed-only specific code */ +static struct timespec ts_shortlived = { + .tv_sec = 0, + .tv_nsec = 120 +}; + +static int +mutex_lock(pthread_mutex_t *m, const struct timespec *ts) +{ + struct timespec ts_wait; + ATF_REQUIRE(clock_gettime(CLOCK_REALTIME, &ts_wait) != -1); + timespecadd(&ts_wait, ts, &ts_wait); + + return pthread_mutex_timedlock(m, &ts_wait); +} +#else +#define mutex_lock(a, b) pthread_mutex_lock(a) +#endif + static void * mutex1_threadfunc(void *arg) { @@ -56,7 +86,7 @@ mutex1_threadfunc(void *arg) param = arg; printf("2: Locking mutex\n"); - pthread_mutex_lock(&mutex); + mutex_lock(&mutex, &ts_lengthy); printf("2: Got mutex. *param = %d\n", *param); ATF_REQUIRE_EQ(*param, 20); (*param)++; @@ -81,7 +111,7 @@ ATF_TC_BODY(mutex1, tc) PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); x = 1; - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); PTHREAD_REQUIRE(pthread_create(&new, NULL, mutex1_threadfunc, &x)); printf("1: Before changing the value.\n"); sleep(2); @@ -92,7 +122,7 @@ ATF_TC_BODY(mutex1, tc) printf("1: After releasing the mutex.\n"); PTHREAD_REQUIRE(pthread_join(new, &joinval)); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); printf("1: Thread joined. X was %d. Return value (int) was %d\n", x, *(int *)joinval); ATF_REQUIRE_EQ(x, 21); @@ -108,7 +138,7 @@ mutex2_threadfunc(void *arg) printf("2: Second thread (%p). Count is %ld\n", pthread_self(), count); while (count--) { - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); global_x++; PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); } @@ -145,7 +175,7 @@ ATF_TC_BODY(mutex2, tc) global_x = 0; count = count2 = 10000000; - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); PTHREAD_REQUIRE(pthread_create(&new, NULL, mutex2_threadfunc, &count2)); printf("1: Thread %p\n", pthread_self()); @@ -153,14 +183,14 @@ ATF_TC_BODY(mutex2, tc) PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); while (count--) { - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); global_x++; PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); } PTHREAD_REQUIRE(pthread_join(new, &joinval)); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); printf("1: Thread joined. X was %d. Return value (long) was %ld\n", global_x, (long)joinval); ATF_REQUIRE_EQ(global_x, 20000000); @@ -184,7 +214,7 @@ mutex3_threadfunc(void *arg) printf("2: Second thread (%p). Count is %ld\n", pthread_self(), count); while (count--) { - PTHREAD_REQUIRE(pthread_mutex_lock(&static_mutex)); + PTHREAD_REQUIRE(mutex_lock(&static_mutex, &ts_lengthy)); global_x++; PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex)); } @@ -220,7 +250,7 @@ ATF_TC_BODY(mutex3, tc) global_x = 0; count = count2 = 10000000; - PTHREAD_REQUIRE(pthread_mutex_lock(&static_mutex)); + PTHREAD_REQUIRE(mutex_lock(&static_mutex, &ts_lengthy)); PTHREAD_REQUIRE(pthread_create(&new, NULL, mutex3_threadfunc, &count2)); printf("1: Thread %p\n", pthread_self()); @@ -228,14 +258,14 @@ ATF_TC_BODY(mutex3, tc) PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex)); while (count--) { - PTHREAD_REQUIRE(pthread_mutex_lock(&static_mutex)); + PTHREAD_REQUIRE(mutex_lock(&static_mutex, &ts_lengthy)); global_x++; PTHREAD_REQUIRE(pthread_mutex_unlock(&static_mutex)); } PTHREAD_REQUIRE(pthread_join(new, &joinval)); - PTHREAD_REQUIRE(pthread_mutex_lock(&static_mutex)); + PTHREAD_REQUIRE(mutex_lock(&static_mutex, &ts_lengthy)); printf("1: Thread joined. X was %d. Return value (long) was %ld\n", global_x, (long)joinval); ATF_REQUIRE_EQ(global_x, 20000000); @@ -260,7 +290,7 @@ mutex4_threadfunc(void *arg) param = arg; printf("2: Locking mutex\n"); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); printf("2: Got mutex. *param = %d\n", *param); (*param)++; @@ -291,11 +321,11 @@ ATF_TC_BODY(mutex4, tc) PTHREAD_REQUIRE(pthread_mutexattr_destroy(&mattr)); x = 1; - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); PTHREAD_REQUIRE(pthread_create(&new, NULL, mutex4_threadfunc, &x)); printf("1: Before recursively acquiring the mutex.\n"); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); printf("1: Before releasing the mutex once.\n"); sleep(2); @@ -311,7 +341,7 @@ ATF_TC_BODY(mutex4, tc) PTHREAD_REQUIRE(pthread_join(new, &joinval)); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); printf("1: Thread joined. X was %d. Return value (int) was %d\n", x, *(int *)joinval); ATF_REQUIRE_EQ(x, 21); @@ -333,7 +363,7 @@ child_func(void* arg) res = _sched_protect(-2); ATF_REQUIRE_EQ_MSG(res, -1, "sched_protect returned %d", res); ATF_REQUIRE_EQ(errno, ENOENT); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex5)); + PTHREAD_REQUIRE(mutex_lock(&mutex5, &ts_lengthy)); printf("child is owning resource\n"); res = _sched_protect(-2); ATF_REQUIRE_EQ(res, max_fifo_prio); @@ -376,7 +406,7 @@ ATF_TC_BODY(mutex5, tc) max_fifo_prio)); PTHREAD_REQUIRE(pthread_mutex_init(&mutex5, &attr5)); - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex5)); + PTHREAD_REQUIRE(mutex_lock(&mutex5, &ts_lengthy)); printf("enter critical section for main\n"); PTHREAD_REQUIRE(pthread_create(&child, NULL, child_func, NULL)); printf("main starts to sleep\n"); @@ -414,7 +444,7 @@ high_prio(void* arg) high_cnt = 0; sleep(1); } - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex6)); + PTHREAD_REQUIRE(mutex_lock(&mutex6, &ts_lengthy)); if (start == 0) start = 2; PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex6)); @@ -446,7 +476,7 @@ low_prio(void* arg) low_cnt = 0; sleep(1); } - PTHREAD_REQUIRE(pthread_mutex_lock(&mutex6)); + PTHREAD_REQUIRE(mutex_lock(&mutex6, &ts_lengthy)); if (start == 0) start = 1; PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex6)); @@ -582,6 +612,123 @@ ATF_TC_BODY(mutexattr2, tc) } } +#ifdef TIMEDMUTEX +ATF_TC(timedmutex1); +ATF_TC_HEAD(timedmutex1, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks timeout on selflock"); +} + +ATF_TC_BODY(timedmutex1, tc) +{ + + printf("Timed mutex-test 1\n"); + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + + printf("Before acquiring mutex\n"); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + printf("Before endeavor to reacquire timed-mutex (timeout expected)\n"); + PTHREAD_REQUIRE_STATUS(mutex_lock(&mutex, &ts_shortlived), + ETIMEDOUT); + + printf("Unlocking mutex\n"); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); +} + +ATF_TC(timedmutex2); +ATF_TC_HEAD(timedmutex2, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks timeout on selflock with timedlock"); +} + +ATF_TC_BODY(timedmutex2, tc) +{ + + printf("Timed mutex-test 2\n"); + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + + printf("Before acquiring mutex with timedlock\n"); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); + + printf("Before endeavor to reacquire timed-mutex (timeout expected)\n"); + PTHREAD_REQUIRE_STATUS(mutex_lock(&mutex, &ts_shortlived), + ETIMEDOUT); + + printf("Unlocking mutex\n"); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); +} + +ATF_TC(timedmutex3); +ATF_TC_HEAD(timedmutex3, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks timeout on selflock in a new thread"); +} + +static void * +timedmtx_thrdfunc(void *arg) +{ + printf("Before endeavor to reacquire timed-mutex (timeout expected)\n"); + PTHREAD_REQUIRE_STATUS(mutex_lock(&mutex, &ts_shortlived), + ETIMEDOUT); + + return NULL; +} + +ATF_TC_BODY(timedmutex3, tc) +{ + pthread_t new; + + printf("Timed mutex-test 3\n"); + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + + printf("Before acquiring mutex with timedlock\n"); + PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); + + printf("Before creating new thread\n"); + PTHREAD_REQUIRE(pthread_create(&new, NULL, timedmtx_thrdfunc, NULL)); + + printf("Before joining the mutex\n"); + PTHREAD_REQUIRE(pthread_join(new, NULL)); + + printf("Unlocking mutex\n"); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); +} + +ATF_TC(timedmutex4); +ATF_TC_HEAD(timedmutex4, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Checks timeout on selflock with timedlock in a new thread"); +} + +ATF_TC_BODY(timedmutex4, tc) +{ + pthread_t new; + + printf("Timed mutex-test 4\n"); + + PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); + + printf("Before acquiring mutex with timedlock\n"); + PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); + + printf("Before creating new thread\n"); + PTHREAD_REQUIRE(pthread_create(&new, NULL, timedmtx_thrdfunc, NULL)); + + printf("Before joining the mutex\n"); + PTHREAD_REQUIRE(pthread_join(new, NULL)); + + printf("Unlocking mutex\n"); + PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); +} +#endif + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, mutex1); @@ -594,6 +741,13 @@ ATF_TP_ADD_TCS(tp) #endif ATF_TP_ADD_TC(tp, mutexattr1); ATF_TP_ADD_TC(tp, mutexattr2); - + +#ifdef TIMEDMUTEX + ATF_TP_ADD_TC(tp, timedmutex1); + ATF_TP_ADD_TC(tp, timedmutex2); + ATF_TP_ADD_TC(tp, timedmutex3); + ATF_TP_ADD_TC(tp, timedmutex4); +#endif + return atf_no_error(); } diff --git a/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c b/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c new file mode 100644 index 0000000..4f71acd --- /dev/null +++ b/contrib/netbsd-tests/lib/libpthread/t_timedmutex.c @@ -0,0 +1,30 @@ +/* $NetBSD: t_timedmutex.c,v 1.2 2016/10/31 16:21:23 christos Exp $ */ + +/* + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define TIMEDMUTEX +#include "t_mutex.c" diff --git a/contrib/netbsd-tests/lib/librumpclient/h_execthr.c b/contrib/netbsd-tests/lib/librumpclient/h_execthr.c index f653fe6..c209375 100644 --- a/contrib/netbsd-tests/lib/librumpclient/h_execthr.c +++ b/contrib/netbsd-tests/lib/librumpclient/h_execthr.c @@ -1,4 +1,4 @@ -/* $NetBSD: h_execthr.c,v 1.3 2014/08/13 00:03:00 pooka Exp $ */ +/* $NetBSD: h_execthr.c,v 1.7 2016/11/24 00:37:29 dholland Exp $ */ /* * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -42,6 +42,14 @@ #include <rump/rumpclient.h> #include <rump/rump_syscalls.h> +//#define VERBOSE + +#ifdef VERBOSE +#define SAY(...) printf(__VA_ARGS__) +#else +#define SAY(...) +#endif + static int canreturn = 0; /* @@ -103,6 +111,7 @@ main(int argc, char *argv[], char *envp[]) else execd = 0; sprintf(nexec, "%d", execd+1); + SAY("execd: %d\n", execd); if (rumpclient_init() == -1) { if (execd) @@ -111,33 +120,43 @@ main(int argc, char *argv[], char *envp[]) err(1, "init"); } mypid = rump_sys_getpid(); + SAY("rumpclient_init finished.\n"); if (execd) { canreturn = 1; - if (pthread_create(&pt, NULL, - wrk, (void *)(uintptr_t)P2_0) != 0) - errx(1, "exec pthread_create"); + errno = pthread_create(&pt, NULL, + wrk, (void *)(uintptr_t)P2_0); + if (errno != 0) + err(1, "exec pthread_create"); + SAY("startup pthread_create finished.\n"); i = 37; rump_sys_write(P2_1, &i, sizeof(i)); pthread_join(pt, NULL); + SAY("startup pthread_join finished.\n"); n = rump_sys_read(P1_0, &i, sizeof(i)); if (n != -1 || errno != EBADF) errx(1, "post-exec cloexec works"); + SAY("startup rump_sys_read finished.\n"); getproc(mypid, &p); + SAY("startup getproc finished.\n"); if (p.p_nlwps != 2) errx(1, "invalid nlwps: %lld", (long long)p.p_nlwps); /* we passed? */ - if (execd > 10) + if (execd > 10) { + SAY("done.\n"); exit(0); + } rump_sys_close(P2_0); rump_sys_close(P2_1); } + SAY("making pipes...\n"); + if (rump_sys_pipe(p1) == -1) err(1, "pipe1"); if (p1[0] != P1_0 || p1[1] != P1_1) @@ -151,32 +170,47 @@ main(int argc, char *argv[], char *envp[]) if (rump_sys_fcntl(p1[1], F_SETFD, FD_CLOEXEC) == -1) err(1, "cloexec"); - for (i = 0; i < NTHR; i++) - if (pthread_create(&pt, NULL, - wrk, (void *)(uintptr_t)p1[0]) != 0) - errx(1, "pthread_create 1 %d", i); + SAY("making threads...\n"); + + for (i = 0; i < NTHR; i++) { + errno = pthread_create(&pt, NULL, + wrk, (void *)(uintptr_t)p1[0]); + if (errno != 0) + err(1, "pthread_create 1 %d", i); + } + + for (i = 0; i < NTHR; i++) { + errno = pthread_create(&pt, NULL, + wrk, (void *)(uintptr_t)p2[0]); + if (errno != 0) + err(1, "pthread_create 2 %d", i); + } - for (i = 0; i < NTHR; i++) - if (pthread_create(&pt, NULL, - wrk, (void *)(uintptr_t)p2[0]) != 0) - errx(1, "pthread_create 2 %d", i); + SAY("waiting for threads to start...\n"); /* wait for all the threads to be enjoying themselves */ for (;;) { getproc(mypid, &p); + SAY("getproc finished.\n"); if (p.p_nlwps == 2*NTHR + 2) break; usleep(10000); } + SAY("making some more threads start...\n"); + /* * load up one more (big) set. these won't start executing, though, * but we're interested in if they create blockage */ - for (i = 0; i < 3*NTHR; i++) - if (pthread_create(&pt, NULL, - wrk, (void *)(uintptr_t)p1[0]) != 0) - errx(1, "pthread_create 1 %d", i); + for (i = 0; i < 3*NTHR; i++) { + errno = pthread_create(&pt, NULL, + wrk, (void *)(uintptr_t)p1[0]); + if (errno != 0) + err(1, "pthread_create 3 %d", i); + } + + SAY("calling exec...\n"); /* then, we exec! */ execarg[0] = argv[0]; diff --git a/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh b/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh index 718dfdc..411be33 100755 --- a/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh +++ b/contrib/netbsd-tests/lib/librumphijack/t_tcpip.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpip.sh,v 1.17 2016/08/11 21:29:44 kre Exp $ +# $NetBSD: t_tcpip.sh,v 1.18 2016/08/13 11:22:11 christos Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,7 +25,8 @@ # POSSIBILITY OF SUCH DAMAGE. # -rumpnetsrv='rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpdev' +rumpnetlibs="-lrumpnet -lrumpnet_net -lrumpnet_netinet6 -lrumpnet_netinet" +rumpnetsrv="rump_server $rumpnetlibs -lrumpdev" export RUMP_SERVER=unix://csock atf_test_case http cleanup @@ -37,7 +38,7 @@ http_head() http_body() { - atf_check -s exit:0 ${rumpnetsrv} -lrumpnet_netinet6 ${RUMP_SERVER} + atf_check -s exit:0 ${rumpnetsrv} ${RUMP_SERVER} # start bozo in daemon mode atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \ diff --git a/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c b/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c index f20652a..2766da2 100644 --- a/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c +++ b/contrib/netbsd-tests/lib/libusbhid/t_usbhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_usbhid.c,v 1.11 2016/01/07 16:10:49 jakllsch Exp $ */ +/* $NetBSD: t_usbhid.c,v 1.12 2016/08/17 12:10:42 jakllsch Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_usbhid.c,v 1.11 2016/01/07 16:10:49 jakllsch Exp $"); +__RCSID("$NetBSD: t_usbhid.c,v 1.12 2016/08/17 12:10:42 jakllsch Exp $"); #include <atf-c.h> @@ -244,6 +244,9 @@ ATF_TC_BODY(check_hid_get_data, tc) int32_t data; uint32_t udat; + atf_tc_expect_fail("only the 32-bit opcode works, " + "8 and 16-bit is broken"); + ATF_REQUIRE((hrd = hid_use_report_desc( range_test_report_descriptor, __arraycount(range_test_report_descriptor))) != NULL); diff --git a/contrib/netbsd-tests/net/arp/t_arp.sh b/contrib/netbsd-tests/net/arp/t_arp.sh index ab55eb3..04e2f70 100755 --- a/contrib/netbsd-tests/net/arp/t_arp.sh +++ b/contrib/netbsd-tests/net/arp/t_arp.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_arp.sh,v 1.16 2016/06/21 05:04:16 ozaki-r Exp $ +# $NetBSD: t_arp.sh,v 1.22 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,10 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -inetserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif" -inetserver="$inetserver -lrumpdev -lrumpnet_tap" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCKSRC=unix://commsock1 SOCKDST=unix://commsock2 IP4SRC=10.0.1.1 @@ -36,7 +32,7 @@ IP4DST=10.0.1.2 IP4DST_PROXYARP1=10.0.1.3 IP4DST_PROXYARP2=10.0.1.4 -DEBUG=false +DEBUG=${DEBUG:-false} TIMEOUT=1 atf_test_case arp_cache_expiration_5s cleanup @@ -106,9 +102,9 @@ arp_static_head() setup_dst_server() { + + rump_server_add_iface $SOCKDST shmif0 bus1 export RUMP_SERVER=$SOCKDST - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 atf_check -s exit:0 rump.ifconfig shmif0 inet $IP4DST/24 atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 @@ -127,8 +123,7 @@ setup_src_server() atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.arp.keep=$keep # Setup an interface - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + rump_server_add_iface $SOCKSRC shmif0 bus1 atf_check -s exit:0 rump.ifconfig shmif0 inet $IP4SRC/24 atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 @@ -145,8 +140,8 @@ test_cache_expiration() local arp_keep=$1 local bonus=2 - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST setup_dst_server setup_src_server $arp_keep @@ -172,12 +167,16 @@ test_cache_expiration() arp_cache_expiration_5s_body() { + test_cache_expiration 5 + rump_server_destroy_ifaces } arp_cache_expiration_10s_body() { + test_cache_expiration 10 + rump_server_destroy_ifaces } arp_command_body() @@ -185,8 +184,8 @@ arp_command_body() local arp_keep=5 local bonus=2 - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST setup_dst_server setup_src_server $arp_keep @@ -257,7 +256,7 @@ arp_command_body() $DEBUG && rump.arp -n -a #atf_check -s not-exit:0 -e ignore rump.arp -n 10.0.1.10 - return 0 + rump_server_destroy_ifaces } make_pkt_str_arpreq() @@ -273,12 +272,12 @@ arp_garp_body() { local pkt= - atf_check -s exit:0 ${inetserver} $SOCKSRC + rump_server_start $SOCKSRC + export RUMP_SERVER=$SOCKSRC # Setup an interface - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + rump_server_add_iface $SOCKSRC shmif0 bus1 atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.1/24 atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.2/24 alias atf_check -s exit:0 rump.ifconfig shmif0 up @@ -304,6 +303,8 @@ arp_garp_body() atf_check -s not-exit:0 -x "cat ./out |grep -q '$pkt'" pkt=$(make_pkt_str_arpreq 10.0.0.4 10.0.0.4) atf_check -s not-exit:0 -x "cat ./out |grep -q '$pkt'" + + rump_server_destroy_ifaces } arp_cache_overwriting_body() @@ -311,8 +312,8 @@ arp_cache_overwriting_body() local arp_keep=5 local bonus=2 - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST setup_dst_server setup_src_server $arp_keep @@ -341,7 +342,7 @@ arp_cache_overwriting_body() atf_check -s exit:0 -o match:'b2:a0:20:00:00:ff' rump.arp -n 10.0.1.10 $DEBUG && rump.arp -n -a - return 0 + rump_server_destroy_ifaces } make_pkt_str_arprep() @@ -363,36 +364,21 @@ make_pkt_str_garp() echo $pkt } -extract_new_packets() -{ - local old=./old - - if [ ! -f $old ]; then - old=/dev/null - fi - - shmif_dumpbus -p - bus1 2>/dev/null| \ - tcpdump -n -e -r - 2>/dev/null > ./new - diff -u $old ./new |grep '^+' |cut -d '+' -f 2 > ./diff - mv -f ./new ./old - cat ./diff -} - test_proxy_arp() { local arp_keep=5 local opts= title= flags= local type=$1 - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST tap setup_dst_server setup_src_server $arp_keep export RUMP_SERVER=$SOCKDST atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.ip.forwarding=1 - macaddr_dst=$(rump.ifconfig shmif0 |awk '/address/ {print $2;}') + macaddr_dst=$(get_macaddr $SOCKDST shmif0) if [ "$type" = "pub" ]; then opts="pub" @@ -416,7 +402,7 @@ test_proxy_arp() rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1 # Flushing - extract_new_packets > ./out + extract_new_packets bus1 > ./out # Set up proxy ARP entry export RUMP_SERVER=$SOCKDST @@ -435,7 +421,7 @@ test_proxy_arp() rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP1 fi - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt1=$(make_pkt_str_arprep $IP4DST_PROXYARP1 $macaddr_dst) @@ -461,7 +447,7 @@ test_proxy_arp() atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -n -w 1 -c 1 $IP4DST_PROXYARP2 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # ARP reply should be sent @@ -482,12 +468,14 @@ arp_proxy_arp_pub_body() { test_proxy_arp pub + rump_server_destroy_ifaces } arp_proxy_arp_pubproxy_body() { test_proxy_arp pubproxy + rump_server_destroy_ifaces } arp_link_activation_body() @@ -495,14 +483,14 @@ arp_link_activation_body() local arp_keep=5 local bonus=2 - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST setup_dst_server setup_src_server $arp_keep # flush old packets - extract_new_packets > ./out + extract_new_packets bus1 > ./out export RUMP_SERVER=$SOCKSRC @@ -510,7 +498,7 @@ arp_link_activation_body() b2:a1:00:00:00:01 atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt=$(make_pkt_str_arpreq $IP4SRC $IP4SRC) @@ -520,12 +508,14 @@ arp_link_activation_body() b2:a1:00:00:00:02 active atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt=$(make_pkt_str_arpreq $IP4SRC $IP4SRC) atf_check -s exit:0 -x \ "cat ./out |grep '$pkt' |grep -q 'b2:a1:00:00:00:02'" + + rump_server_destroy_ifaces } arp_static_body() @@ -533,14 +523,13 @@ arp_static_body() local arp_keep=5 local macaddr_src= - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKDST setup_dst_server setup_src_server $arp_keep - export RUMP_SERVER=$SOCKSRC - macaddr_src=$(rump.ifconfig shmif0 |awk '/address/ {print $2;}') + macaddr_src=$(get_macaddr $SOCKSRC shmif0) # Set a (valid) static ARP entry for the src server export RUMP_SERVER=$SOCKDST @@ -551,37 +540,8 @@ arp_static_body() # Test receiving an ARP request with the static ARP entry (as spa/sha) export RUMP_SERVER=$SOCKSRC atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 $IP4DST -} -cleanup() -{ - env RUMP_SERVER=$SOCKSRC rump.halt - env RUMP_SERVER=$SOCKDST rump.halt -} - -dump_src() -{ - export RUMP_SERVER=$SOCKSRC - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} - -dump_dst() -{ - export RUMP_SERVER=$SOCKDST - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} - -dump() -{ - dump_src - dump_dst - shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - + rump_server_destroy_ifaces } arp_cache_expiration_5s_cleanup() @@ -604,9 +564,8 @@ arp_command_cleanup() arp_garp_cleanup() { - $DEBUG && dump_src - $DEBUG && shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - - env RUMP_SERVER=$SOCKSRC rump.halt + $DEBUG && dump + cleanup } arp_cache_overwriting_cleanup() diff --git a/contrib/netbsd-tests/net/arp/t_dad.sh b/contrib/netbsd-tests/net/arp/t_dad.sh index aefcb0b..57a7d4b0 100755 --- a/contrib/netbsd-tests/net/arp/t_dad.sh +++ b/contrib/netbsd-tests/net/arp/t_dad.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_dad.sh,v 1.7 2016/08/10 22:05:07 kre Exp $ +# $NetBSD: t_dad.sh,v 1.13 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,14 +25,10 @@ # POSSIBILITY OF SUCH DAMAGE. # -inetserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif" -inetserver="${inetserver} -lrumpdev" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCKLOCAL=unix://commsock1 SOCKPEER=unix://commsock2 -DEBUG=false +DEBUG=${DEBUG:-false} atf_test_case dad_basic cleanup atf_test_case dad_duplicated cleanup @@ -54,10 +50,9 @@ setup_server() local sock=$1 local ip=$2 - export RUMP_SERVER=$sock + rump_server_add_iface $sock shmif0 bus1 - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + export RUMP_SERVER=$sock atf_check -s exit:0 rump.ifconfig shmif0 inet $ip/24 atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 @@ -74,30 +69,15 @@ make_pkt_str() echo $pkt } -extract_new_packets() -{ - local old=./old - - if [ ! -f $old ]; then - old=/dev/null - fi - - shmif_dumpbus -p - bus1 2>/dev/null| \ - tcpdump -n -e -r - 2>/dev/null > ./new - diff -u $old ./new |grep '^+' |cut -d '+' -f 2 > ./diff - mv -f ./new ./old - cat ./diff -} - dad_basic_body() { local pkt= - atf_check -s exit:0 ${inetserver} $SOCKLOCAL + rump_server_start $SOCKLOCAL + rump_server_add_iface $SOCKLOCAL shmif0 bus1 + export RUMP_SERVER=$SOCKLOCAL - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.1/24 atf_check -s exit:0 rump.ifconfig shmif0 inet 10.0.0.2/24 alias $DEBUG && rump.ifconfig shmif0 @@ -107,13 +87,13 @@ dad_basic_body() $DEBUG && cat ./out # The primary address doesn't start with tentative state - atf_check -s not-exit:0 -x "cat ./out |grep 10.0.0.1 |grep -q tentative" + atf_check -s not-exit:0 -x "cat ./out |grep 10.0.0.1 |grep -iq tentative" # The alias address starts with tentative state # XXX we have no stable way to check this, so skip for now - #atf_check -s exit:0 -x "cat ./out |grep 10.0.0.2 |grep -q tentative" + #atf_check -s exit:0 -x "cat ./out |grep 10.0.0.2 |grep -iq tentative" atf_check -s exit:0 sleep 2 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # Check DAD probe packets @@ -127,14 +107,14 @@ dad_basic_body() atf_check -s exit:0 rump.ifconfig -w 10 # Give a chance to send a DAD announce packet atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # Check the DAD announce packet pkt=$(make_pkt_str 10.0.0.2 10.0.0.2) atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" # The alias address left tentative - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.2 |grep -q tentative" + atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.2 |grep -iq tentative" # # Add a new address on the fly @@ -143,11 +123,11 @@ dad_basic_body() # The new address starts with tentative state # XXX we have no stable way to check this, so skip for now - #atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -q tentative" + #atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -iq tentative" # Check DAD probe packets atf_check -s exit:0 sleep 2 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt=$(make_pkt_str 10.0.0.3 0.0.0.0) atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" @@ -156,14 +136,16 @@ dad_basic_body() atf_check -s exit:0 rump.ifconfig -w 10 # Give a chance to send a DAD announce packet atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # Check the DAD announce packet pkt=$(make_pkt_str 10.0.0.3 10.0.0.3) atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" # The new address left tentative - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -q tentative" + atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep 10.0.0.3 |grep -iq tentative" + + rump_server_destroy_ifaces } dad_duplicated_body() @@ -172,8 +154,8 @@ dad_duplicated_body() local localip2=10.0.1.11 local peerip=10.0.1.2 - atf_check -s exit:0 ${inetserver} $SOCKLOCAL - atf_check -s exit:0 ${inetserver} $SOCKPEER + rump_server_start $SOCKLOCAL + rump_server_start $SOCKPEER setup_server $SOCKLOCAL $localip1 setup_server $SOCKPEER $peerip @@ -181,7 +163,7 @@ dad_duplicated_body() export RUMP_SERVER=$SOCKLOCAL # The primary address isn't marked as duplicated - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip1 |grep -q duplicated" + atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip1 |grep -iq duplicated" # # Add a new address duplicated with the peer server @@ -190,50 +172,20 @@ dad_duplicated_body() atf_check -s exit:0 sleep 1 # The new address is marked as duplicated - atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep $peerip |grep -q duplicated" + atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep $peerip |grep -iq duplicated" # A unique address isn't marked as duplicated atf_check -s exit:0 rump.ifconfig shmif0 inet $localip2 alias atf_check -s exit:0 sleep 1 - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -q duplicated" -} - -cleanup() -{ - env RUMP_SERVER=$SOCKLOCAL rump.halt - env RUMP_SERVER=$SOCKPEER rump.halt -} - -dump_local() -{ - export RUMP_SERVER=$SOCKLOCAL - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} + atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -iq duplicated" -dump_peer() -{ - export RUMP_SERVER=$SOCKPEER - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} - -dump() -{ - dump_local - dump_peer - shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - + rump_server_destroy_ifaces } dad_basic_cleanup() { - $DEBUG && dump_local - $DEBUG && shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - - env RUMP_SERVER=$SOCKLOCAL rump.halt + $DEBUG && dump + cleanup } dad_duplicated_cleanup() diff --git a/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh b/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh index c12017d..5dcdc9c 100755 --- a/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh +++ b/contrib/netbsd-tests/net/icmp/t_icmp6_redirect.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_icmp6_redirect.sh,v 1.2 2016/08/10 22:17:44 kre Exp $ +# $NetBSD: t_icmp6_redirect.sh,v 1.7 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -24,8 +24,6 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -netserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_shmif" -netserver="${netserver} -lrumpnet_netinet -lrumpnet_netinet6 -lrumpdev" SOCK_LOCAL=unix://commsock1 SOCK_PEER=unix://commsock2 @@ -44,50 +42,38 @@ IP6IF0_GW2=fc00:1::3 REDIRECT_TIMEOUT=5 -DEBUG=true +DEBUG=${DEBUG:-true} -get_lladdr() -{ - - export RUMP_SERVER=${1} - rump.ifconfig ${2} inet6 | awk "/fe80/ {sub(/%$2/, \"\"); print \$2;}" - unset RUMP_SERVER - - return 0 -} +atf_test_case icmp6_redirect_basic cleanup -atf_test_case basic cleanup - -basic_head() +icmp6_redirect_basic_head() { atf_set "descr" "Test for the basically function of the ICMP6 redirect" atf_set "require.progs" "rump_server rump.route rump.ping rump.ifconfig" } -basic_body() +icmp6_redirect_basic_body() { local gw1_lladdr0= local gw1_lladdr1= local gw2_lladdr0= - atf_check -s exit:0 ${netserver} ${SOCK_LOCAL} - atf_check -s exit:0 ${netserver} ${SOCK_PEER} - atf_check -s exit:0 ${netserver} ${SOCK_GW1} - atf_check -s exit:0 ${netserver} ${SOCK_GW2} + rump_server_start $SOCK_LOCAL netinet6 + rump_server_start $SOCK_PEER netinet6 + rump_server_start $SOCK_GW1 netinet6 + rump_server_start $SOCK_GW2 netinet6 # # Setup # # Setup gateway #1 (real gateway) export RUMP_SERVER=${SOCK_GW1} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${BUS1} + rump_server_add_iface $SOCK_GW1 shmif0 $BUS1 + rump_server_add_iface $SOCK_GW1 shmif1 $BUS2 + atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_GW1} atf_check -s exit:0 rump.ifconfig shmif0 up - - atf_check -s exit:0 rump.ifconfig shmif1 create - atf_check -s exit:0 rump.ifconfig shmif1 linkstr ${BUS2} atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6IF1_GW1} atf_check -s exit:0 rump.ifconfig shmif1 up @@ -95,13 +81,12 @@ basic_body() net.inet6.ip6.forwarding=1 unset RUMP_SERVER - gw1_lladdr0=`get_lladdr ${SOCK_GW1} shmif0` - gw1_lladdr1=`get_lladdr ${SOCK_GW1} shmif1` + gw1_lladdr0=`get_linklocal_addr ${SOCK_GW1} shmif0` + gw1_lladdr1=`get_linklocal_addr ${SOCK_GW1} shmif1` # Setup a peer behind gateway #1 export RUMP_SERVER=${SOCK_PEER} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${BUS2} + rump_server_add_iface $SOCK_PEER shmif0 $BUS2 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_PEER} atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 -o ignore rump.route add \ @@ -110,8 +95,7 @@ basic_body() # Setup gateway #2 (fake gateway) export RUMP_SERVER=${SOCK_GW2} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${BUS1} + rump_server_add_iface $SOCK_GW2 shmif0 $BUS1 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_GW2} atf_check -s exit:0 rump.ifconfig shmif0 up @@ -121,11 +105,10 @@ basic_body() net.inet6.ip6.forwarding=1 unset RUMP_SERVER - gw2_lladdr0=`get_lladdr ${SOCK_GW2} shmif0` + gw2_lladdr0=`get_linklocal_addr ${SOCK_GW2} shmif0` export RUMP_SERVER=${SOCK_LOCAL} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${BUS1} + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS1 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6IF0_LOCAL} atf_check -s exit:0 rump.ifconfig shmif0 up @@ -152,20 +135,18 @@ basic_body() atf_check -s exit:0 -o not-match:"gateway: ${gw1_lladdr0}" rump.route get \ -inet6 ${IP6IF0_PEER} - unset RUMP_SERVER + rump_server_destroy_ifaces } -basic_cleanup() +icmp6_redirect_basic_cleanup() { - env RUMP_SERVER=$SOCK_LOCAL rump.halt - env RUMP_SERVER=$SOCK_PEER rump.halt - env RUMP_SERVER=$SOCK_GW1 rump.halt - env RUMP_SERVER=$SOCK_GW2 rump.halt + $DEBUG && dump + cleanup } atf_init_test_cases() { - atf_add_test_case basic + atf_add_test_case icmp6_redirect_basic } diff --git a/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh b/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh index 730f2d2..6697216 100755 --- a/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh +++ b/contrib/netbsd-tests/net/icmp/t_icmp_redirect.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_icmp_redirect.sh,v 1.3 2016/08/10 22:17:44 kre Exp $ +# $NetBSD: t_icmp_redirect.sh,v 1.6 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,8 +27,6 @@ # Most codes are derived from tests/net/route/t_flags.sh -netserver=\ -"rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif -lrumpdev" SOCK_LOCAL=unix://commsock1 SOCK_PEER=unix://commsock2 SOCK_GW=unix://commsock3 @@ -36,7 +34,7 @@ BUS=bus1 BUS2=bus2 REDIRECT_TIMEOUT=5 -DEBUG=false +DEBUG=${DEBUG:-false} atf_test_case icmp_redirect_timeout cleanup @@ -50,11 +48,10 @@ icmp_redirect_timeout_head() setup_local() { - atf_check -s exit:0 ${netserver} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS export RUMP_SERVER=$SOCK_LOCAL - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.2/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up @@ -68,11 +65,10 @@ setup_local() setup_peer() { - atf_check -s exit:0 ${netserver} ${SOCK_PEER} + rump_server_start $SOCK_PEER + rump_server_add_iface $SOCK_PEER shmif0 $BUS export RUMP_SERVER=$SOCK_PEER - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.1/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up @@ -83,16 +79,14 @@ setup_peer() setup_gw() { - atf_check -s exit:0 ${netserver} ${SOCK_GW} + rump_server_start $SOCK_GW + rump_server_add_iface $SOCK_GW shmif0 $BUS + rump_server_add_iface $SOCK_GW shmif1 $BUS2 export RUMP_SERVER=$SOCK_GW - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.254/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up - atf_check -s exit:0 -o ignore rump.ifconfig shmif1 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif1 linkstr ${BUS2} atf_check -s exit:0 -o ignore rump.ifconfig shmif1 10.0.2.1/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif1 alias 10.0.2.2/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif1 up @@ -105,39 +99,6 @@ setup_gw() $DEBUG && rump.netstat -rn -f inet } -teardown_gw() -{ - - env RUMP_SERVER=$SOCK_GW rump.halt -} - -check_entry_flags() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local flags=$2 - - atf_check -s exit:0 -o match:" $flags " -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - -check_entry_gw() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local gw=$2 - - atf_check -s exit:0 -o match:" $gw " -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - -check_entry_fail() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local flags=$2 # Not used currently - - atf_check -s not-exit:0 -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - icmp_redirect_timeout_body() { @@ -159,7 +120,7 @@ icmp_redirect_timeout_body() export RUMP_SERVER=$SOCK_PEER atf_check -s exit:0 -o ignore rump.route add -net 10.0.2.0/24 10.0.0.254 # Up, Gateway, Static - check_entry_flags 10.0.2/24 UGS + check_route_flags 10.0.2/24 UGS # # Setup the default gateway to the peer, 10.0.0.1 @@ -167,39 +128,25 @@ icmp_redirect_timeout_body() export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 -o ignore rump.route add default 10.0.0.1 # Up, Gateway, Static - check_entry_flags default UGS + check_route_flags default UGS # Try ping 10.0.2.1 atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 10.0.2.1 $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Host, Dynamic - check_entry_flags 10.0.2.1 UGHD - check_entry_gw 10.0.2.1 10.0.0.254 + check_route_flags 10.0.2.1 UGHD + check_route_gw 10.0.2.1 10.0.0.254 atf_check -s exit:0 sleep $((REDIRECT_TIMEOUT + 2)) # The dynamic entry should be expired and removed - check_entry_fail 10.0.2.1 + check_route_no_entry 10.0.2.1 export RUMP_SERVER=$SOCK_PEER $DEBUG && rump.netstat -rn -f inet - teardown_gw -} - -dump() -{ - - shmif_dumpbus -p - $BUS 2>/dev/null | tcpdump -n -e -r - - gdb -ex bt /usr/bin/rump_server rump_server.core -} - -cleanup() -{ - - env RUMP_SERVER=$SOCK_LOCAL rump.halt - env RUMP_SERVER=$SOCK_PEER rump.halt + rump_server_destroy_ifaces } icmp_redirect_timeout_cleanup() @@ -249,7 +196,7 @@ icmp_redirect_body() export RUMP_SERVER=$SOCK_PEER atf_check -s exit:0 -o ignore rump.route add -net 10.0.2.0/24 10.0.0.254 # Up, Gateway, Static - check_entry_flags 10.0.2/24 UGS + check_route_flags 10.0.2/24 UGS # # Setup the default gateway to the peer, 10.0.0.1 @@ -257,7 +204,7 @@ icmp_redirect_body() export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 -o ignore rump.route add default 10.0.0.1 # Up, Gateway, Static - check_entry_flags default UGS + check_route_flags default UGS ### ICMP redirects are NOT sent by the peer ### @@ -274,7 +221,7 @@ icmp_redirect_body() $DEBUG && rump.netstat -rn -f inet # A direct route shouldn't be created - check_entry_fail 10.0.2.1 + check_route_no_entry 10.0.2.1 ### ICMP redirects are sent by the peer ### @@ -291,8 +238,8 @@ icmp_redirect_body() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Host, Dynamic - check_entry_flags 10.0.2.1 UGHD - check_entry_gw 10.0.2.1 10.0.0.254 + check_route_flags 10.0.2.1 UGHD + check_route_gw 10.0.2.1 10.0.0.254 export RUMP_SERVER=$SOCK_PEER $DEBUG && rump.netstat -rn -f inet @@ -301,7 +248,7 @@ icmp_redirect_body() # cleanup export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 -o ignore rump.route delete 10.0.2.1 - check_entry_fail 10.0.2.1 + check_route_no_entry 10.0.2.1 ### ICMP redirects are NOT sent by the peer (again) ### @@ -318,10 +265,9 @@ icmp_redirect_body() $DEBUG && rump.netstat -rn -f inet # A direct route shouldn't be created - check_entry_fail 10.0.2.1 - + check_route_no_entry 10.0.2.1 - teardown_gw + rump_server_destroy_ifaces } icmp_redirect_cleanup() diff --git a/contrib/netbsd-tests/net/if/t_compat.c b/contrib/netbsd-tests/net/if/t_compat.c index 4798034..9eb84a3 100644 --- a/contrib/netbsd-tests/net/if/t_compat.c +++ b/contrib/netbsd-tests/net/if/t_compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_compat.c,v 1.1 2010/11/07 19:53:42 pooka Exp $ */ +/* $NetBSD: t_compat.c,v 1.4 2016/11/12 15:12:59 kre Exp $ */ #include <sys/socket.h> #include <sys/ioctl.h> @@ -65,6 +65,8 @@ ATF_TC_BODY(OOSIOCGIFBRDADDR, tc) sprintf(ifreq.ifr_name, "shmif%d", ifnum); netcfg_rump_if(ifreq.ifr_name, "1.7.64.10", "255.255.0.0"); + atf_tc_expect_fail("PR kern/51610: rump does not include COMPAT_43"); + /* query kernel for iface bcast */ RL(fd = rump_sys_socket(AF_INET, SOCK_DGRAM, 0)); RL(rump_sys_ioctl(fd, OOSIOCGIFBRDADDR, &ifreq)); diff --git a/contrib/netbsd-tests/net/if/t_ifconfig.sh b/contrib/netbsd-tests/net/if/t_ifconfig.sh index e8c53e6..a610017 100755 --- a/contrib/netbsd-tests/net/if/t_ifconfig.sh +++ b/contrib/netbsd-tests/net/if/t_ifconfig.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ifconfig.sh,v 1.11 2016/08/10 22:30:02 kre Exp $ +# $NetBSD: t_ifconfig.sh,v 1.14 2016/10/01 22:15:04 kre Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -34,6 +34,9 @@ RUMP_FLAGS="${RUMP_FLAGS} -lrumpdev" TIMEOUT=3 +anycast="[Aa][Nn][Yy][Cc][Aa][Ss][Tt]" +deprecated="[Dd][Ee][Pp][Rr][Ee][Cc][Aa][Tt][Ee][Dd]" + atf_test_case ifconfig_create_destroy cleanup ifconfig_create_destroy_head() { @@ -227,16 +230,17 @@ ifconfig_parameters_body() rump.ifconfig shmif0 # down, up atf_check -s exit:0 rump.ifconfig shmif0 down - atf_check -s ignore -o ignore -e match:'down' rump.ping -c 1 \ + atf_check -s not-exit:0 -o ignore -e ignore rump.ping -c 1 \ -w $TIMEOUT -n 192.168.0.2 atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig -w 10 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT -n 192.168.0.2 # alias atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 alias - atf_check -s exit:0 -o match:'alias 192.168.1.1' rump.ifconfig shmif0 + atf_check -s exit:0 -o match:'192.168.1.1/24' rump.ifconfig shmif0 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 -alias - atf_check -s exit:0 -o not-match:'192.168.1.1' rump.ifconfig shmif0 + atf_check -s exit:0 -o not-match:'192.168.1.1/24' rump.ifconfig shmif0 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::1 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2 atf_check -s exit:0 -o match:'fc00::1' rump.ifconfig shmif0 inet6 @@ -290,22 +294,22 @@ ifconfig_parameters_body() # anycast atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2 anycast - atf_check -s exit:0 -o match:'fc00::2.+anycast' rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o match:"fc00::2.+$anycast" rump.ifconfig shmif0 inet6 # deprecated atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::3 deprecated # Not deprecated immediately. Need to wait nd6_timer that does it is scheduled. interval=$(sysctl -n net.inet6.icmp6.nd6_prune) atf_check -s exit:0 sleep $((interval + 1)) - atf_check -s exit:0 -o match:'fc00::3.+deprecated' rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o match:"fc00::3.+$deprecated" rump.ifconfig shmif0 inet6 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::3 -deprecated - atf_check -s exit:0 -o not-match:'fc00::3.+deprecated' rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o not-match:"fc00::3.+$deprecated" rump.ifconfig shmif0 inet6 # pltime atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::3 pltime 3 - atf_check -s exit:0 -o not-match:'fc00::3.+deprecated' rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o not-match:"fc00::3.+$deprecated" rump.ifconfig shmif0 inet6 atf_check -s exit:0 sleep 5 - atf_check -s exit:0 -o match:'fc00::3.+deprecated' rump.ifconfig shmif0 inet6 + atf_check -s exit:0 -o match:"fc00::3.+$deprecated" rump.ifconfig shmif0 inet6 # eui64 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00:1::0 eui64 diff --git a/contrib/netbsd-tests/net/if_bridge/t_bridge.sh b/contrib/netbsd-tests/net/if_bridge/t_bridge.sh index 769893d..25edb35 100755 --- a/contrib/netbsd-tests/net/if_bridge/t_bridge.sh +++ b/contrib/netbsd-tests/net/if_bridge/t_bridge.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_bridge.sh,v 1.13 2016/08/10 22:37:07 kre Exp $ +# $NetBSD: t_bridge.sh,v 1.16 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2014 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,13 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -libs1="-lrumpnet -lrumpnet_net -lrumpnet_netinet" -libs2="-lrumpnet_bridge -lrumpnet_shmif -lrumpdev" -libs6="-lrumpnet_netinet6" - -inetserver="rump_server ${libs1} ${libs2}" -inet6server="rump_server ${libs1} ${libs6} ${libs2}" - SOCK1=unix://commsock1 SOCK2=unix://commsock2 SOCK3=unix://commsock3 @@ -44,6 +37,7 @@ IPBR2=10.0.0.12 IP6BR1=fc00::11 IP6BR2=fc00::12 +DEBUG=${DEBUG:-false} TIMEOUT=5 atf_test_case bridge_ipv4 cleanup @@ -89,9 +83,8 @@ setup_endpoint() bus=${3} mode=${4} + rump_server_add_iface $sock shmif0 $bus export RUMP_SERVER=${sock} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${bus} if [ $mode = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${addr} else @@ -99,7 +92,7 @@ setup_endpoint() fi atf_check -s exit:0 rump.ifconfig shmif0 up - rump.ifconfig shmif0 + $DEBUG && rump.ifconfig shmif0 } test_endpoint() @@ -118,14 +111,6 @@ test_endpoint() fi } -show_endpoint() -{ - sock=${1} - - export RUMP_SERVER=${sock} - rump.ifconfig -v shmif0 -} - test_setup() { test_endpoint $SOCK1 $IP1 bus1 ipv4 @@ -148,21 +133,20 @@ test_setup6() setup_bridge_server() { + + rump_server_add_iface $SOCK2 shmif0 bus1 + rump_server_add_iface $SOCK2 shmif1 bus2 export RUMP_SERVER=$SOCK2 - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 atf_check -s exit:0 rump.ifconfig shmif0 up - - atf_check -s exit:0 rump.ifconfig shmif1 create - atf_check -s exit:0 rump.ifconfig shmif1 linkstr bus2 atf_check -s exit:0 rump.ifconfig shmif1 up } setup() { - atf_check -s exit:0 ${inetserver} $SOCK1 - atf_check -s exit:0 ${inetserver} $SOCK2 - atf_check -s exit:0 ${inetserver} $SOCK3 + + rump_server_start $SOCK1 bridge + rump_server_start $SOCK2 bridge + rump_server_start $SOCK3 bridge setup_endpoint $SOCK1 $IP1 bus1 ipv4 setup_endpoint $SOCK3 $IP2 bus2 ipv4 @@ -171,9 +155,10 @@ setup() setup6() { - atf_check -s exit:0 ${inet6server} $SOCK1 - atf_check -s exit:0 ${inet6server} $SOCK2 - atf_check -s exit:0 ${inet6server} $SOCK3 + + rump_server_start $SOCK1 netinet6 bridge + rump_server_start $SOCK2 netinet6 bridge + rump_server_start $SOCK3 netinet6 bridge setup_endpoint $SOCK1 $IP61 bus1 ipv6 setup_endpoint $SOCK3 $IP62 bus2 ipv6 @@ -244,19 +229,6 @@ test_setup_bridge() unset LD_PRELOAD } -cleanup() -{ - env RUMP_SERVER=$SOCK1 rump.halt - env RUMP_SERVER=$SOCK2 rump.halt - env RUMP_SERVER=$SOCK3 rump.halt -} - -dump_bus() -{ - /usr/bin/shmif_dumpbus -p - bus1 2>/dev/null| /usr/sbin/tcpdump -n -e -r - - /usr/bin/shmif_dumpbus -p - bus2 2>/dev/null| /usr/sbin/tcpdump -n -e -r - -} - down_up_interfaces() { export RUMP_SERVER=$SOCK1 @@ -360,11 +332,8 @@ test_brconfig_maxaddr() addr1= addr3= n= # Get MAC addresses of the endpoints. - export RUMP_SERVER=$SOCK1 - addr1=$(rump.ifconfig shmif0 |awk '/address:/ { print $2;}') - export RUMP_SERVER=$SOCK3 - addr3=$(rump.ifconfig shmif0 |awk '/address:/ { print $2;}') - unset RUMP_SERVER + addr1=$(get_macaddr $SOCK1 shmif0) + addr3=$(get_macaddr $SOCK3 shmif0) # Refill the MAC addresses of the endpoints. export RUMP_SERVER=$SOCK1 @@ -422,6 +391,8 @@ bridge_ipv4_body() teardown_bridge test_ping_failure + + rump_server_destroy_ifaces } bridge_ipv6_body() @@ -438,6 +409,8 @@ bridge_ipv6_body() teardown_bridge test_ping6_failure + + rump_server_destroy_ifaces } bridge_rtable_body() @@ -448,16 +421,13 @@ bridge_rtable_body() setup_bridge # Get MAC addresses of the endpoints. - export RUMP_SERVER=$SOCK1 - addr1=$(rump.ifconfig shmif0 |awk '/address:/ { print $2;}') - export RUMP_SERVER=$SOCK3 - addr3=$(rump.ifconfig shmif0 |awk '/address:/ { print $2;}') - unset RUMP_SERVER + addr1=$(get_macaddr $SOCK1 shmif0) + addr3=$(get_macaddr $SOCK3 shmif0) # Confirm there is no MAC address caches. export RUMP_SERVER=$SOCK2 export LD_PRELOAD=/usr/lib/librumphijack.so - /sbin/brconfig bridge0 + $DEBUG && /sbin/brconfig bridge0 atf_check -s exit:0 -o not-match:"$addr1" /sbin/brconfig bridge0 atf_check -s exit:0 -o not-match:"$addr3" /sbin/brconfig bridge0 unset LD_PRELOAD @@ -470,7 +440,7 @@ bridge_rtable_body() # Tests the addresses are in the cache. export RUMP_SERVER=$SOCK2 export LD_PRELOAD=/usr/lib/librumphijack.so - /sbin/brconfig bridge0 + $DEBUG && /sbin/brconfig bridge0 atf_check -s exit:0 -o match:"$addr1 shmif0" /sbin/brconfig bridge0 atf_check -s exit:0 -o match:"$addr3 shmif1" /sbin/brconfig bridge0 @@ -487,7 +457,7 @@ bridge_rtable_body() unset RUMP_SERVER export RUMP_SERVER=$SOCK2 export LD_PRELOAD=/usr/lib/librumphijack.so - /sbin/brconfig bridge0 + $DEBUG && /sbin/brconfig bridge0 atf_check -s exit:0 -o match:"$addr1 shmif0" /sbin/brconfig bridge0 atf_check -s exit:0 -o match:"$addr3 shmif1" /sbin/brconfig bridge0 @@ -511,6 +481,8 @@ bridge_rtable_body() # TODO: brconfig static/flushall/discover/learn # TODO: cache expiration; it takes 5 minutes at least and we want to # wait here so long. Should we have a sysctl to change the period? + + rump_server_destroy_ifaces } bridge_member_ipv4_body() @@ -531,6 +503,8 @@ bridge_member_ipv4_body() teardown_bridge test_ping_failure + + rump_server_destroy_ifaces } bridge_member_ipv6_body() @@ -550,35 +524,42 @@ bridge_member_ipv6_body() teardown_bridge test_ping6_failure + + rump_server_destroy_ifaces } bridge_ipv4_cleanup() { - dump_bus + + $DEBUG && dump cleanup } bridge_ipv6_cleanup() { - dump_bus + + $DEBUG && dump cleanup } bridge_rtable_cleanup() { - dump_bus + + $DEBUG && dump cleanup } bridge_member_ipv4_cleanup() { - dump_bus + + $DEBUG && dump cleanup } bridge_member_ipv6_cleanup() { - dump_bus + + $DEBUG && dump cleanup } diff --git a/contrib/netbsd-tests/net/if_gif/t_gif.sh b/contrib/netbsd-tests/net/if_gif/t_gif.sh index b804d7b..8690d78 100755 --- a/contrib/netbsd-tests/net/if_gif/t_gif.sh +++ b/contrib/netbsd-tests/net/if_gif/t_gif.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_gif.sh,v 1.5 2016/08/10 08:29:20 ozaki-r Exp $ +# $NetBSD: t_gif.sh,v 1.9 2016/12/21 09:46:39 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -25,10 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -server="rump_server -v -lrumpdev -lrumpnet -lrumpnet_net -lrumpnet_netinet \ - -lrumpnet_netinet6 -lrumpnet_shmif -lrumpnet_gif" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCK1=unix://commsock1 # for ROUTER1 SOCK2=unix://commsock2 # for ROUTER2 ROUTER1_LANIP=192.168.1.1 @@ -65,6 +61,7 @@ ROUTER2_GIFIP6_DUMMY=fc00:14::1 ROUTER2_GIFIP6_RECURSIVE1=fc00:104::1 ROUTER2_GIFIP6_RECURSIVE2=fc00:204::1 +DEBUG=${DEBUG:-true} TIMEOUT=5 setup_router() @@ -75,9 +72,10 @@ setup_router() wan=${4} wan_mode=${5} + rump_server_add_iface $sock shmif0 bus0 + rump_server_add_iface $sock shmif1 bus1 + export RUMP_SERVER=${sock} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus0 if [ ${lan_mode} = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${lan} else @@ -86,8 +84,6 @@ setup_router() atf_check -s exit:0 rump.ifconfig shmif0 up rump.ifconfig shmif0 - atf_check -s exit:0 rump.ifconfig shmif1 create - atf_check -s exit:0 rump.ifconfig shmif1 linkstr bus1 if [ ${wan_mode} = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${wan} else @@ -126,8 +122,8 @@ setup() inner=${1} outer=${2} - atf_check -s exit:0 ${server} $SOCK1 - atf_check -s exit:0 ${server} $SOCK2 + rump_server_start $SOCK1 netinet6 gif + rump_server_start $SOCK2 netinet6 gif router1_lan="" router1_lan_mode="" @@ -482,18 +478,6 @@ teardown_recursive_tunnels() atf_check -s exit:0 rump.ifconfig gif2 destroy } -cleanup() -{ - env RUMP_SERVER=$SOCK1 rump.halt - env RUMP_SERVER=$SOCK2 rump.halt -} - -dump_bus() -{ - /usr/bin/shmif_dumpbus -p - bus0 2>/dev/null| /usr/sbin/tcpdump -n -e -r - - /usr/bin/shmif_dumpbus -p - bus1 2>/dev/null| /usr/sbin/tcpdump -n -e -r - -} - test_ping_failure() { mode=$1 @@ -739,7 +723,7 @@ add_test() inner=$3 outer=$4 - name="${category}${inner}over${outer}" + name="gif_${category}_${inner}over${outer}" fulldesc="Does ${inner} over ${outer} if_gif ${desc}" atf_test_case ${name} cleanup @@ -751,9 +735,10 @@ add_test() ${category}_setup ${inner} ${outer}; \ ${category}_test ${inner} ${outer}; \ ${category}_teardown ${inner} ${outer}; \ + rump_server_destroy_ifaces; \ }; \ ${name}_cleanup() { \ - dump_bus; \ + $DEBUG && dump; \ cleanup; \ }" atf_add_test_case ${name} diff --git a/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh b/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh index 3199ca0..8d9d5c2 100755 --- a/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh +++ b/contrib/netbsd-tests/net/if_pppoe/t_pppoe.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_pppoe.sh,v 1.2 2016/08/07 23:34:31 pgoyette Exp $ +# $NetBSD: t_pppoe.sh,v 1.16 2016/12/14 03:30:30 knakahara Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -28,6 +28,7 @@ server="rump_server -lrump -lrumpnet -lrumpnet_net -lrumpnet_netinet \ -lrumpnet_netinet6 -lrumpnet_shmif -lrumpdev \ -lrumpnet_pppoe" +# pppoectl doesn't work with RUMPHIJACK=sysctl=yes HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so" SERVER=unix://commsock1 @@ -35,17 +36,23 @@ CLIENT=unix://commsock2 SERVER_IP=10.3.3.1 CLIENT_IP=10.3.3.3 +SERVER_IP6=fc00::1 +CLIENT_IP6=fc00::3 AUTHNAME=foobar@baz.com SECRET=oink BUS=bus0 TIMEOUT=3 -WAITTIME=5 -DEBUG=false - -atf_test_case pap cleanup +WAITTIME=10 +DEBUG=${DEBUG:-false} setup() { + inet=true + + if [ $# -ne 0 ]; then + eval $@ + fi + atf_check -s exit:0 ${server} $SERVER atf_check -s exit:0 ${server} $CLIENT @@ -55,7 +62,8 @@ setup() atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig pppoe0 create - atf_check -s exit:0 rump.ifconfig pppoe0 inet $SERVER_IP $CLIENT_IP down + $inet && atf_check -s exit:0 rump.ifconfig pppoe0 \ + inet $SERVER_IP $CLIENT_IP down atf_check -s exit:0 rump.ifconfig pppoe0 link0 $DEBUG && rump.ifconfig @@ -70,22 +78,19 @@ setup() atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig pppoe0 create - atf_check -s exit:0 rump.ifconfig pppoe0 inet 0.0.0.0 0.0.0.1 down + $inet && atf_check -s exit:0 rump.ifconfig pppoe0 \ + inet 0.0.0.0 0.0.0.1 down atf_check -s exit:0 -x "$HIJACKING pppoectl -e shmif0 pppoe0" unset RUMP_SERVER } + cleanup() { env RUMP_SERVER=$SERVER rump.halt env RUMP_SERVER=$CLIENT rump.halt } -pap_head() -{ - atf_set "descr" "Does simple pap tests" - atf_set "require.progs" "rump_server pppoectl" -} wait_for_session_established() { @@ -98,21 +103,50 @@ wait_for_session_established() sleep 1 done - if [ $dontfail != "dontfail" ]; then + if [ "$dontfail" != "dontfail" ]; then atf_fail "Couldn't connect to the server for $n seconds." fi } -pap_body() +wait_for_disconnected() +{ + local dontfail=$1 + local n=$WAITTIME + + for i in $(seq $n); do + $HIJACKING pppoectl -d pppoe0 | grep -q "state = initial" + [ $? = 0 ] && return + # If PPPoE client is disconnected by PPPoE server and then + # the client kicks callout of pppoe_timeout(), the client + # state is changed to PPPOE_STATE_PADI_SENT while padi retrying. + $HIJACKING pppoectl -d pppoe0 | grep -q "state = PADI sent" + [ $? = 0 ] && return + + sleep 1 + done + + if [ "$dontfail" != "dontfail" ]; then + atf_fail "Couldn't disconnect for $n seconds." + fi +} + +run_test() { - local auth=pap + local auth=$1 setup + # As pppoe client doesn't support rechallenge yet. + local server_optparam="" + if [ $auth = "chap" ]; then + server_optparam="norechallenge" + fi + export RUMP_SERVER=$SERVER local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \ 'hisauthname=$AUTHNAME' \ 'hisauthsecret=$SECRET' \ - 'myauthproto=none'" + 'myauthproto=none' \ + $server_optparam" atf_check -s exit:0 -x "$HIJACKING $setup_serverparam" atf_check -s exit:0 rump.ifconfig pppoe0 up unset RUMP_SERVER @@ -130,8 +164,11 @@ pap_body() unset RUMP_SERVER # test for disconnection from server - atf_check -s exit:0 -x "env RUMP_SERVER=$SERVER rump.ifconfig pppoe0 down" + export RUMP_SERVER=$SERVER + atf_check -s exit:0 rump.ifconfig pppoe0 down + wait_for_disconnected export RUMP_SERVER=$CLIENT + wait_for_disconnected atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -c 1 -w $TIMEOUT $SERVER_IP atf_check -s exit:0 -o match:'PADI sent' -x "$HIJACKING pppoectl -d pppoe0" @@ -145,15 +182,18 @@ pap_body() unset RUMP_SERVER # test for disconnection from client - atf_check -s exit:0 -x "env RUMP_SERVER=$CLIENT rump.ifconfig pppoe0 down" + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 -x rump.ifconfig pppoe0 down + wait_for_disconnected export RUMP_SERVER=$SERVER + wait_for_disconnected $DEBUG && $HIJACKING pppoectl -d pppoe0 atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -c 1 -w $TIMEOUT $CLIENT_IP atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0" unset RUMP_SERVER - # test for recconecting + # test for reconnecting export RUMP_SERVER=$CLIENT atf_check -s exit:0 -x rump.ifconfig pppoe0 up wait_for_session_established @@ -162,6 +202,7 @@ pap_body() unset RUMP_SERVER export RUMP_SERVER=$SERVER + atf_check -s exit:0 rump.ifconfig -w 10 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT $CLIENT_IP atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0" $DEBUG && HIJACKING pppoectl -d pppoe0 @@ -170,6 +211,7 @@ pap_body() # test for invalid password export RUMP_SERVER=$CLIENT atf_check -s exit:0 rump.ifconfig pppoe0 down + wait_for_disconnected local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ 'myauthname=$AUTHNAME' \ 'myauthsecret=invalidsecret' \ @@ -179,15 +221,196 @@ pap_body() wait_for_session_established dontfail atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping -c 1 -w $TIMEOUT $SERVER_IP + atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0 + unset RUMP_SERVER +} + +atf_test_case pppoe_pap cleanup + +pppoe_pap_head() +{ + atf_set "descr" "Does simple pap tests" + atf_set "require.progs" "rump_server pppoectl" +} + +pppoe_pap_body() +{ + run_test pap +} + +pppoe_pap_cleanup() +{ + cleanup +} + +atf_test_case pppoe_chap cleanup + +pppoe_chap_head() +{ + atf_set "descr" "Does simple chap tests" + atf_set "require.progs" "rump_server pppoectl" +} + +pppoe_chap_body() +{ + run_test chap +} + +pppoe_chap_cleanup() +{ + cleanup +} + +run_test6() +{ + local auth=$1 + setup "inet=false" + + # As pppoe client doesn't support rechallenge yet. + local server_optparam="" + if [ $auth = "chap" ]; then + server_optparam="norechallenge" + fi + + export RUMP_SERVER=$SERVER + local setup_serverparam="pppoectl pppoe0 hisauthproto=$auth \ + 'hisauthname=$AUTHNAME' \ + 'hisauthsecret=$SECRET' \ + 'myauthproto=none' \ + $server_optparam" + atf_check -s exit:0 -x "$HIJACKING $setup_serverparam" + atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $SERVER_IP6/64 down + atf_check -s exit:0 rump.ifconfig pppoe0 up + unset RUMP_SERVER + + export RUMP_SERVER=$CLIENT + local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ + 'myauthname=$AUTHNAME' \ + 'myauthsecret=$SECRET' \ + 'hisauthproto=none'" + atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" + atf_check -s exit:0 rump.ifconfig pppoe0 inet6 $CLIENT_IP6/64 down + atf_check -s exit:0 rump.ifconfig pppoe0 up + $DEBUG && rump.ifconfig + wait_for_session_established + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 + export RUMP_SERVER=$SERVER + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 + unset RUMP_SERVER + + # test for disconnection from server + export RUMP_SERVER=$SERVER + session_id=`$HIJACKING pppoectl -d pppoe0 | grep state` + atf_check -s exit:0 rump.ifconfig pppoe0 down + wait_for_disconnected + export RUMP_SERVER=$CLIENT + wait_for_disconnected + atf_check -s not-exit:0 -o ignore -e ignore \ + rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 + atf_check -s exit:0 -o not-match:"$session_id" -x "$HIJACKING pppoectl -d pppoe0" + unset RUMP_SERVER + + # test for recoonecting + export RUMP_SERVER=$SERVER + atf_check -s exit:0 rump.ifconfig pppoe0 up + wait_for_session_established + atf_check -s exit:0 rump.ifconfig -w 10 + $DEBUG && $HIJACKING pppoectl -d pppoe0 + $DEBUG && rump.ifconfig pppoe0 + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 + atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 + unset RUMP_SERVER + + # test for disconnection from client + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 rump.ifconfig pppoe0 down + wait_for_disconnected + + export RUMP_SERVER=$SERVER + wait_for_disconnected + $DEBUG && $HIJACKING pppoectl -d pppoe0 + atf_check -s not-exit:0 -o ignore -e ignore \ + rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6 atf_check -s exit:0 -o match:'initial' -x "$HIJACKING pppoectl -d pppoe0" unset RUMP_SERVER + + # test for reconnecting + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 rump.ifconfig pppoe0 up + wait_for_session_established + atf_check -s exit:0 rump.ifconfig -w 10 + + $DEBUG && rump.ifconfig pppoe0 + $DEBUG && $HIJACKING pppoectl -d pppoe0 + unset RUMP_SERVER + + export RUMP_SERVER=$SERVER + atf_check -s exit:0 rump.ifconfig -w 10 + atf_check -s exit:0 -o ignore rump.ping6 -c 1 -X $TIMEOUT $CLIENT_IP6 + atf_check -s exit:0 -o match:'session' -x "$HIJACKING pppoectl -d pppoe0" + $DEBUG && HIJACKING pppoectl -d pppoe0 + unset RUMP_SERVER + + # test for invalid password + export RUMP_SERVER=$CLIENT + atf_check -s exit:0 rump.ifconfig pppoe0 down + wait_for_disconnected + local setup_clientparam="pppoectl pppoe0 myauthproto=$auth \ + 'myauthname=$AUTHNAME' \ + 'myauthsecret=invalidsecret' \ + 'hisauthproto=none'" + atf_check -s exit:0 -x "$HIJACKING $setup_clientparam" + atf_check -s exit:0 rump.ifconfig pppoe0 up + wait_for_session_established dontfail + atf_check -s not-exit:0 -o ignore -e ignore \ + rump.ping6 -c 1 -X $TIMEOUT $SERVER_IP6 + atf_check -s exit:0 -o match:'DETACHED' rump.ifconfig pppoe0 + unset RUMP_SERVER } -pap_cleanup() +atf_test_case pppoe6_pap cleanup + +pppoe6_pap_head() +{ + atf_set "descr" "Does simple pap using IPv6 tests" + atf_set "require.progs" "rump_server pppoectl" +} + +pppoe6_pap_body() +{ + run_test6 pap +} + +pppoe6_pap_cleanup() +{ + cleanup +} + +atf_test_case pppoe6_chap cleanup + +pppoe6_chap_head() +{ + atf_set "descr" "Does simple chap using IPv6 tests" + atf_set "require.progs" "rump_server pppoectl" +} + +pppoe6_chap_body() +{ + run_test6 chap +} + +pppoe6_chap_cleanup() { cleanup } + atf_init_test_cases() { - atf_add_test_case pap + atf_add_test_case pppoe_pap + atf_add_test_case pppoe_chap + atf_add_test_case pppoe6_pap + atf_add_test_case pppoe6_chap } diff --git a/contrib/netbsd-tests/net/if_tap/t_tap.sh b/contrib/netbsd-tests/net/if_tap/t_tap.sh index 29efc20..4b1ce25 100755 --- a/contrib/netbsd-tests/net/if_tap/t_tap.sh +++ b/contrib/netbsd-tests/net/if_tap/t_tap.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_tap.sh,v 1.3 2016/08/10 22:42:21 kre Exp $ +# $NetBSD: t_tap.sh,v 1.6 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -25,10 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -RUMP_FLAGS="-lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_netinet6" -RUMP_FLAGS="$RUMP_FLAGS -lrumpnet_shmif -lrumpnet_tap -lrumpnet_bridge -lrumpdev" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCK_LOCAL=unix://commsock1 SOCK_REMOTE=unix://commsock2 BUS=bus1 @@ -39,7 +35,7 @@ IP6_LOCAL=fc00::1 IP6_TAP=fc00::2 IP6_REMOTE=fc00::3 -DEBUG=false +DEBUG=${DEBUG:-false} TIMEOUT=1 atf_test_case tap_create_destroy cleanup @@ -53,7 +49,7 @@ tap_create_destroy_head() tap_create_destroy_body() { - atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL netinet6 tap export RUMP_SERVER=${SOCK_LOCAL} @@ -77,7 +73,8 @@ tap_create_destroy_body() tap_create_destroy_cleanup() { - RUMP_SERVER=${SOCK_LOCAL} rump.halt + $DEBUG && dump + cleanup } atf_test_case tap_stand_alone cleanup @@ -90,13 +87,14 @@ tap_create_destroy_head() tap_stand_alone_body() { - atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_LOCAL} - atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_REMOTE} - export RUMP_SERVER=${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL netinet6 tap + rump_server_start $SOCK_REMOTE netinet6 tap - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS + rump_server_add_iface $SOCK_REMOTE shmif0 $BUS + + export RUMP_SERVER=${SOCK_LOCAL} atf_check -s exit:0 rump.ifconfig shmif0 $IP4_LOCAL atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6_LOCAL atf_check -s exit:0 rump.ifconfig shmif0 up @@ -108,8 +106,6 @@ tap_stand_alone_body() export RUMP_SERVER=${SOCK_REMOTE} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS atf_check -s exit:0 rump.ifconfig shmif0 $IP4_REMOTE atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6_REMOTE atf_check -s exit:0 rump.ifconfig shmif0 up @@ -124,13 +120,15 @@ tap_stand_alone_body() # Cannot reach to an alone tap atf_check -s not-exit:0 -o ignore -e ignore \ rump.ping6 -n -X $TIMEOUT -c 1 $IP6_TAP + + rump_server_destroy_ifaces } tap_stand_alone_cleanup() { - RUMP_SERVER=${SOCK_LOCAL} rump.halt - RUMP_SERVER=${SOCK_REMOTE} rump.halt + $DEBUG && dump + cleanup } atf_test_case tap_bridged cleanup @@ -143,13 +141,15 @@ tap_bridged_head() tap_bridged_body() { - atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_LOCAL} - atf_check -s exit:0 rump_server ${RUMP_FLAGS} ${SOCK_REMOTE} + + rump_server_start $SOCK_LOCAL netinet6 tap bridge + rump_server_start $SOCK_REMOTE netinet6 tap + + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS + rump_server_add_iface $SOCK_REMOTE shmif0 $BUS export RUMP_SERVER=${SOCK_LOCAL} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS atf_check -s exit:0 rump.ifconfig shmif0 $IP4_LOCAL atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6_LOCAL atf_check -s exit:0 rump.ifconfig shmif0 up @@ -168,8 +168,6 @@ tap_bridged_body() export RUMP_SERVER=${SOCK_REMOTE} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS atf_check -s exit:0 rump.ifconfig shmif0 $IP4_REMOTE atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6_REMOTE atf_check -s exit:0 rump.ifconfig shmif0 up @@ -180,13 +178,15 @@ tap_bridged_body() atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6_LOCAL atf_check -s exit:0 -o ignore rump.ping6 -n -X $TIMEOUT -c 1 $IP6_TAP + + rump_server_destroy_ifaces } tap_bridged_cleanup() { - RUMP_SERVER=${SOCK_LOCAL} rump.halt - RUMP_SERVER=${SOCK_REMOTE} rump.halt + $DEBUG && dump + cleanup } atf_init_test_cases() diff --git a/contrib/netbsd-tests/net/mcast/t_mcast.sh b/contrib/netbsd-tests/net/mcast/t_mcast.sh index 67e13d4..aeb7000 100755 --- a/contrib/netbsd-tests/net/mcast/t_mcast.sh +++ b/contrib/netbsd-tests/net/mcast/t_mcast.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_mcast.sh,v 1.2 2016/08/10 22:45:39 kre Exp $ +# $NetBSD: t_mcast.sh,v 1.4 2016/11/25 08:51:16 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,12 +25,9 @@ # POSSIBILITY OF SUCH DAMAGE. # -netserver="rump_server -lrumpnet -lrumpnet_net" -netserver="$netserver -lrumpnet_netinet -lrumpnet_netinet6 -lrumpnet_shmif" -netserver="$netserver -lrumpdev" export RUMP_SERVER=unix://commsock -DEBUG=false +DEBUG=${DEBUG:-false} run_test() { @@ -38,9 +35,8 @@ run_test() local opts="$2" local mcast="$(atf_get_srcdir)/mcast" - atf_check -s exit:0 ${netserver} ${RUMP_SERVER} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + rump_server_start $RUMP_SERVER netinet6 + rump_server_add_iface $RUMP_SERVER shmif0 bus1 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.2/24 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2/64 atf_check -s exit:0 rump.ifconfig shmif0 up @@ -79,11 +75,11 @@ add_test() }; \ mcast_${name}_body() { \ run_test \"${name}\" \"${opts}\"; \ + rump_server_destroy_ifaces; \ }; \ mcast_${name}_cleanup() { \ - ${DEBUG} && /usr/bin/shmif_dumpbus -p - bus1 2>/dev/null | \ - /usr/sbin/tcpdump -n -e -r -; \ - env RUMP_SERVER=unix://commsock rump.halt; \ + ${DEBUG} && dump; \ + cleanup; \ }" atf_add_test_case "mcast_${name}" } diff --git a/contrib/netbsd-tests/net/ndp/t_dad.sh b/contrib/netbsd-tests/net/ndp/t_dad.sh index 98b8ae0..50ec933 100755 --- a/contrib/netbsd-tests/net/ndp/t_dad.sh +++ b/contrib/netbsd-tests/net/ndp/t_dad.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_dad.sh,v 1.5 2016/08/10 23:07:57 kre Exp $ +# $NetBSD: t_dad.sh,v 1.12 2016/11/25 08:51:17 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,18 +25,16 @@ # POSSIBILITY OF SUCH DAMAGE. # -inetserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet" -inetserver="$inetserver -lrumpnet_netinet6 -lrumpnet_shmif" -inetserver="$inetserver -lrumpdev" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCKLOCAL=unix://commsock1 SOCKPEER=unix://commsock2 -DEBUG=false +DEBUG=${DEBUG:-false} + +duplicated="[Dd][Uu][Pp][Ll][Ii][Cc][Aa][Tt][Ee][Dd]" atf_test_case dad_basic cleanup atf_test_case dad_duplicated cleanup +atf_test_case dad_count cleanup dad_basic_head() { @@ -50,15 +48,20 @@ dad_duplicated_head() atf_set "require.progs" "rump_server" } +dad_count_head() +{ + atf_set "descr" "Tests for IPv6 DAD count behavior" + atf_set "require.progs" "rump_server" +} + setup_server() { local sock=$1 local ip=$2 - export RUMP_SERVER=$sock + rump_server_add_iface $sock shmif0 bus1 - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + export RUMP_SERVER=$sock atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 @@ -76,21 +79,6 @@ make_ns_pkt_str() echo $pkt } -extract_new_packets() -{ - local old=./old - - if [ ! -f $old ]; then - old=/dev/null - fi - - shmif_dumpbus -p - bus1 2>/dev/null| \ - tcpdump -n -e -r - 2>/dev/null > ./new - diff -u $old ./new |grep '^+' |cut -d '+' -f 2 > ./diff - mv -f ./new ./old - cat ./diff -} - dad_basic_body() { local pkt= @@ -98,11 +86,10 @@ dad_basic_body() local localip2=fc00::2 local localip3=fc00::3 - atf_check -s exit:0 ${inetserver} $SOCKLOCAL - export RUMP_SERVER=$SOCKLOCAL + rump_server_start $SOCKLOCAL netinet6 + rump_server_add_iface $SOCKLOCAL shmif0 bus1 - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + export RUMP_SERVER=$SOCKLOCAL atf_check -s exit:0 rump.ifconfig shmif0 inet6 $localip1 atf_check -s exit:0 rump.ifconfig shmif0 inet6 $localip2 $DEBUG && rump.ifconfig shmif0 @@ -118,7 +105,7 @@ dad_basic_body() #atf_check -s exit:0 -x "cat ./out |grep $localip2 |grep -q tentative" atf_check -s exit:0 sleep 2 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # Check DAD probe packets (Neighbor Solicitation Message) @@ -130,7 +117,7 @@ dad_basic_body() # Waiting for DAD complete atf_check -s exit:0 rump.ifconfig -w 10 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # IPv6 DAD doesn't announce (Neighbor Advertisement Message) @@ -149,20 +136,22 @@ dad_basic_body() # Check DAD probe packets (Neighbor Solicitation Message) atf_check -s exit:0 sleep 2 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out pkt=$(make_ns_pkt_str 3 $localip3) atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" # Waiting for DAD complete atf_check -s exit:0 rump.ifconfig -w 10 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out # IPv6 DAD doesn't announce (Neighbor Advertisement Message) # The new address left tentative atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip3 |grep -q tentative" + + rump_server_destroy_ifaces } dad_duplicated_body() @@ -171,8 +160,8 @@ dad_duplicated_body() local localip2=fc00::11 local peerip=fc00::2 - atf_check -s exit:0 ${inetserver} $SOCKLOCAL - atf_check -s exit:0 ${inetserver} $SOCKPEER + rump_server_start $SOCKLOCAL netinet6 + rump_server_start $SOCKPEER netinet6 setup_server $SOCKLOCAL $localip1 setup_server $SOCKPEER $peerip @@ -180,7 +169,8 @@ dad_duplicated_body() export RUMP_SERVER=$SOCKLOCAL # The primary address isn't marked as duplicated - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip1 |grep -q duplicated" + atf_check -s exit:0 -o not-match:"$localip1.+$duplicated" \ + rump.ifconfig shmif0 # # Add a new address duplicated with the peer server @@ -189,52 +179,81 @@ dad_duplicated_body() atf_check -s exit:0 sleep 1 # The new address is marked as duplicated - atf_check -s exit:0 -x "rump.ifconfig shmif0 |grep $peerip |grep -q duplicated" + atf_check -s exit:0 -o match:"$peerip.+$duplicated" \ + rump.ifconfig shmif0 # A unique address isn't marked as duplicated atf_check -s exit:0 rump.ifconfig shmif0 inet6 $localip2 atf_check -s exit:0 sleep 1 - atf_check -s not-exit:0 -x "rump.ifconfig shmif0 |grep $localip2 |grep -q duplicated" + atf_check -s exit:0 -o not-match:"$localip2.+$duplicated" \ + rump.ifconfig shmif0 + + rump_server_destroy_ifaces } -cleanup() +dad_count_test() { - gdb -ex bt /usr/bin/rump_server rump_server.core - gdb -ex bt /usr/sbin/arp arp.core - env RUMP_SERVER=$SOCKLOCAL rump.halt - env RUMP_SERVER=$SOCKPEER rump.halt + local pkt= + local count=$1 + local id=$2 + local target=$3 + + # + # Set DAD count to $count + # + atf_check -s exit:0 rump.sysctl -w -q net.inet6.ip6.dad_count=$count + + # Add a new address + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $target + + # Waiting for DAD complete + atf_check -s exit:0 rump.ifconfig -w 20 + + # Check the number of DAD probe packets (Neighbor Solicitation Message) + atf_check -s exit:0 sleep 2 + extract_new_packets bus1 > ./out + $DEBUG && cat ./out + pkt=$(make_ns_pkt_str $id $target) + atf_check -s exit:0 -o match:"$count" \ + -x "cat ./out |grep '$pkt' | wc -l | tr -d ' '" } -dump_local() +dad_count_body() { + local localip1=fc00::1 + local localip2=fc00::2 + + rump_server_start $SOCKLOCAL netinet6 + rump_server_add_iface $SOCKLOCAL shmif0 bus1 + export RUMP_SERVER=$SOCKLOCAL - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} -dump_peer() -{ - export RUMP_SERVER=$SOCKPEER - rump.netstat -nr - rump.arp -n -a - rump.ifconfig - $HIJACKING dmesg -} + # Check default value + atf_check -s exit:0 -o match:"1" rump.sysctl -n net.inet6.ip6.dad_count -dump() -{ - dump_local - dump_peer - shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - + # Setup interface + atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 sleep 2 + rump.ifconfig shmif0 > ./out + $DEBUG && cat ./out + + # + # Set and test DAD count (count=1) + # + dad_count_test 1 1 $localip1 + + # + # Set and test DAD count (count=8) + # + dad_count_test 8 2 $localip2 + + rump_server_destroy_ifaces } dad_basic_cleanup() { - $DEBUG && dump_local - $DEBUG && shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - - env RUMP_SERVER=$SOCKLOCAL rump.halt + $DEBUG && dump + cleanup } dad_duplicated_cleanup() @@ -243,8 +262,15 @@ dad_duplicated_cleanup() cleanup } +dad_count_cleanup() +{ + $DEBUG && dump + cleanup +} + atf_init_test_cases() { atf_add_test_case dad_basic atf_add_test_case dad_duplicated + atf_add_test_case dad_count } diff --git a/contrib/netbsd-tests/net/ndp/t_ndp.sh b/contrib/netbsd-tests/net/ndp/t_ndp.sh index 4491981..aa96390 100755 --- a/contrib/netbsd-tests/net/ndp/t_ndp.sh +++ b/contrib/netbsd-tests/net/ndp/t_ndp.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ndp.sh,v 1.13 2016/08/10 23:07:57 kre Exp $ +# $NetBSD: t_ndp.sh,v 1.17 2016/11/25 08:51:17 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,17 +25,12 @@ # POSSIBILITY OF SUCH DAMAGE. # -inetserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet" -inetserver="$inetserver -lrumpnet_netinet6 -lrumpnet_shmif" -inetserver="$inetserver -lrumpdev" -HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" - SOCKSRC=unix://commsock1 SOCKDST=unix://commsock2 IP6SRC=fc00::1 IP6DST=fc00::2 -DEBUG=true +DEBUG=${DEBUG:-true} TIMEOUT=1 atf_test_case ndp_cache_expiration cleanup @@ -78,9 +73,8 @@ setup_dst_server() { local assign_ip=$1 + rump_server_add_iface $SOCKDST shmif0 bus1 export RUMP_SERVER=$SOCKDST - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 if [ "$assign_ip" != no ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6DST fi @@ -97,8 +91,7 @@ setup_src_server() export RUMP_SERVER=$SOCKSRC # Setup an interface - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + rump_server_add_iface $SOCKSRC shmif0 bus1 atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6SRC atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig -w 10 @@ -119,8 +112,9 @@ get_timeout() ndp_cache_expiration_body() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKDST netinet6 setup_dst_server setup_src_server @@ -144,6 +138,8 @@ ndp_cache_expiration_body() atf_check -s exit:0 -o match:'permanent' rump.ndp -n $IP6SRC # Expired but remains until GC sweaps it (1 day) atf_check -s exit:0 -o match:'(1d0h0m|23h59m)' rump.ndp -n $IP6DST + + rump_server_destroy_ifaces } ifdown_dst_server() @@ -155,8 +151,9 @@ ifdown_dst_server() ndp_commands_body() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKDST netinet6 setup_dst_server setup_src_server @@ -217,13 +214,14 @@ ndp_commands_body() $DEBUG && rump.ndp -n -a atf_check -s exit:0 -o not-match:'permanent' rump.ndp -n fc00::10 - return 0 + rump_server_destroy_ifaces } ndp_cache_overwriting_body() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKDST netinet6 setup_dst_server setup_src_server @@ -249,7 +247,7 @@ ndp_cache_overwriting_body() #atf_check -s not-exit:0 -e ignore rump.ndp -s fc00::10 b2:a0:20:00:00:ff #$DEBUG && rump.ndp -n -a - return 0 + rump_server_destroy_ifaces } get_n_caches() @@ -261,8 +259,8 @@ get_n_caches() ndp_neighborgcthresh_body() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKDST netinet6 setup_dst_server no setup_src_server @@ -311,7 +309,7 @@ ndp_neighborgcthresh_body() atf_fail "Neighbor caches are not GC-ed" fi - return 0 + rump_server_destroy_ifaces } make_pkt_str_na() @@ -324,33 +322,18 @@ make_pkt_str_na() echo $pkt } -extract_new_packets() -{ - local old=./old - - if [ ! -f $old ]; then - old=/dev/null - fi - - shmif_dumpbus -p - bus1 2>/dev/null| \ - tcpdump -n -e -r - 2>/dev/null > ./new - diff -u $old ./new |grep '^+' |cut -d '+' -f 2 > ./diff - mv -f ./new ./old - cat ./diff -} - ndp_link_activation_body() { local linklocal= - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKDST netinet6 setup_dst_server setup_src_server # flush old packets - extract_new_packets > ./out + extract_new_packets bus1 > ./out export RUMP_SERVER=$SOCKSRC @@ -358,7 +341,7 @@ ndp_link_activation_body() b2:a1:00:00:00:01 atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out linklocal=$(rump.ifconfig shmif0 |awk '/fe80/ {print $2;}' |awk -F % '{print $1;}') @@ -371,7 +354,7 @@ ndp_link_activation_body() b2:a1:00:00:00:02 active atf_check -s exit:0 sleep 1 - extract_new_packets > ./out + extract_new_packets bus1 > ./out $DEBUG && cat ./out linklocal=$(rump.ifconfig shmif0 |awk '/fe80/ {print $2;}' |awk -F % '{print $1;}') @@ -379,39 +362,8 @@ ndp_link_activation_body() pkt=$(make_pkt_str_na $linklocal b2:a1:00:00:00:02) atf_check -s exit:0 -x "cat ./out |grep -q '$pkt'" -} -cleanup() -{ - env RUMP_SERVER=$SOCKSRC rump.halt - env RUMP_SERVER=$SOCKDST rump.halt -} - -dump_src() -{ - export RUMP_SERVER=$SOCKSRC - rump.netstat -nr - rump.ndp -n -a - rump.ifconfig - $HIJACKING dmesg -} - -dump_dst() -{ - export RUMP_SERVER=$SOCKDST - rump.netstat -nr - rump.ndp -n -a - rump.ifconfig - $HIJACKING dmesg -} - -dump() -{ - dump_src - dump_dst - shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - - $DEBUG && gdb -ex bt /usr/bin/rump_server rump_server.core - $DEBUG && gdb -ex bt /usr/sbin/rump.ndp rump.ndp.core + rump_server_destroy_ifaces } ndp_cache_expiration_cleanup() diff --git a/contrib/netbsd-tests/net/ndp/t_ra.sh b/contrib/netbsd-tests/net/ndp/t_ra.sh index cf81683..b234570 100755 --- a/contrib/netbsd-tests/net/ndp/t_ra.sh +++ b/contrib/netbsd-tests/net/ndp/t_ra.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ra.sh,v 1.3 2016/08/10 23:07:57 kre Exp $ +# $NetBSD: t_ra.sh,v 1.20 2017/01/11 03:15:44 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -25,27 +25,49 @@ # POSSIBILITY OF SUCH DAMAGE. # -RUMPFLAGS="-lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_netinet6" -RUMPFLAGS="${RUMPFLAGS} -lrumpnet_shmif -lrumpdev" -RUMPFLAGS="${RUMPFLAGS} -lrumpvfs -lrumpfs_ffs" - RUMPSRV=unix://r1 +RUMPSRV1_2=unix://r12 RUMPCLI=unix://r2 +RUMPSRV3=unix://r3 +RUMPSRV4=unix://r4 IP6SRV=fc00:1::1 +IP6SRV1_2=fc00:1::2 +IP6SRV_PREFIX=fc00:1: IP6CLI=fc00:2::2 -PIDFILE=/var/run/rump.rtadvd.pid +IP6SRV3=fc00:3::1 +IP6SRV3_PREFIX=fc00:3: +IP6SRV4=fc00:4::1 +IP6SRV4_PREFIX=fc00:4: +PIDFILE=./rump.rtadvd.pid +PIDFILE1_2=./rump.rtadvd.pid12 +PIDFILE3=./rump.rtadvd.pid3 +PIDFILE4=./rump.rtadvd.pid4 CONFIG=./rtadvd.conf -DEBUG=true +WAITTIME=2 +DEBUG=${DEBUG:-true} + +init_server() +{ + + export RUMP_SERVER=$1 + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.forwarding=1 + export LD_PRELOAD=/usr/lib/librumphijack.so + atf_check -s exit:0 mkdir -p /rump/var/chroot/rtadvd + unset LD_PRELOAD + unset RUMP_SERVER +} setup_shmif0() { - local IP6ADDR=${1} - shift + local sock=$1 + local IP6ADDR=$2 + + rump_server_add_iface $sock shmif0 bus1 - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + export RUMP_SERVER=$sock atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6ADDR} atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig -w 10 $DEBUG && rump.ifconfig } @@ -72,41 +94,81 @@ shmif0:\ _EOF } -atf_test_case basic cleanup -basic_head() +start_rtadvd() +{ + local sock=$1 + local pidfile=$2 + + export RUMP_SERVER=$sock + atf_check -s exit:0 rump.rtadvd -c ${CONFIG} -p $pidfile shmif0 + while [ ! -f $pidfile ]; do + sleep 0.2 + done + unset RUMP_SERVER +} + +check_entries() +{ + local cli=$1 + local srv=$2 + local addr_prefix=$3 + local mac_srv= ll_srv= + + ll_srv=$(get_linklocal_addr $srv shmif0) + mac_srv=$(get_macaddr $srv shmif0) + + export RUMP_SERVER=$cli + $DEBUG && dump_entries + atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r + atf_check -s exit:0 -o match:'advertised' rump.ndp -p + atf_check -s exit:0 -o match:"${ll_srv}%shmif0 \(reachable\)" rump.ndp -p + atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0 + atf_check -s exit:0 \ + -o match:"$ll_srv%shmif0 +$mac_srv +shmif0 +(23h59m|1d0h0m)..s S R" \ + rump.ndp -n -a + atf_check -s exit:0 -o match:$addr_prefix rump.ndp -n -a + atf_check -s exit:0 -o match:"$addr_prefix.+<AUTOCONF>" \ + rump.ifconfig shmif0 inet6 + unset RUMP_SERVER +} + +dump_entries() +{ + + echo ndp -n -a + rump.ndp -n -a + echo ndp -p + rump.ndp -p + echo ndp -r + rump.ndp -r +} + +atf_test_case ra_basic cleanup +ra_basic_head() { atf_set "descr" "Tests for basic functions of router advaertisement(RA)" atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" } -basic_body() +ra_basic_body() { - atf_check -s exit:0 rump_server ${RUMPFLAGS} ${RUMPSRV} - atf_check -s exit:0 rump_server ${RUMPFLAGS} ${RUMPCLI} + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 - export RUMP_SERVER=${RUMPSRV} - setup_shmif0 ${IP6SRV} - atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.forwarding=1 - export LD_PRELOAD=/usr/lib/librumphijack.so - atf_check -s exit:0 mkdir -p /rump/var/chroot/rtadvd - unset LD_PRELOAD - unset RUMP_SERVER + setup_shmif0 ${RUMPSRV} ${IP6SRV} + init_server $RUMPSRV + setup_shmif0 ${RUMPCLI} ${IP6CLI} export RUMP_SERVER=${RUMPCLI} - setup_shmif0 ${IP6CLI} $DEBUG && rump.ndp -n -a atf_check -s exit:0 -o match:'= 0' rump.sysctl net.inet6.ip6.accept_rtadv unset RUMP_SERVER create_rtadvdconfig - - export RUMP_SERVER=${RUMPSRV} - atf_check -s exit:0 rump.rtadvd -c ${CONFIG} shmif0 - atf_check -s exit:0 sleep 3 - atf_check -s exit:0 -o ignore -e empty cat ${PIDFILE} - unset RUMP_SERVER + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME export RUMP_SERVER=${RUMPCLI} atf_check -s exit:0 -o empty rump.ndp -r @@ -124,30 +186,482 @@ basic_body() atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 unset RUMP_SERVER - export RUMP_SERVER=${RUMPSRV} - atf_check -s exit:0 rump.rtadvd -c ${CONFIG} shmif0 - atf_check -s exit:0 sleep 3 - atf_check -s exit:0 -o ignore -e empty cat ${PIDFILE} + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + + rump_server_destroy_ifaces +} + +ra_basic_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + + $DEBUG && dump + cleanup +} + +atf_test_case ra_flush_prefix_entries cleanup +ra_flush_prefix_entries_head() +{ + + atf_set "descr" "Tests for flushing prefixes (ndp -P)" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_flush_prefix_entries_body() +{ + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 unset RUMP_SERVER + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + export RUMP_SERVER=${RUMPCLI} - $DEBUG && rump.ndp -n -a - $DEBUG && rump.ndp -r + + # Terminate rtadvd to prevent new RA messages from coming + # Note that ifconfig down; kill -TERM doesn't work + kill -KILL `cat ${PIDFILE}` + + # Flush all the entries in the prefix list + atf_check -s exit:0 rump.ndp -P + + $DEBUG && dump_entries atf_check -s exit:0 -o match:'if=shmif0' rump.ndp -r - atf_check -s exit:0 -o match:'advertised' rump.ndp -p + atf_check -s exit:0 -o empty rump.ndp -p atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0 - atf_check -s exit:0 -o match:'23h59m..s S R' rump.ndp -n -a + atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a + atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a + atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6 + unset RUMP_SERVER + + rump_server_destroy_ifaces +} + +ra_flush_prefix_entries_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_test_case ra_flush_defrouter_entries cleanup +ra_flush_defrouter_entries_head() +{ + + atf_set "descr" "Tests for flushing default routers (ndp -R)" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_flush_defrouter_entries_body() +{ + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + + export RUMP_SERVER=${RUMPCLI} + + # Terminate rtadvd to prevent new RA messages from coming + # Note that ifconfig down; kill -TERM doesn't work + kill -KILL `cat ${PIDFILE}` + + # Flush all the entries in the default router list + atf_check -s exit:0 rump.ndp -R + + $DEBUG && dump_entries + atf_check -s exit:0 -o empty rump.ndp -r + atf_check -s exit:0 -o match:'No advertising router' rump.ndp -p + atf_check -s exit:0 -o match:'linkmtu=1300' rump.ndp -n -i shmif0 + atf_check -s exit:0 -o match:'(23h59m|1d0h0m)..s S R' rump.ndp -n -a atf_check -s exit:0 -o match:'fc00:1:' rump.ndp -n -a atf_check -s exit:0 -o match:'fc00:1:' rump.ifconfig shmif0 inet6 unset RUMP_SERVER + rump_server_destroy_ifaces +} + +ra_flush_defrouter_entries_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_test_case ra_delete_address cleanup +ra_delete_address_head() +{ + + atf_set "descr" "Tests for deleting auto-configured address" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_delete_address_body() +{ + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + + export RUMP_SERVER=${RUMPCLI} + $DEBUG && rump.ifconfig shmif0 + atf_check -s exit:0 rump.ifconfig shmif0 inet6 \ + $(rump.ifconfig shmif0 |awk '/AUTOCONF/ {print $2}') delete + unset RUMP_SERVER + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` wait_term ${PIDFILE} - return 0 + rump_server_destroy_ifaces +} + +ra_delete_address_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + + $DEBUG && dump + cleanup +} + +atf_test_case ra_multiple_routers cleanup +ra_multiple_routers_head() +{ + + atf_set "descr" "Tests for multiple routers" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_multiple_routers_body() +{ + local n= + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_fs_start $RUMPSRV3 netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPSRV3} ${IP6SRV3} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + init_server $RUMPSRV3 + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + start_rtadvd $RUMPSRV3 $PIDFILE3 + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + check_entries $RUMPCLI $RUMPSRV3 $IP6SRV3_PREFIX + + export RUMP_SERVER=$RUMPCLI + # Two prefixes are advertised by differnt two routers + n=$(rump.ndp -p |grep 'advertised by' |wc -l) + atf_check_equal $n 2 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + atf_check -s exit:0 kill -TERM `cat ${PIDFILE3}` + wait_term ${PIDFILE3} + + rump_server_destroy_ifaces +} + +ra_multiple_routers_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + if [ -f ${PIDFILE3} ]; then + kill -TERM `cat ${PIDFILE3}` + wait_term ${PIDFILE3} + fi + + $DEBUG && dump + cleanup +} + +atf_test_case ra_multiple_routers_single_prefix cleanup +ra_multiple_routers_single_prefix_head() +{ + + atf_set "descr" "Tests for multiple routers with a single prefix" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_multiple_routers_single_prefix_body() +{ + local n= + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_fs_start $RUMPSRV1_2 netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPSRV1_2} ${IP6SRV1_2} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + init_server $RUMPSRV1_2 + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + start_rtadvd $RUMPSRV1_2 $PIDFILE1_2 + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + check_entries $RUMPCLI $RUMPSRV1_2 $IP6SRV_PREFIX + + export RUMP_SERVER=$RUMPCLI + # One prefix is advertised by differnt two routers + n=$(rump.ndp -p |grep 'advertised by' |wc -l) + atf_check_equal $n 1 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + atf_check -s exit:0 kill -TERM `cat ${PIDFILE1_2}` + wait_term ${PIDFILE1_2} + + rump_server_destroy_ifaces +} + +ra_multiple_routers_single_prefix_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + if [ -f ${PIDFILE1_2} ]; then + kill -TERM `cat ${PIDFILE1_2}` + wait_term ${PIDFILE1_2} + fi + + $DEBUG && dump + cleanup +} + +atf_test_case ra_multiple_routers_maxifprefixes cleanup +ra_multiple_routers_maxifprefixes_head() +{ + + atf_set "descr" "Tests for exceeding the number of maximum prefixes" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_multiple_routers_maxifprefixes_body() +{ + local n= + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_fs_start $RUMPSRV3 netinet6 + rump_server_fs_start $RUMPSRV4 netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + setup_shmif0 ${RUMPSRV3} ${IP6SRV3} + setup_shmif0 ${RUMPSRV4} ${IP6SRV4} + setup_shmif0 ${RUMPCLI} ${IP6CLI} + + init_server $RUMPSRV + init_server $RUMPSRV3 + init_server $RUMPSRV4 + + create_rtadvdconfig + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + # Limit the maximum number of prefix entries to 2 + atf_check -s exit:0 -o match:'16.->.2' \ + rump.sysctl -w net.inet6.ip6.maxifprefixes=2 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + start_rtadvd $RUMPSRV3 $PIDFILE3 + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + check_entries $RUMPCLI $RUMPSRV3 $IP6SRV3_PREFIX + + start_rtadvd $RUMPSRV4 $PIDFILE4 + sleep $WAITTIME + + export RUMP_SERVER=${RUMPCLI} + $DEBUG && dump_entries + # There should remain two prefixes + n=$(rump.ndp -p |grep 'advertised by' |wc -l) + atf_check_equal $n 2 + # TODO check other conditions + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + atf_check -s exit:0 kill -TERM `cat ${PIDFILE3}` + wait_term ${PIDFILE3} + atf_check -s exit:0 kill -TERM `cat ${PIDFILE4}` + wait_term ${PIDFILE4} + + rump_server_destroy_ifaces +} + +ra_multiple_routers_maxifprefixes_cleanup() +{ + + if [ -f ${PIDFILE} ]; then + kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + fi + if [ -f ${PIDFILE3} ]; then + kill -TERM `cat ${PIDFILE3}` + wait_term ${PIDFILE3} + fi + if [ -f ${PIDFILE4} ]; then + kill -TERM `cat ${PIDFILE4}` + wait_term ${PIDFILE4} + fi + + $DEBUG && dump + cleanup +} + +atf_test_case ra_temporary_address cleanup +ra_temporary_address_head() +{ + + atf_set "descr" "Tests for IPv6 temporary address" + atf_set "require.progs" "rump_server rump.rtadvd rump.ndp rump.ifconfig" +} + +ra_temporary_address_body() +{ + + rump_server_fs_start $RUMPSRV netinet6 + rump_server_start $RUMPCLI netinet6 + + setup_shmif0 ${RUMPSRV} ${IP6SRV} + init_server $RUMPSRV + + setup_shmif0 ${RUMPCLI} ${IP6CLI} + export RUMP_SERVER=${RUMPCLI} + $DEBUG && rump.ndp -n -a + atf_check -s exit:0 -o match:'= 0' \ + rump.sysctl net.inet6.ip6.accept_rtadv + atf_check -s exit:0 -o match:'= 0' \ + rump.sysctl net.inet6.ip6.use_tempaddr + unset RUMP_SERVER + + create_rtadvdconfig + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o empty rump.ndp -r + atf_check -s exit:0 -o not-match:'advertised' rump.ndp -p + atf_check -s exit:0 -o match:'linkmtu=0' rump.ndp -n -i shmif0 + atf_check -s exit:0 -o not-match:'S R' rump.ndp -n -a + atf_check -s exit:0 -o not-match:'fc00:1:' rump.ndp -n -a + atf_check -s exit:0 -o not-match:'fc00:1:' rump.ifconfig shmif0 inet6 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet6.ip6.accept_rtadv=1 + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet6.ip6.use_tempaddr=1 + unset RUMP_SERVER + + start_rtadvd $RUMPSRV $PIDFILE + sleep $WAITTIME + + check_entries $RUMPCLI $RUMPSRV $IP6SRV_PREFIX + + # Check temporary address + export RUMP_SERVER=${RUMPCLI} + atf_check -s exit:0 -o match:"$IP6SRV_PREFIX.+<AUTOCONF,TEMPORARY>" \ + rump.ifconfig shmif0 inet6 + unset RUMP_SERVER + + atf_check -s exit:0 kill -TERM `cat ${PIDFILE}` + wait_term ${PIDFILE} + + rump_server_destroy_ifaces } -basic_cleanup() +ra_temporary_address_cleanup() { if [ -f ${PIDFILE} ]; then @@ -155,12 +669,19 @@ basic_cleanup() wait_term ${PIDFILE} fi - env RUMP_SERVER=${RUMPSRV} rump.halt - env RUMP_SERVER=${RUMPCLI} rump.halt + $DEBUG && dump + cleanup } atf_init_test_cases() { - atf_add_test_case basic + atf_add_test_case ra_basic + atf_add_test_case ra_flush_prefix_entries + atf_add_test_case ra_flush_defrouter_entries + atf_add_test_case ra_delete_address + atf_add_test_case ra_multiple_routers + atf_add_test_case ra_multiple_routers_single_prefix + atf_add_test_case ra_multiple_routers_maxifprefixes + atf_add_test_case ra_temporary_address } diff --git a/contrib/netbsd-tests/net/net/t_forwarding.sh b/contrib/netbsd-tests/net/net/t_forwarding.sh index 9e96738..fc30530 100755 --- a/contrib/netbsd-tests/net/net/t_forwarding.sh +++ b/contrib/netbsd-tests/net/net/t_forwarding.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_forwarding.sh,v 1.15 2016/08/10 21:33:52 kre Exp $ +# $NetBSD: t_forwarding.sh,v 1.19 2016/11/25 08:51:17 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,9 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -inetserver="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif -lrumpdev" -inet6server="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_netinet6 -lrumpnet_shmif -lrumpdev" - SOCKSRC=unix://commsock1 SOCKFWD=unix://commsock2 SOCKDST=unix://commsock3 @@ -40,10 +37,9 @@ IP6SRC=fc00:0:0:1::2 IP6SRCGW=fc00:0:0:1::1 IP6DSTGW=fc00:0:0:2::1 IP6DST=fc00:0:0:2::2 -HTTPD_PID=httpd.pid HTML_FILE=index.html -DEBUG=false +DEBUG=${DEBUG:-false} TIMEOUT=5 atf_test_case ipforwarding_v4 cleanup @@ -64,6 +60,18 @@ ipforwarding_v6_head() atf_set "require.progs" "rump_server" } +ipforwarding_fastforward_v4_head() +{ + atf_set "descr" "Tests for IPv4 fastforward" + atf_set "require.progs" "rump_server" +} + +ipforwarding_fastforward_v6_head() +{ + atf_set "descr" "Tests for IPv6 fastfoward" + atf_set "require.progs" "rump_server" +} + ipforwarding_misc_head() { atf_set "descr" "Does IPv4 forwarding tests" @@ -78,9 +86,9 @@ setup_endpoint() mode=${4} gw=${5} + rump_server_add_iface $sock shmif0 $bus + export RUMP_SERVER=${sock} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${bus} if [ $mode = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${addr} atf_check -s exit:0 -o ignore rump.route add -inet6 default ${gw} @@ -116,12 +124,10 @@ setup_forwarder() { mode=${1} - export RUMP_SERVER=$SOCKFWD - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus1 + rump_server_add_iface $SOCKFWD shmif0 bus1 + rump_server_add_iface $SOCKFWD shmif1 bus2 - atf_check -s exit:0 rump.ifconfig shmif1 create - atf_check -s exit:0 rump.ifconfig shmif1 linkstr bus2 + export RUMP_SERVER=$SOCKFWD if [ $mode = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6SRCGW} @@ -146,9 +152,9 @@ setup_forwarder() setup() { - atf_check -s exit:0 ${inetserver} $SOCKSRC - atf_check -s exit:0 ${inetserver} $SOCKFWD - atf_check -s exit:0 ${inetserver} $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKFWD + rump_server_start $SOCKDST setup_endpoint $SOCKSRC $IP4SRC bus1 ipv4 $IP4SRCGW setup_endpoint $SOCKDST $IP4DST bus2 ipv4 $IP4DSTGW @@ -157,29 +163,15 @@ setup() setup6() { - atf_check -s exit:0 ${inet6server} $SOCKSRC - atf_check -s exit:0 ${inet6server} $SOCKFWD - atf_check -s exit:0 ${inet6server} $SOCKDST + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKFWD netinet6 + rump_server_start $SOCKDST netinet6 setup_endpoint $SOCKSRC $IP6SRC bus1 ipv6 $IP6SRCGW setup_endpoint $SOCKDST $IP6DST bus2 ipv6 $IP6DSTGW setup_forwarder ipv6 } -setup_bozo() -{ - local ip=$1 - - export RUMP_SERVER=$SOCKDST - - touch $HTML_FILE - # start bozo in daemon mode - atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \ - /usr/libexec/httpd -P $HTTPD_PID -i $ip -b -s $(pwd) - - $DEBUG && rump.netstat -a -} - test_http_get() { local ip=$1 @@ -270,15 +262,8 @@ teardown_icmp_bmcastecho() teardown_interfaces() { - export RUMP_SERVER=$SOCKSRC - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 destroy - export RUMP_SERVER=$SOCKFWD - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 destroy - atf_check -s exit:0 -o ignore rump.ifconfig shmif1 destroy - - export RUMP_SERVER=$SOCKDST - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 destroy + rump_server_destroy_ifaces } test_setup_forwarding() @@ -307,33 +292,6 @@ test_teardown_forwarding6() rump.sysctl net.inet6.ip6.forwarding } -cleanup() -{ - env RUMP_SERVER=$SOCKSRC rump.halt - env RUMP_SERVER=$SOCKFWD rump.halt - env RUMP_SERVER=$SOCKDST rump.halt -} - -cleanup_bozo() -{ - - if [ -f $HTTPD_PID ]; then - kill -9 "$(cat $HTTPD_PID)" - rm -f $HTTPD_PID - fi - rm -f $HTML_FILE -} - -dump() -{ - env RUMP_SERVER=$SOCKSRC rump.netstat -nr - env RUMP_SERVER=$SOCKFWD rump.netstat -nr - env RUMP_SERVER=$SOCKDST rump.netstat -nr - - /usr/bin/shmif_dumpbus -p - bus1 2>/dev/null| /usr/sbin/tcpdump -n -e -r - - /usr/bin/shmif_dumpbus -p - bus2 2>/dev/null| /usr/sbin/tcpdump -n -e -r - -} - test_ping_failure() { export RUMP_SERVER=$SOCKSRC @@ -481,7 +439,10 @@ ipforwarding_fastforward_v4_body() setup_forwarding test_setup_forwarding - setup_bozo $IP4DST + touch $HTML_FILE + start_httpd $SOCKDST $IP4DST + $DEBUG && rump.netstat -a + test_http_get $IP4DST teardown_interfaces @@ -495,7 +456,10 @@ ipforwarding_fastforward_v6_body() setup_forwarding6 test_setup_forwarding6 - setup_bozo $IP6DST + touch $HTML_FILE + start_httpd $SOCKDST $IP6DST + $DEBUG && rump.netstat -a + test_http_get "[$IP6DST]" teardown_interfaces @@ -513,7 +477,10 @@ ipforwarding_misc_body() test_directed_broadcast - setup_bozo $IP4DST + touch $HTML_FILE + start_httpd $SOCKDST $IP4DST + $DEBUG && rump.netstat -a + test_sysctl_ttl $IP4DST teardown_interfaces @@ -522,34 +489,34 @@ ipforwarding_misc_body() ipforwarding_v4_cleanup() { - dump + $DEBUG && dump cleanup } ipforwarding_v6_cleanup() { - dump + $DEBUG && dump cleanup } ipforwarding_fastforward_v4_cleanup() { - dump - cleanup_bozo + $DEBUG && dump + stop_httpd cleanup } ipforwarding_fastforward_v6_cleanup() { - dump - cleanup_bozo + $DEBUG && dump + stop_httpd cleanup } ipforwarding_misc_cleanup() { - dump - cleanup_bozo + $DEBUG && dump + stop_httpd cleanup } diff --git a/contrib/netbsd-tests/net/net/t_ipaddress.sh b/contrib/netbsd-tests/net/net/t_ipaddress.sh index a46f484..4cdd954 100755 --- a/contrib/netbsd-tests/net/net/t_ipaddress.sh +++ b/contrib/netbsd-tests/net/net/t_ipaddress.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ipaddress.sh,v 1.3 2016/08/10 21:33:52 kre Exp $ +# $NetBSD: t_ipaddress.sh,v 1.9 2016/12/15 02:43:56 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -25,61 +25,37 @@ # POSSIBILITY OF SUCH DAMAGE. # -SERVER="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif -lrumpdev" -SERVER6="$SERVER -lrumpnet_netinet6" SOCK_LOCAL=unix://commsock1 BUS=bus -DEBUG=false - -check_entry() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local word=$2 - - atf_check -s exit:0 -o match:"$word" -e ignore -x \ - "rump.netstat -rn | grep ^'$ip'" -} - -check_entry_fail() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local flags=$2 # Not used currently - - atf_check -s not-exit:0 -e ignore -x \ - "rump.netstat -rn | grep ^'$ip'" -} +DEBUG=${DEBUG:-false} test_same_address() { local ip=10.0.0.1 local net=10.0.0/24 - atf_check -s exit:0 ${SERVER} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS + export RUMP_SERVER=$SOCK_LOCAL - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 $ip/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.netstat -nr -f inet - check_entry $ip UHl - check_entry $ip lo0 - check_entry $ip 'link#2' - check_entry $net U - check_entry $net shmif0 - check_entry $net 'link#2' + check_route $ip 'link#2' UHl lo0 + check_route $net 'link#2' UC shmif0 # Delete the address atf_check -s exit:0 -o ignore rump.ifconfig shmif0 $ip delete $DEBUG && rump.netstat -nr -f inet - check_entry_fail $ip - check_entry_fail $net + check_route_no_entry $ip + check_route_no_entry $net # Assign the same address again atf_check -s exit:0 -o ignore rump.ifconfig shmif0 $ip/24 @@ -87,20 +63,18 @@ test_same_address() $DEBUG && rump.netstat -nr -f inet - check_entry $ip UHl - check_entry $ip lo0 - check_entry $ip 'link#2' - check_entry $net U - check_entry $net shmif0 - check_entry $net 'link#2' + check_route $ip 'link#2' UHl lo0 + check_route $net 'link#2' UC shmif0 # Delete the address again atf_check -s exit:0 -o ignore rump.ifconfig shmif0 $ip delete $DEBUG && rump.netstat -nr -f inet - check_entry_fail $ip - check_entry_fail $net + check_route_no_entry $ip + check_route_no_entry $net + + rump_server_destroy_ifaces } test_same_address6() @@ -108,31 +82,27 @@ test_same_address6() local ip=fc00::1 local net=fc00::/64 - atf_check -s exit:0 ${SERVER6} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL netinet6 + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS + export RUMP_SERVER=$SOCK_LOCAL - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $ip atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.netstat -nr -f inet6 - check_entry $ip UHl - check_entry $ip lo0 - check_entry $ip 'link#2' - check_entry $net U - check_entry $net shmif0 - check_entry $net 'link#2' + check_route $ip 'link#2' UHl lo0 + check_route $net 'link#2' UC shmif0 # Delete the address atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $ip delete $DEBUG && rump.netstat -nr -f inet6 - check_entry_fail $ip - check_entry_fail $net + check_route_no_entry $ip + check_route_no_entry $net # Assign the same address again atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $ip @@ -140,27 +110,58 @@ test_same_address6() $DEBUG && rump.netstat -nr -f inet6 - check_entry $ip UHl - check_entry $ip lo0 - check_entry $ip 'link#2' - check_entry $net U - check_entry $net shmif0 - check_entry $net 'link#2' + check_route $ip 'link#2' UHl lo0 + check_route $net 'link#2' UC shmif0 # Delete the address again atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $ip delete $DEBUG && rump.netstat -nr -f inet6 - check_entry_fail $ip - check_entry_fail $net + check_route_no_entry $ip + check_route_no_entry $net + + rump_server_destroy_ifaces } -cleanup() +test_auto_linklocal() { - $DEBUG && shmif_dumpbus -p - $BUS 2>/dev/null | tcpdump -n -e -r - - env RUMP_SERVER=$SOCK_LOCAL rump.halt + rump_server_start $SOCK_LOCAL netinet6 + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS + + export RUMP_SERVER=$SOCK_LOCAL + + # + # Test enabled auto linklocal + # + + # Check default value + atf_check -s exit:0 -o match:"1" rump.sysctl -n net.inet6.ip6.auto_linklocal + + atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 + + $DEBUG && rump.netstat -nr -f inet + + # IPv6 link-local address is set + atf_check -s exit:0 -o match:"inet6 fe80::" rump.ifconfig shmif0 + + # + # Test disabled auto linklocal + # + atf_check -s exit:0 -o ignore rump.sysctl -w -q net.inet6.ip6.auto_linklocal=0 + + rump_server_add_iface $SOCK_LOCAL shmif1 $BUS + atf_check -s exit:0 -o ignore rump.ifconfig shmif1 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 + + $DEBUG && rump.netstat -nr -f inet + + # IPv6 link-local address is not set + atf_check -s exit:0 -o not-match:"inet6 fe80::" rump.ifconfig shmif1 + + rump_server_destroy_ifaces } add_test() @@ -177,6 +178,7 @@ add_test() test_${name}; \ }; \ ipaddr_${name}_cleanup() { \ + $DEBUG && dump; \ cleanup; \ }" atf_add_test_case "ipaddr_${name}" @@ -187,4 +189,5 @@ atf_init_test_cases() add_test same_address "Assigning/deleting an IP address twice" add_test same_address6 "Assigning/deleting an IPv6 address twice" + add_test auto_linklocal "Assigning an IPv6 link-local address automatically" } diff --git a/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh b/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh index 5fb34d0..10e50fd 100755 --- a/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh +++ b/contrib/netbsd-tests/net/net/t_ipv6_lifetime.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ipv6_lifetime.sh,v 1.2 2016/08/10 21:33:52 kre Exp $ +# $NetBSD: t_ipv6_lifetime.sh,v 1.6 2016/11/25 08:51:17 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,13 +25,12 @@ # POSSIBILITY OF SUCH DAMAGE. # -INET6SERVER="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpdev" -INET6SERVER="$INET6SERVER -lrumpnet_netinet6 -lrumpnet_shmif" - SOCK=unix://sock BUS=./bus -DEBUG=false +DEBUG=${DEBUG:-false} + +deprecated="[Dd][Ee][Pp][Rr][Ee][Cc][Aa][Tt][Ee][Dd]" atf_test_case basic cleanup @@ -47,11 +46,11 @@ basic_body() local bonus=2 local ip="fc00::1" - atf_check -s exit:0 ${INET6SERVER} $SOCK + rump_server_start $SOCK netinet6 + rump_server_add_iface $SOCK shmif0 $BUS + export RUMP_SERVER=$SOCK - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS atf_check -s exit:0 rump.ifconfig shmif0 up # A normal IP address doesn't contain preferred/valid lifetime @@ -69,7 +68,7 @@ basic_body() atf_check -s exit:0 sleep $(($time + $bonus)) $DEBUG && rump.ifconfig -L shmif0 # Should remain but marked as deprecated - atf_check -s exit:0 -o match:'deprecated' rump.ifconfig -L shmif0 + atf_check -s exit:0 -o match:"$ip.+$deprecated" rump.ifconfig -L shmif0 atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip delete # Setting only a valid lifetime (invalid) @@ -87,38 +86,33 @@ basic_body() # Shouldn't remain anymore atf_check -s exit:0 -o not-match:"$ip" rump.ifconfig -L shmif0 + # Setting both preferred and valid lifetimes (pltime > vltime) + atf_check -s not-exit:0 -e match:'Invalid argument' rump.ifconfig \ + shmif0 inet6 $ip pltime $(($time * 2)) vltime $time + # Setting both preferred and valid lifetimes (pltime < vltime) atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip \ pltime $time vltime $((time * 2)) $DEBUG && rump.ifconfig -L shmif0 atf_check -s exit:0 -o match:'pltime' rump.ifconfig -L shmif0 atf_check -s exit:0 -o match:'vltime' rump.ifconfig -L shmif0 + + if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 + then + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip delete + atf_skip "unreliable under qemu, skip until PR kern/43997 fixed" + fi + atf_check -s exit:0 sleep $(($time + $bonus)) $DEBUG && rump.ifconfig -L shmif0 # Should remain but marked as deprecated - atf_check -s exit:0 -o match:'deprecated' rump.ifconfig -L shmif0 + atf_check -s exit:0 -o match:"$ip.+$deprecated" rump.ifconfig -L shmif0 atf_check -s exit:0 sleep $(($time + $bonus)) $DEBUG && rump.ifconfig -L shmif0 # Shouldn't remain anymore atf_check -s exit:0 -o not-match:"$ip" rump.ifconfig -L shmif0 - # Setting both preferred and valid lifetimes (pltime > vltime) - atf_check -s not-exit:0 -e match:'Invalid argument' rump.ifconfig \ - shmif0 inet6 $ip pltime $(($time * 2)) vltime $time - - return 0 -} - -cleanup() -{ - env RUMP_SERVER=$SOCK rump.halt -} - -dump() -{ - env RUMP_SERVER=$SOCK rump.ifconfig - env RUMP_SERVER=$SOCK rump.netstat -nr - shmif_dumpbus -p - $BUS 2>/dev/null| tcpdump -n -e -r - + rump_server_destroy_ifaces } basic_cleanup() diff --git a/contrib/netbsd-tests/net/net/t_ipv6address.sh b/contrib/netbsd-tests/net/net/t_ipv6address.sh index 3448e86..539a16d 100755 --- a/contrib/netbsd-tests/net/net/t_ipv6address.sh +++ b/contrib/netbsd-tests/net/net/t_ipv6address.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_ipv6address.sh,v 1.7 2016/08/10 21:33:52 kre Exp $ +# $NetBSD: t_ipv6address.sh,v 1.12 2016/12/14 02:50:42 ozaki-r Exp $ # # Copyright (c) 2015 Internet Initiative Japan Inc. # All rights reserved. @@ -24,8 +24,9 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -SERVER="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif -lrumpdev" -SERVER6="$SERVER -lrumpnet_netinet6" +SERVER="rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet" +SERVER="${SERVER} -lrumpnet_shmif -lrumpdev" +SERVER6="${SERVER} -lrumpnet_netinet6" SOCKSRC=unix://commsock1 SOCKFWD=unix://commsock2 @@ -40,7 +41,7 @@ BUS2=bus2 BUSSRC=bus_src BUSDST=bus_dst -DEBUG=true +DEBUG=${DEBUG:-true} TIMEOUT=3 atf_test_case linklocal cleanup @@ -118,41 +119,41 @@ setup_route() { local tmp_rump_server=$RUMP_SERVER - local src_if0_lladdr=`get_lladdr ${SOCKSRC} shmif0` - local dst_if0_lladdr=`get_lladdr ${SOCKDST} shmif0` - local fwd_if0_lladdr=`get_lladdr ${SOCKFWD} shmif0` - local fwd_if1_lladdr=`get_lladdr ${SOCKFWD} shmif1` + local src_if0_lladdr=`get_linklocal_addr ${SOCKSRC} shmif0` + local dst_if0_lladdr=`get_linklocal_addr ${SOCKDST} shmif0` + local fwd_if0_lladdr=`get_linklocal_addr ${SOCKFWD} shmif0` + local fwd_if1_lladdr=`get_linklocal_addr ${SOCKFWD} shmif1` export RUMP_SERVER=${SOCKSRC} - atf_check -s ignore -o ignore -e ignore rump.route delete -inet6 default \ - ${fwd_if0_lladdr}%shmif0 - atf_check -s exit:0 -o match:"add net default:" rump.route add -inet6 default \ - ${fwd_if0_lladdr}%shmif0 + atf_check -s ignore -o ignore -e ignore \ + rump.route delete -inet6 default ${fwd_if0_lladdr}%shmif0 + atf_check -s exit:0 -o match:"add net default:" \ + rump.route add -inet6 default ${fwd_if0_lladdr}%shmif0 atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6SRC} atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.netstat -rn -f inet6 unset RUMP_SERVER export RUMP_SERVER=${SOCKDST} - atf_check -s ignore -o ignore -e ignore rump.route delete -inet6 default \ - ${fwd_if1_lladdr}%shmif0 - atf_check -s exit:0 -o match:"add net default:" rump.route add -inet6 default \ - ${fwd_if1_lladdr}%shmif0 + atf_check -s ignore -o ignore -e ignore \ + rump.route delete -inet6 default ${fwd_if1_lladdr}%shmif0 + atf_check -s exit:0 -o match:"add net default:" \ + rump.route add -inet6 default ${fwd_if1_lladdr}%shmif0 atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6DST} atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.netstat -rn -f inet6 unset RUMP_SERVER export RUMP_SERVER=${SOCKFWD} - atf_check -s ignore -o ignore -e ignore rump.route delete -inet6 ${IP6SRCNW} \ - ${src_if0_lladdr}%shmif0 - atf_check -s exit:0 -o match:"add net" rump.route add -inet6 ${IP6SRCNW} \ - ${src_if0_lladdr}%shmif0 - - atf_check -s ignore -o ignore -e ignore rump.route delete -inet6 ${IP6DSTNW} \ - ${dst_if0_lladdr}%shmif1 - atf_check -s exit:0 -o match:"add net" rump.route add -inet6 ${IP6DSTNW} \ - ${dst_if0_lladdr}%shmif1 + atf_check -s ignore -o ignore -e ignore \ + rump.route delete -inet6 ${IP6SRCNW} ${src_if0_lladdr}%shmif0 + atf_check -s exit:0 -o match:"add net" \ + rump.route add -inet6 ${IP6SRCNW} ${src_if0_lladdr}%shmif0 + + atf_check -s ignore -o ignore -e ignore \ + rump.route delete -inet6 ${IP6DSTNW} ${dst_if0_lladdr}%shmif1 + atf_check -s exit:0 -o match:"add net" \ + rump.route add -inet6 ${IP6DSTNW} ${dst_if0_lladdr}%shmif1 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.netstat -rn -f inet6 unset RUMP_SERVER @@ -197,17 +198,6 @@ cleanup_bus() export RUMP_SERVER=$tmp_rump_server } - -get_lladdr() -{ - export RUMP_SERVER=${1} - rump.ifconfig ${2} inet6 | grep "fe80" \ - | awk '{print $2}' | sed -e "s/%$2//g" - unset RUMP_SERVER - - return 0 -} - cleanup_rump_servers() { @@ -221,11 +211,11 @@ dump_bus() shmif_dumpbus -p - ${BUSSRC} 2>/dev/null| tcpdump -n -e -r - shmif_dumpbus -p - ${BUSDST} 2>/dev/null| tcpdump -n -e -r - - shmif_dumpbus -p - ${BUS1} 2>/dev/null| tcpdump -n -e -r - - shmif_dumpbus -p - ${BUS2} 2>/dev/null| tcpdump -n -e -r - + shmif_dumpbus -p - ${BUS1} 2>/dev/null| tcpdump -n -e -r - + shmif_dumpbus -p - ${BUS2} 2>/dev/null| tcpdump -n -e -r - } -dump() +_dump() { export RUMP_SERVER=${SOCKSRC} @@ -242,19 +232,21 @@ dump() linklocal_head() { - atf_set "descr" "Test for bassically function of the IPv6 linklocal address" - atf_set "require.progs" "rump_server rump.route rump.ifconfig rump.ping6" + atf_set "descr" \ + "Test for bassically function of the IPv6 linklocal address" + atf_set "require.progs" \ + "rump_server rump.route rump.ifconfig rump.ping6" } linklocal_body() { setup - local src_if0_lladdr=`get_lladdr ${SOCKSRC} shmif0` - local src_if1_lladdr=`get_lladdr ${SOCKSRC} shmif1` - local dst_if0_lladdr=`get_lladdr ${SOCKDST} shmif0` - local fwd_if0_lladdr=`get_lladdr ${SOCKFWD} shmif0` - local fwd_if1_lladdr=`get_lladdr ${SOCKFWD} shmif1` + local src_if0_lladdr=`get_linklocal_addr ${SOCKSRC} shmif0` + local src_if1_lladdr=`get_linklocal_addr ${SOCKSRC} shmif1` + local dst_if0_lladdr=`get_linklocal_addr ${SOCKDST} shmif0` + local fwd_if0_lladdr=`get_linklocal_addr ${SOCKFWD} shmif0` + local fwd_if1_lladdr=`get_linklocal_addr ${SOCKFWD} shmif1` export RUMP_SERVER=${SOCKSRC} $DEBUG && rump.ifconfig @@ -271,7 +263,7 @@ linklocal_body() atf_check -s ignore -o empty -e ignore \ -x "shmif_dumpbus -p - ${BUSSRC} | tcpdump -r - -n -p icmp6" atf_check -s ignore -o not-empty -e ignore \ - -x "shmif_dumpbus -p - ${BUS1} | tcpdump -r - -n -p icmp6" + -x "shmif_dumpbus -p - ${BUS1} | tcpdump -r - -n -p icmp6" cleanup_bus @@ -279,7 +271,7 @@ linklocal_body() rump.ping6 -c 1 -X $TIMEOUT -n -S ${src_if1_lladdr}%shmif1 \ ${fwd_if0_lladdr}%shmif0 atf_check -s ignore -o not-match:"${src_if1_lladdr}" -e ignore \ - -x "shmif_dumpbus -p - ${BUS1} | tcpdump -r - -n -p icmp6" + -x "shmif_dumpbus -p - ${BUS1} | tcpdump -r - -n -p icmp6" $DEBUG && shmif_dumpbus -p - ${BUS1} | tcpdump -r - -n -p icmp6 unset RUMP_SERVER @@ -290,16 +282,16 @@ linklocal_body() unset RUMP_SERVER export RUMP_SERVER=${SOCKSRC} - atf_check -s exit:0 -o match:"add net default:" rump.route add -inet6 default \ - ${fwd_if0_lladdr}%shmif0 + atf_check -s exit:0 -o match:"add net default:" \ + rump.route add -inet6 default ${fwd_if0_lladdr}%shmif0 atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.ifconfig shmif0 - $DEBUG && dump + $DEBUG && _dump export RUMP_SERVER=${SOCKSRC} atf_check -s exit:0 -o match:"0.0% packet loss" \ - rump.ping6 -c 1 -X $TIMEOUT -n -S ${src_if0_lladdr}%shmif0 ${IP6FWD0} + rump.ping6 -c 1 -X $TIMEOUT -n -S ${src_if0_lladdr}%shmif0 ${IP6FWD0} unset RUMP_SERVER export RUMP_SERVER=${SOCKFWD} @@ -340,7 +332,7 @@ linklocal_body() linklocal_cleanup() { - $DEBUG && dump + $DEBUG && _dump $DEBUG && dump_bus cleanup_rump_servers } @@ -348,7 +340,8 @@ linklocal_cleanup() linklocal_ops_head() { - atf_set "descr" "Test for various operations to IPv6 linklocal addresses" + atf_set "descr" \ + "Test for various operations to IPv6 linklocal addresses" atf_set "require.progs" "rump_server rump.route rump.ndp" } @@ -358,7 +351,7 @@ linklocal_ops_body() setup - src_if0_lladdr=`get_lladdr ${SOCKSRC} shmif0` + src_if0_lladdr=`get_linklocal_addr ${SOCKSRC} shmif0` export RUMP_SERVER=${SOCKSRC} diff --git a/contrib/netbsd-tests/net/net/t_mtudisc.sh b/contrib/netbsd-tests/net/net/t_mtudisc.sh new file mode 100755 index 0000000..a99d652 --- /dev/null +++ b/contrib/netbsd-tests/net/net/t_mtudisc.sh @@ -0,0 +1,192 @@ +# $NetBSD: t_mtudisc.sh,v 1.8 2016/12/21 01:16:18 ozaki-r Exp $ +# +# Copyright (c) 2016 Internet Initiative Japan Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +SOCKLOCAL=unix://commsock1 +SOCKGATEWAY=unix://commsock2 +SOCKREMOTE=unix://commsock3 +HTML_FILE=index.html + +DEBUG=${DEBUG:-false} + +atf_test_case mtudisc_basic cleanup + +mtudisc_basic_head() +{ + atf_set "descr" "Tests for IPv4 Path MTU Dicorvery basic behavior" + atf_set "require.progs" "rump_server" +} + +setup_server() +{ + local sock=$1 + local if=$2 + local bus=$3 + local ip=$4 + + rump_server_add_iface $sock $if $bus + + export RUMP_SERVER=$sock + atf_check -s exit:0 rump.ifconfig $if $ip + atf_check -s exit:0 rump.ifconfig $if up + atf_check -s exit:0 rump.ifconfig -w 10 + + $DEBUG && rump.ifconfig $if +} + +prepare_download_file() +{ + local file=$1 + local data="0123456789" + + touch $file + for i in `seq 1 512` + do + echo $data >> $file + done +} + +do_http_get() +{ + local ip=$1 + local ret=$2 + local timeout=5 + + # get the webpage + atf_check -s exit:$ret env LD_PRELOAD=/usr/lib/librumphijack.so \ + ftp -q $timeout -o ./out http://$ip/$HTML_FILE +} + +mtudisc_basic_body() +{ + local pkt= + local local_ip=10.0.0.2 + local gateway_local_ip=10.0.0.1 + local gateway_remote_ip=10.0.1.1 + local remote_ip=10.0.1.2 + local prefixlen=24 + + rump_server_start $SOCKLOCAL + rump_server_start $SOCKGATEWAY + rump_server_start $SOCKREMOTE + + # + # Setup servers + # + # [local server] [gateway server] [remote server with httpd] + # | 10.0.0.2 10.0.0.1 | | 10.0.1.1 10.0.1.2 | + # shmif0(mtu=1500) ----- shmif1(mtu=1280) shmif0(mtu=1500) ----- shmif0(mtu=1500) + # + + # Assign IP addresses + setup_server $SOCKLOCAL shmif0 bus1 $local_ip/$prefixlen + setup_server $SOCKGATEWAY shmif0 bus1 $gateway_local_ip/$prefixlen + setup_server $SOCKGATEWAY shmif1 bus2 $gateway_remote_ip/$prefixlen + setup_server $SOCKREMOTE shmif0 bus2 $remote_ip/$prefixlen + + ### Setup gateway server + export RUMP_SERVER=$SOCKGATEWAY + + # Set mtu of shmif0 to 1280 + export RUMP_SERVER=$SOCKGATEWAY + atf_check -s exit:0 rump.ifconfig shmif0 mtu 1280 + + # Enable IPv4 forwarding + atf_check -s exit:0 rump.sysctl -w -q net.inet.ip.forwarding=1 + + ### Setup remote server + export RUMP_SERVER=$SOCKREMOTE + + # Check default value + atf_check -s exit:0 -o match:"1" rump.sysctl -n net.inet.ip.mtudisc + + # Start httpd daemon + prepare_download_file $HTML_FILE + start_httpd $SOCKREMOTE $remote_ip + $DEBUG && rump.netstat -a -f inet + + # Teach the peer thar 10.0.0.2(local serer) is behind 10.0.1.1(gateway server) + atf_check -s exit:0 -o ignore rump.route add $local_ip/32 $gateway_remote_ip + + ### Setup local server + export RUMP_SERVER=$SOCKLOCAL + + # Teach the peer thar 10.0.1.2(remote serer) is behind 10.0.0.1(gateway server) + atf_check -s exit:0 -o ignore rump.route add $remote_ip/32 $gateway_local_ip + + # Don't accept fragmented packets + atf_check -s exit:0 -o ignore rump.sysctl -w -q net.inet.ip.maxfragpackets=0 + + # + # Test disabled path mtu discorvery + # + export RUMP_SERVER=$SOCKREMOTE + atf_check -s exit:0 -o ignore rump.sysctl -w -q net.inet.ip.mtudisc=0 + + # Get the webpage (expect: failed) + export RUMP_SERVER=$SOCKLOCAL + do_http_get $remote_ip 1 + $DEBUG && extract_new_packets bus2 > ./out + $DEBUG && cat ./out + + # Check path mtu size on remote server + export RUMP_SERVER=$SOCKREMOTE + atf_check -s exit:0 \ + -o match:"^10.0.0.2 +10.0.1.1 +UGHS +- +- +- +shmif0" \ + rump.netstat -nr -f inet + + # + # Test enabled path mtu discorvery + # + export RUMP_SERVER=$SOCKREMOTE + atf_check -s exit:0 -o ignore rump.sysctl -w -q net.inet.ip.mtudisc=1 + + # Get the webpage (expect: success) + export RUMP_SERVER=$SOCKLOCAL + do_http_get $remote_ip 0 + $DEBUG && extract_new_packets bus2 > ./out + $DEBUG && cat ./out + + # Check path mtu size on remote server + export RUMP_SERVER=$SOCKREMOTE + atf_check -s exit:0 \ + -o match:"^10.0.0.2 +10.0.1.1 +UGHS +- +- +1280 +shmif0" \ + rump.netstat -nr -f inet + + rump_server_destroy_ifaces +} + +mtudisc_basic_cleanup() +{ + $DEBUG && dump + stop_httpd + cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case mtudisc_basic +} diff --git a/contrib/netbsd-tests/net/net/t_mtudisc6.sh b/contrib/netbsd-tests/net/net/t_mtudisc6.sh new file mode 100755 index 0000000..93bc12e --- /dev/null +++ b/contrib/netbsd-tests/net/net/t_mtudisc6.sh @@ -0,0 +1,179 @@ +# $NetBSD: t_mtudisc6.sh,v 1.5 2016/11/25 08:51:17 ozaki-r Exp $ +# +# Copyright (c) 2016 Internet Initiative Japan Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +SOCKLOCAL=unix://commsock1 +SOCKGATEWAY=unix://commsock2 +SOCKREMOTE=unix://commsock3 +HTML_FILE=index.html + +DEBUG=${DEBUG:-false} + +atf_test_case mtudisc6_basic cleanup + +mtudisc6_basic_head() +{ + + atf_set "descr" "Tests for IPv6 Path MTU Dicorvery basic behavior" + atf_set "require.progs" "rump_server" +} + +setup_server() +{ + local sock=$1 + local if=$2 + local bus=$3 + local ip=$4 + + rump_server_add_iface $sock $if $bus + + export RUMP_SERVER=$sock + atf_check -s exit:0 rump.ifconfig $if inet6 $ip + atf_check -s exit:0 rump.ifconfig $if up + atf_check -s exit:0 rump.ifconfig -w 10 + + $DEBUG && rump.ifconfig $if +} + +prepare_download_file() +{ + local file=$1 + local data="0123456789" + + touch $file + for i in `seq 1 512` + do + echo $data >> $file + done +} + +do_http_get() +{ + local ip=$1 + local ret=$2 + local timeout=5 + + # get the webpage + atf_check -s exit:$ret env LD_PRELOAD=/usr/lib/librumphijack.so \ + ftp -q $timeout -o ./out "http://[$ip]/$HTML_FILE" +} + +mtudisc6_basic_body() +{ + local pkt= + local local_ip=fc00:0:0:1::2 + local gateway_local_ip=fc00:0:0:1::1 + local gateway_remote_ip=fc00:0:0:2::1 + local remote_ip=fc00:0:0:2::2 + local prefixlen=64 + + rump_server_start $SOCKLOCAL netinet6 + rump_server_start $SOCKGATEWAY netinet6 + rump_server_start $SOCKREMOTE netinet6 + + # + # Setup servers + # + # [local server] [gateway server] [remote server] + # | | | | + # shmif0(1500) -- shmif1(1280) shmif0(1500) -- shmif0(1500) + # + + # Assign IP addresses + setup_server $SOCKLOCAL shmif0 bus1 $local_ip/$prefixlen + setup_server $SOCKGATEWAY shmif0 bus1 $gateway_local_ip/$prefixlen + setup_server $SOCKGATEWAY shmif1 bus2 $gateway_remote_ip/$prefixlen + setup_server $SOCKREMOTE shmif0 bus2 $remote_ip/$prefixlen + + ### Setup gateway server + export RUMP_SERVER=$SOCKGATEWAY + + # Set MTU of shmif0 to 1280 + export RUMP_SERVER=$SOCKGATEWAY + atf_check -s exit:0 rump.ifconfig shmif0 mtu 1280 + + # Enable IPv6 forwarding + atf_check -s exit:0 rump.sysctl -w -q net.inet6.ip6.forwarding=1 + + ### Setup remote server + export RUMP_SERVER=$SOCKREMOTE + + # Start httpd daemon + prepare_download_file $HTML_FILE + start_httpd $SOCKREMOTE $remote_ip + $DEBUG && rump.netstat -a + + # Teach the peer that local serer is behind gateway server + atf_check -s exit:0 -o ignore \ + rump.route add -inet6 $local_ip/128 $gateway_remote_ip + + # Check path MTU size on remote server + atf_check -s exit:0 \ + -o match:"^$local_ip +$gateway_remote_ip +UGHS +- +- +- +shmif0" \ + rump.netstat -nr -f inet6 + + ### Setup local server + export RUMP_SERVER=$SOCKLOCAL + + # Teach the peer that remote serer is behind gateway server + atf_check -s exit:0 -o ignore \ + rump.route add -inet6 $remote_ip/128 $gateway_local_ip + + # Don't accept fragmented packets + atf_check -s exit:0 -o ignore \ + rump.sysctl -w -q net.inet6.ip6.maxfragpackets=0 + + # + # Test enabled path MTU discorvery + # + # Get the webpage (expect: success) + export RUMP_SERVER=$SOCKLOCAL + do_http_get $remote_ip 0 + $DEBUG && extract_new_packets bus2 > ./out + $DEBUG && cat ./out + + # Check path MTU size on remote server + export RUMP_SERVER=$SOCKREMOTE + atf_check -s exit:0 \ + -o match:"^$local_ip +$gateway_remote_ip +UGHS +- +- +1280 +shmif0" \ + rump.netstat -nr -f inet6 + + rump_server_destroy_ifaces +} + +mtudisc6_basic_cleanup() +{ + + $DEBUG && dump + stop_httpd + cleanup +} + +atf_init_test_cases() +{ + + atf_add_test_case mtudisc6_basic +} diff --git a/contrib/netbsd-tests/net/net/t_ping6_opts.sh b/contrib/netbsd-tests/net/net/t_ping6_opts.sh new file mode 100755 index 0000000..e2e774e --- /dev/null +++ b/contrib/netbsd-tests/net/net/t_ping6_opts.sh @@ -0,0 +1,380 @@ +# $NetBSD: t_ping6_opts.sh,v 1.8 2016/11/25 08:51:17 ozaki-r Exp $ +# +# Copyright (c) 2016 Internet Initiative Japan Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +SOCKSRC=unix://commsock1 +SOCKFWD=unix://commsock2 +SOCKDST=unix://commsock3 +IP6SRC=fc00:0:0:1::2 +IP6SRCGW=fc00:0:0:1::1 +IP6DSTGW=fc00:0:0:2::1 +IP6DST=fc00:0:0:2::2 +BUS_SRCGW=bus1 +BUS_DSTGW=bus2 + +IP6SRC2=fc00:0:0:1::3 +IP6SRCGW2=fc00:0:0:1::254 + +DEBUG=${DEBUG:-false} +TIMEOUT=1 + +# +# Utility functions +# +setup_endpoint() +{ + local sock=${1} + local addr=${2} + local bus=${3} + local gw=${4} + + rump_server_add_iface $sock shmif0 $bus + + export RUMP_SERVER=${sock} + atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${addr} + atf_check -s exit:0 -o ignore rump.route add -inet6 default ${gw} + atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig -w 10 + + if $DEBUG; then + rump.ifconfig shmif0 + rump.netstat -nr + fi +} + +setup_forwarder() +{ + + rump_server_add_iface $SOCKFWD shmif0 $BUS_SRCGW + rump_server_add_iface $SOCKFWD shmif1 $BUS_DSTGW + + export RUMP_SERVER=$SOCKFWD + + atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6SRCGW} + atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6DSTGW} + + atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig shmif1 up + atf_check -s exit:0 rump.ifconfig -w 10 + + if $DEBUG; then + rump.netstat -nr + rump.sysctl net.inet6.ip6.forwarding + fi +} + +setup_forwarding6() +{ + export RUMP_SERVER=$SOCKFWD + atf_check -s exit:0 -o ignore rump.sysctl -w net.inet6.ip6.forwarding=1 +} + +setup6() +{ + + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKFWD netinet6 + rump_server_start $SOCKDST netinet6 + + setup_endpoint $SOCKSRC $IP6SRC $BUS_SRCGW $IP6SRCGW + setup_endpoint $SOCKDST $IP6DST $BUS_DSTGW $IP6DSTGW + setup_forwarder +} + +check_echo_request_pkt() +{ + local pkt="$1 > $2: .+ echo request" + + extract_new_packets $BUS_SRCGW > ./out + $DEBUG && echo $pkt + $DEBUG && cat ./out + atf_check -s exit:0 -o match:"$pkt" cat ./out +} + +check_echo_request_pkt_with_macaddr() +{ + local pkt="$1 > $2, .+ $3 > $4: .+ echo request" + + extract_new_packets $BUS_SRCGW > ./out + $DEBUG && echo $pkt + $DEBUG && cat ./out + atf_check -s exit:0 -o match:"$pkt" cat ./out +} + +check_echo_request_pkt_with_macaddr_and_rthdr0() +{ + local pkt= + + pkt="$1 > $2, .+ $3 > $4:" + pkt="$pkt srcrt \\(len=2, type=0, segleft=1, \\[0\\]$5\\)" + pkt="$pkt .+ echo request" + + extract_new_packets $BUS_SRCGW > ./out + $DEBUG && echo $pkt + $DEBUG && cat ./out + atf_check -s exit:0 -o match:"$pkt" cat ./out +} + +# +# Tests +# +atf_test_case ping6_opts_sourceaddr cleanup +ping6_opts_sourceaddr_head() +{ + + atf_set "descr" "tests of ping6 -S option" + atf_set "require.progs" "rump_server" +} + +ping6_opts_sourceaddr_body() +{ + + setup6 + setup_forwarding6 + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt $IP6SRC $IP6DST + + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6SRC2 + atf_check -s exit:0 rump.ifconfig -w 10 + + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt $IP6SRC $IP6DST + + # ping6 -S <sourceaddr> + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -S $IP6SRC $IP6DST + check_echo_request_pkt $IP6SRC $IP6DST + + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -S $IP6SRC2 $IP6DST + check_echo_request_pkt $IP6SRC2 $IP6DST + + rump_server_destroy_ifaces +} + +ping6_opts_sourceaddr_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_test_case ping6_opts_interface cleanup +ping6_opts_interface_head() +{ + + atf_set "descr" "tests of ping6 -I option" + atf_set "require.progs" "rump_server" +} + +ping6_opts_interface_body() +{ + local shmif0_lladdr= + local shmif1_lladdr= + local gw_lladdr= + + setup6 + setup_forwarding6 + + shmif0_lladdr=$(get_linklocal_addr ${SOCKSRC} shmif0) + gw_lladdr=$(get_linklocal_addr ${SOCKFWD} shmif0) + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $gw_lladdr + check_echo_request_pkt $shmif0_lladdr $gw_lladdr + + rump_server_add_iface $SOCKSRC shmif1 $BUS_SRCGW + atf_check -s exit:0 rump.ifconfig shmif1 up + atf_check -s exit:0 rump.ifconfig -w 10 + shmif1_lladdr=$(get_linklocal_addr ${SOCKSRC} shmif1) + + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $gw_lladdr + check_echo_request_pkt $shmif0_lladdr $gw_lladdr + + # ping6 -I <interface> + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -I shmif0 $gw_lladdr + check_echo_request_pkt $shmif0_lladdr $gw_lladdr + + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -I shmif1 $gw_lladdr + check_echo_request_pkt $shmif1_lladdr $gw_lladdr + + rump_server_destroy_ifaces +} + +ping6_opts_interface_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_test_case ping6_opts_gateway cleanup +ping6_opts_gateway_head() +{ + + atf_set "descr" "tests of ping6 -g option" + atf_set "require.progs" "rump_server" +} + +ping6_opts_gateway_body() +{ + local my_macaddr= + local gw_shmif0_macaddr= + local gw_shmif2_macaddr= + + setup6 + setup_forwarding6 + + my_macaddr=$(get_macaddr ${SOCKSRC} shmif0) + gw_shmif0_macaddr=$(get_macaddr ${SOCKFWD} shmif0) + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6DST + + rump_server_add_iface $SOCKFWD shmif2 $BUS_SRCGW + export RUMP_SERVER=$SOCKFWD + atf_check -s exit:0 rump.ifconfig shmif2 inet6 $IP6SRCGW2 + atf_check -s exit:0 rump.ifconfig -w 10 + gw_shmif2_macaddr=$(get_macaddr ${SOCKFWD} shmif2) + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6DST + + # ping6 -g <gateway> + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -g $IP6SRCGW $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6DST + + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -g $IP6SRCGW2 $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif2_macaddr $IP6SRC $IP6DST + + rump_server_destroy_ifaces +} + +ping6_opts_gateway_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_test_case ping6_opts_hops cleanup +ping6_opts_hops_head() +{ + + atf_set "descr" "tests of ping6 hops (Type 0 Routing Header)" + atf_set "require.progs" "rump_server" +} + +ping6_opts_hops_body() +{ + local my_macaddr= + local gw_shmif0_macaddr= + local gw_shmif2_macaddr= + + setup6 + setup_forwarding6 + + my_macaddr=$(get_macaddr ${SOCKSRC} shmif0) + gw_shmif0_macaddr=$(get_macaddr ${SOCKFWD} shmif0) + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6DST + + rump_server_add_iface $SOCKFWD shmif2 $BUS_SRCGW + export RUMP_SERVER=$SOCKFWD + atf_check -s exit:0 rump.ifconfig shmif2 inet6 $IP6SRCGW2 + atf_check -s exit:0 rump.ifconfig -w 10 + gw_shmif2_macaddr=$(get_macaddr ${SOCKFWD} shmif2) + + export RUMP_SERVER=$SOCKSRC + atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6DST + check_echo_request_pkt_with_macaddr \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6DST + + # ping6 hops + + # ping6 fails expectedly because the kernel doesn't support + # to receive packets with type 0 routing headers, but we can + # check whether a sent packet is correct. + atf_check -s not-exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + $IP6SRCGW $IP6DST + check_echo_request_pkt_with_macaddr_and_rthdr0 \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6SRCGW $IP6DST + + atf_check -s not-exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + $IP6SRCGW2 $IP6DST + check_echo_request_pkt_with_macaddr_and_rthdr0 \ + $my_macaddr $gw_shmif2_macaddr $IP6SRC $IP6SRCGW2 $IP6DST + + # ping6 -g <gateway> hops + atf_check -s not-exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -g $IP6SRCGW $IP6SRCGW $IP6DST + check_echo_request_pkt_with_macaddr_and_rthdr0 \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6SRCGW $IP6DST + + atf_check -s not-exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -g $IP6SRCGW2 $IP6SRCGW2 $IP6DST + check_echo_request_pkt_with_macaddr_and_rthdr0 \ + $my_macaddr $gw_shmif2_macaddr $IP6SRC $IP6SRCGW2 $IP6DST + + # ping6 -g <gateway> hops, but different nexthops (is it valid?) + atf_check -s not-exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT \ + -g $IP6SRCGW $IP6SRCGW2 $IP6DST + check_echo_request_pkt_with_macaddr_and_rthdr0 \ + $my_macaddr $gw_shmif0_macaddr $IP6SRC $IP6SRCGW2 $IP6DST + + rump_server_destroy_ifaces +} + +ping6_opts_hops_cleanup() +{ + + $DEBUG && dump + cleanup +} + +atf_init_test_cases() +{ + + atf_add_test_case ping6_opts_sourceaddr + atf_add_test_case ping6_opts_interface + atf_add_test_case ping6_opts_gateway + atf_add_test_case ping6_opts_hops +} diff --git a/contrib/netbsd-tests/net/net_common.sh b/contrib/netbsd-tests/net/net_common.sh new file mode 100755 index 0000000..df21a88 --- /dev/null +++ b/contrib/netbsd-tests/net/net_common.sh @@ -0,0 +1,314 @@ +# $NetBSD: net_common.sh,v 1.11 2017/01/10 05:55:34 ozaki-r Exp $ +# +# Copyright (c) 2016 Internet Initiative Japan Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# +# Common utility functions for tests/net +# + +HIJACKING="env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=sysctl=yes" + +extract_new_packets() +{ + local bus=$1 + local old=./.__old + + if [ ! -f $old ]; then + old=/dev/null + fi + + shmif_dumpbus -p - $bus 2>/dev/null| \ + tcpdump -n -e -r - 2>/dev/null > ./.__new + diff -u $old ./.__new |grep '^+' |cut -d '+' -f 2 > ./.__diff + mv -f ./.__new ./.__old + cat ./.__diff +} + +check_route() +{ + local target=$1 + local gw=$2 + local flags=${3:-\.\+} + local ifname=${4:-\.\+} + + target=$(echo $target |sed 's/\./\\./g') + if [ "$gw" = "" ]; then + gw=".+" + else + gw=$(echo $gw |sed 's/\./\\./g') + fi + + atf_check -s exit:0 -e ignore \ + -o match:"^$target +$gw +$flags +- +- +.+ +$ifname" \ + rump.netstat -rn +} + +check_route_flags() +{ + + check_route "$1" "" "$2" "" +} + +check_route_gw() +{ + + check_route "$1" "$2" "" "" +} + +check_route_no_entry() +{ + local target=$(echo $1 |sed 's/\./\\./g') + + atf_check -s exit:0 -e ignore -o not-match:"^$target" \ + rump.netstat -rn +} + +get_linklocal_addr() +{ + + export RUMP_SERVER=${1} + rump.ifconfig ${2} inet6 | + awk "/fe80/ {sub(/%$2/, \"\"); sub(/\\/[0-9]*/, \"\"); print \$2;}" + unset RUMP_SERVER + + return 0 +} + +get_macaddr() +{ + + env RUMP_SERVER=${1} \ + rump.ifconfig ${2} |awk '/address/ {print $2;}' +} + +HTTPD_PID=./.__httpd.pid +start_httpd() +{ + local sock=$1 + local ip=$2 + local backup=$RUMP_SERVER + + export RUMP_SERVER=$sock + + # start httpd in daemon mode + atf_check -s exit:0 env LD_PRELOAD=/usr/lib/librumphijack.so \ + /usr/libexec/httpd -P $HTTPD_PID -i $ip -b -s $(pwd) + + export RUMP_SERVER=$backup + + sleep 3 +} + +stop_httpd() +{ + + if [ -f $HTTPD_PID ]; then + kill -9 $(cat $HTTPD_PID) + rm -f $HTTPD_PID + sleep 1 + fi +} + +BASIC_LIBS="-lrumpnet -lrumpnet_net -lrumpnet_netinet \ + -lrumpnet_shmif -lrumpdev" +FS_LIBS="$BASIC_LIBS -lrumpvfs -lrumpfs_ffs" + +# We cannot keep variables between test phases, so need to store in files +_rump_server_socks=./.__socks +_rump_server_ifaces=./.__ifaces +_rump_server_buses=./.__buses + +_rump_server_start_common() +{ + local sock=$1 + local libs= + + shift 1 + libs="$*" + + atf_check -s exit:0 rump_server $libs $sock + + echo $sock >> $_rump_server_socks + $DEBUG && cat $_rump_server_socks +} + +rump_server_start() +{ + local sock=$1 + local _libs= + local libs="$BASIC_LIBS" + + shift 1 + _libs="$*" + + for lib in $_libs; do + libs="$libs -lrumpnet_$lib" + done + + _rump_server_start_common $sock $libs + + return 0 +} + +rump_server_fs_start() +{ + local sock=$1 + local _libs= + local libs="$FS_LIBS" + + shift 1 + _libs="$*" + + for lib in $_libs; do + libs="$libs -lrumpnet_$lib" + done + + _rump_server_start_common $sock $libs + + return 0 +} + +rump_server_add_iface() +{ + local sock=$1 + local ifname=$2 + local bus=$3 + local backup=$RUMP_SERVER + + export RUMP_SERVER=$sock + atf_check -s exit:0 rump.ifconfig $ifname create + atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus + export RUMP_SERVER=$backup + + echo $sock $ifname >> $_rump_server_ifaces + $DEBUG && cat $_rump_server_ifaces + + echo $bus >> $_rump_server_buses + cat $_rump_server_buses |sort -u >./.__tmp + mv -f ./.__tmp $_rump_server_buses + $DEBUG && cat $_rump_server_buses + + return 0 +} + +rump_server_destroy_ifaces() +{ + local backup=$RUMP_SERVER + + $DEBUG && cat $_rump_server_ifaces + + # Try to dump states before destroying interfaces + for sock in $(cat $_rump_server_socks); do + export RUMP_SERVER=$sock + atf_check -s exit:0 -o ignore rump.ifconfig + atf_check -s exit:0 -o ignore rump.netstat -nr + # XXX still need hijacking + atf_check -s exit:0 -o ignore $HIJACKING rump.netstat -i -a + atf_check -s exit:0 -o ignore rump.arp -na + atf_check -s exit:0 -o ignore rump.ndp -na + atf_check -s exit:0 -o ignore $HIJACKING ifmcstat + done + + # XXX using pipe doesn't work. See PR bin/51667 + #cat $_rump_server_ifaces | while read sock ifname; do + while read sock ifname; do + export RUMP_SERVER=$sock + if rump.ifconfig -l |grep -q $ifname; then + atf_check -s exit:0 rump.ifconfig $ifname destroy + fi + atf_check -s exit:0 -o ignore rump.ifconfig + done < $_rump_server_ifaces + export RUMP_SERVER=$backup + + return 0 +} + +rump_server_halt_servers() +{ + local backup=$RUMP_SERVER + + $DEBUG && cat $_rump_server_socks + for sock in $(cat $_rump_server_socks); do + env RUMP_SERVER=$sock rump.halt + done + export RUMP_SERVER=$backup + + return 0 +} + +rump_server_dump_servers() +{ + local backup=$RUMP_SERVER + + $DEBUG && cat $_rump_server_socks + for sock in $(cat $_rump_server_socks); do + echo "### Dumping $sock" + export RUMP_SERVER=$sock + rump.ifconfig + rump.netstat -nr + # XXX still need hijacking + $HIJACKING rump.netstat -i -a + rump.arp -na + rump.ndp -na + $HIJACKING ifmcstat + $HIJACKING dmesg + done + export RUMP_SERVER=$backup + + if [ -f rump_server.core ]; then + gdb -ex bt /usr/bin/rump_server rump_server.core + strings rump_server.core |grep panic + fi + return 0 +} + +rump_server_dump_buses() +{ + + if [ ! -f $_rump_server_buses ]; then + return 0 + fi + + $DEBUG && cat $_rump_server_buses + for bus in $(cat $_rump_server_buses); do + echo "### Dumping $bus" + shmif_dumpbus -p - $bus 2>/dev/null| tcpdump -n -e -r - + done + return 0 +} + +cleanup() +{ + + rump_server_halt_servers +} + +dump() +{ + + rump_server_dump_servers + rump_server_dump_buses +} diff --git a/contrib/netbsd-tests/net/route/t_change.sh b/contrib/netbsd-tests/net/route/t_change.sh index 669c9f3..260cad0 100755 --- a/contrib/netbsd-tests/net/route/t_change.sh +++ b/contrib/netbsd-tests/net/route/t_change.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_change.sh,v 1.8 2016/08/10 23:00:39 roy Exp $ +# $NetBSD: t_change.sh,v 1.9 2016/11/07 05:25:37 ozaki-r Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,7 +30,7 @@ netserver=\ -lrumpnet_netinet -lrumpnet_shmif" export RUMP_SERVER=unix://commsock -DEBUG=false +DEBUG=${DEBUG:-false} atf_test_case route_change_reject2blackhole cleanup route_change_reject2blackhole_head() diff --git a/contrib/netbsd-tests/net/route/t_flags.sh b/contrib/netbsd-tests/net/route/t_flags.sh index 26625bb..457e3f5 100755 --- a/contrib/netbsd-tests/net/route/t_flags.sh +++ b/contrib/netbsd-tests/net/route/t_flags.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_flags.sh,v 1.11 2016/08/10 23:00:39 roy Exp $ +# $NetBSD: t_flags.sh,v 1.15 2016/12/21 02:46:08 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,27 +25,24 @@ # POSSIBILITY OF SUCH DAMAGE. # -netserver=\ -"rump_server -lrumpdev -lrumpnet -lrumpnet_net -lrumpnet_netinet \ - -lrumpnet_shmif" SOCK_LOCAL=unix://commsock1 SOCK_PEER=unix://commsock2 SOCK_GW=unix://commsock3 BUS=bus1 BUS2=bus2 -DEBUG=false +DEBUG=${DEBUG:-false} setup_local() { - atf_check -s exit:0 ${netserver} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS export RUMP_SERVER=$SOCK_LOCAL - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.2/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.ifconfig $DEBUG && rump.netstat -rn -f inet @@ -54,13 +51,13 @@ setup_local() setup_peer() { - atf_check -s exit:0 ${netserver} ${SOCK_PEER} + rump_server_start $SOCK_PEER + rump_server_add_iface $SOCK_PEER shmif0 $BUS export RUMP_SERVER=$SOCK_PEER - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.1/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.ifconfig $DEBUG && rump.netstat -rn -f inet @@ -69,16 +66,14 @@ setup_peer() setup_gw() { - atf_check -s exit:0 ${netserver} ${SOCK_GW} + rump_server_start $SOCK_GW + rump_server_add_iface $SOCK_GW shmif0 $BUS + rump_server_add_iface $SOCK_GW shmif1 $BUS2 export RUMP_SERVER=$SOCK_GW - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 10.0.0.254/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up - atf_check -s exit:0 -o ignore rump.ifconfig shmif1 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif1 linkstr ${BUS2} atf_check -s exit:0 -o ignore rump.ifconfig shmif1 10.0.2.1/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif1 alias 10.0.2.2/24 atf_check -s exit:0 -o ignore rump.ifconfig shmif1 up @@ -91,46 +86,13 @@ setup_gw() $DEBUG && rump.netstat -rn -f inet } -teardown_gw() -{ - - env RUMP_SERVER=$SOCK_GW rump.halt -} - -check_entry_flags() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local flags=$2 - - atf_check -s exit:0 -o match:" $flags " -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - -check_entry_gw() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local gw=$2 - - atf_check -s exit:0 -o match:" $gw " -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - -check_entry_fail() -{ - ip=$(echo $1 |sed 's/\./\\./g') - flags=$2 # Not used currently - - atf_check -s not-exit:0 -e ignore -x \ - "rump.netstat -rn -f inet | grep ^'$ip'" -} - test_lo() { export RUMP_SERVER=$SOCK_LOCAL # Up, Host, local - check_entry_flags 127.0.0.1 UHl + check_route_flags 127.0.0.1 UHl } test_connected() @@ -139,10 +101,10 @@ test_connected() export RUMP_SERVER=$SOCK_LOCAL # Up, Host, LLINFO, local - check_entry_flags 10.0.0.2 UHl + check_route_flags 10.0.0.2 UHl # Up, Cloning - check_entry_flags 10.0.0/24 UC + check_route_flags 10.0.0/24 UC } test_default_gateway() @@ -154,7 +116,7 @@ test_default_gateway() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Static - check_entry_flags default UGS + check_route_flags default UGS } test_static() @@ -167,14 +129,14 @@ test_static() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Host, Static - check_entry_flags 10.0.1.1 UGHS + check_route_flags 10.0.1.1 UGHS # Static route to network atf_check -s exit:0 -o ignore rump.route add -net 10.0.2.0/24 10.0.0.1 $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Static - check_entry_flags 10.0.2/24 UGS + check_route_flags 10.0.2/24 UGS } test_blackhole() @@ -193,14 +155,14 @@ test_blackhole() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Blackhole, Static - check_entry_flags 10.0.0/24 UGBS + check_route_flags 10.0.0/24 UGBS atf_check -s not-exit:0 -o match:'100.0% packet loss' \ rump.ping -n -w 1 -c 1 10.0.0.1 $DEBUG && rump.netstat -rn -f inet # Shouldn't be created - check_entry_fail 10.0.0.1 UH + check_route_no_entry 10.0.0.1 } test_reject() @@ -215,14 +177,14 @@ test_reject() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Reject, Static - check_entry_flags 10.0.0/24 UGRS + check_route_flags 10.0.0/24 UGRS atf_check -s not-exit:0 -o ignore -e match:'No route to host' \ rump.ping -n -w 1 -c 1 10.0.0.1 $DEBUG && rump.netstat -rn -f inet # Shouldn't be created - check_entry_fail 10.0.0.1 UH + check_route_no_entry 10.0.0.1 # Gateway is lo0 (RTF_GATEWAY) @@ -234,14 +196,14 @@ test_reject() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Reject, Static - check_entry_flags 10.0.0/24 UGRS + check_route_flags 10.0.0/24 UGRS atf_check -s not-exit:0 -o ignore -e match:'Network is unreachable' \ rump.ping -n -w 1 -c 1 10.0.0.1 $DEBUG && rump.netstat -rn -f inet # Shouldn't be created - check_entry_fail 10.0.0.1 UH + check_route_no_entry 10.0.0.1 # Gateway is lo0 (RTF_HOST) @@ -253,7 +215,7 @@ test_reject() $DEBUG && rump.netstat -rn -f inet # Up, Host, Reject, Static - check_entry_flags 10.0.0.1 UHRS + check_route_flags 10.0.0.1 UHRS atf_check -s not-exit:0 -o ignore -e match:'No route to host' \ rump.ping -n -w 1 -c 1 10.0.0.1 @@ -278,7 +240,7 @@ test_icmp_redirect() export RUMP_SERVER=$SOCK_PEER atf_check -s exit:0 -o ignore rump.route add -net 10.0.2.0/24 10.0.0.254 # Up, Gateway, Static - check_entry_flags 10.0.2/24 UGS + check_route_flags 10.0.2/24 UGS # # Setup the default gateway to the peer, 10.0.0.1 @@ -286,15 +248,15 @@ test_icmp_redirect() export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 -o ignore rump.route add default 10.0.0.1 # Up, Gateway, Static - check_entry_flags default UGS + check_route_flags default UGS # Try ping 10.0.2.1 atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 10.0.2.1 $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Host, Dynamic - check_entry_flags 10.0.2.1 UGHD - check_entry_gw 10.0.2.1 10.0.0.254 + check_route_flags 10.0.2.1 UGHD + check_route_gw 10.0.2.1 10.0.0.254 export RUMP_SERVER=$SOCK_PEER $DEBUG && rump.netstat -rn -f inet @@ -307,18 +269,16 @@ test_icmp_redirect() export RUMP_SERVER=$SOCK_LOCAL atf_check -s exit:0 -o ignore rump.route add 10.0.2.2 10.0.0.1 # Up, Gateway, Host, Static - check_entry_flags 10.0.2.2 UGHS - check_entry_gw 10.0.2.2 10.0.0.1 + check_route_flags 10.0.2.2 UGHS + check_route_gw 10.0.2.2 10.0.0.1 # Try ping 10.0.2.2 atf_check -s exit:0 -o ignore rump.ping -n -w 1 -c 1 10.0.2.2 $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Host, Modified, Static - check_entry_flags 10.0.2.2 UGHMS - check_entry_gw 10.0.2.2 10.0.0.254 - - teardown_gw + check_route_flags 10.0.2.2 UGHMS + check_route_gw 10.0.2.2 10.0.0.254 } test_announce() @@ -332,19 +292,11 @@ test_announce() $DEBUG && rump.netstat -rn -f inet # Up, Gateway, Static, proxy - check_entry_flags 10.0.0/24 UGSp + check_route_flags 10.0.0/24 UGSp # TODO test its behavior } -cleanup() -{ - $DEBUG && /usr/bin/shmif_dumpbus -p - $BUS 2>/dev/null | \ - /usr/sbin/tcpdump -n -e -r - - env RUMP_SERVER=$SOCK_LOCAL rump.halt - env RUMP_SERVER=$SOCK_PEER rump.halt -} - add_test() { local name=$1 @@ -359,8 +311,10 @@ add_test() setup_local; \ setup_peer; \ test_${name}; \ + rump_server_destroy_ifaces; \ }; \ route_flags_${name}_cleanup() { \ + $DEBUG && dump; \ cleanup; \ }" atf_add_test_case "route_flags_${name}" diff --git a/contrib/netbsd-tests/net/route/t_flags6.sh b/contrib/netbsd-tests/net/route/t_flags6.sh index 20b800e..e570829 100755 --- a/contrib/netbsd-tests/net/route/t_flags6.sh +++ b/contrib/netbsd-tests/net/route/t_flags6.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_flags6.sh,v 1.7 2016/08/10 23:00:39 roy Exp $ +# $NetBSD: t_flags6.sh,v 1.12 2016/12/21 02:46:08 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -25,9 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -RUMP_OPTS="-lrumpdev -lrumpnet -lrumpnet_net" -RUMP_OPTS="$RUMP_OPTS -lrumpnet_netinet -lrumpnet_netinet6" -RUMP_OPTS="$RUMP_OPTS -lrumpnet_shmif" SOCK_LOCAL=unix://commsock1 SOCK_PEER=unix://commsock2 SOCK_GW=unix://commsock3 @@ -37,18 +34,18 @@ BUS2=bus2 IP6_LOCAL=fc00::2 IP6_PEER=fc00::1 -DEBUG=false +DEBUG=${DEBUG:-false} setup_local() { - atf_check -s exit:0 rump_server ${RUMP_OPTS} ${SOCK_LOCAL} + rump_server_start $SOCK_LOCAL netinet6 + rump_server_add_iface $SOCK_LOCAL shmif0 $BUS export RUMP_SERVER=$SOCK_LOCAL - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $IP6_LOCAL atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.ifconfig $DEBUG && rump.netstat -rn -f inet6 @@ -57,55 +54,28 @@ setup_local() setup_peer() { - atf_check -s exit:0 rump_server ${RUMP_OPTS} ${SOCK_PEER} + rump_server_start $SOCK_PEER netinet6 + rump_server_add_iface $SOCK_PEER shmif0 $BUS export RUMP_SERVER=$SOCK_PEER - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 create - atf_check -s exit:0 -o ignore rump.ifconfig shmif0 linkstr ${BUS} atf_check -s exit:0 -o ignore rump.ifconfig shmif0 inet6 $IP6_PEER atf_check -s exit:0 -o ignore rump.ifconfig shmif0 up + atf_check -s exit:0 -o ignore rump.ifconfig -w 10 $DEBUG && rump.ifconfig $DEBUG && rump.netstat -rn -f inet6 } -check_entry_flags() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local flags=$2 - - atf_check -s exit:0 -o match:" $flags " -e ignore -x \ - "rump.netstat -rn -f inet6 | grep ^'$ip'" -} - -check_entry_gw() -{ - local ip=$(echo $1 |sed 's/\./\\./g') - local gw=$2 - - atf_check -s exit:0 -o match:" $gw " -e ignore -x \ - "rump.netstat -rn -f inet6 | grep ^'$ip'" -} - -check_entry_fail() -{ - ip=$(echo $1 |sed 's/\./\\./g') - flags=$2 # Not used currently - - atf_check -s not-exit:0 -e ignore -x \ - "rump.netstat -rn -f inet6 | grep ^'$ip'" -} - test_lo6() { export RUMP_SERVER=$SOCK_LOCAL # Up, Host, local - check_entry_flags fe80::1 UHl + check_route_flags fe80::1 UHl - # Up, Host - check_entry_flags ::1 UH + # Up, Host, local + check_route_flags ::1 UHl } test_connected6() @@ -114,10 +84,10 @@ test_connected6() export RUMP_SERVER=$SOCK_LOCAL # Up, Host, local - check_entry_flags $IP6_LOCAL UHl + check_route_flags $IP6_LOCAL UHl # Up, Connected - check_entry_flags fc00::/64 UC + check_route_flags fc00::/64 UC } test_default_gateway6() @@ -129,7 +99,7 @@ test_default_gateway6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Static - check_entry_flags default UGS + check_route_flags default UGS } test_static6() @@ -143,7 +113,7 @@ test_static6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Host, Static - check_entry_flags fc00::1:1 UGHS + check_route_flags fc00::1:1 UGHS # Static route to network atf_check -s exit:0 -o ignore \ @@ -151,7 +121,7 @@ test_static6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Static - check_entry_flags fc00::/24 UGS + check_route_flags fc00::/24 UGS } test_blackhole6() @@ -171,14 +141,14 @@ test_blackhole6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Blackhole, Static - check_entry_flags fc00::/64 UGBS + check_route_flags fc00::/64 UGBS atf_check -s not-exit:0 -o match:'100.0% packet loss' \ rump.ping6 -n -X 1 -c 1 $IP6_PEER $DEBUG && rump.netstat -rn -f inet6 # Shouldn't be created - check_entry_fail $IP6_PEER UH + check_route_no_entry $IP6_PEER } test_reject6() @@ -195,14 +165,14 @@ test_reject6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Reject, Static - check_entry_flags fc00::/64 UGRS + check_route_flags fc00::/64 UGRS atf_check -s not-exit:0 -o ignore -e match:'No route to host' \ rump.ping6 -n -X 1 -c 1 $IP6_PEER $DEBUG && rump.netstat -rn -f inet6 # Shouldn't be created - check_entry_fail $IP6_PEER UH + check_route_no_entry $IP6_PEER # Gateway is lo0 (RTF_GATEWAY) @@ -215,14 +185,14 @@ test_reject6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Reject, Static - check_entry_flags fc00::/64 UGRS + check_route_flags fc00::/64 UGRS atf_check -s not-exit:0 -o ignore -e match:'Network is unreachable' \ rump.ping6 -n -X 1 -c 1 $IP6_PEER $DEBUG && rump.netstat -rn -f inet6 # Shouldn't be created - check_entry_fail $IP6_PEER UH + check_route_no_entry $IP6_PEER # Gateway is lo0 (RTF_HOST) @@ -235,7 +205,7 @@ test_reject6() $DEBUG && rump.netstat -rn -f inet6 # Up, Host, Reject, Static - check_entry_flags fc00:: UHRS + check_route_flags fc00:: UHRS atf_check -s not-exit:0 -o ignore -e match:'No route to host' \ rump.ping6 -n -X 1 -c 1 $IP6_PEER @@ -257,19 +227,11 @@ test_announce6() $DEBUG && rump.netstat -rn -f inet6 # Up, Gateway, Static, proxy - check_entry_flags fc00::/64 UGSp + check_route_flags fc00::/64 UGSp # TODO test its behavior } -cleanup() -{ - $DEBUG && /usr/bin/shmif_dumpbus -p - $BUS 2>/dev/null | \ - /usr/sbin/tcpdump -n -e -r - - env RUMP_SERVER=$SOCK_LOCAL rump.halt - env RUMP_SERVER=$SOCK_PEER rump.halt -} - add_test() { local name=$1 @@ -284,8 +246,10 @@ add_test() setup_local; \ setup_peer; \ test_${name}; \ + rump_server_destroy_ifaces; \ }; \ route_flags_${name}_cleanup() { \ + $DEBUG && dump; \ cleanup; \ }" atf_add_test_case "route_flags_${name}" diff --git a/contrib/netbsd-tests/net/route/t_route.sh b/contrib/netbsd-tests/net/route/t_route.sh index 37ede4ce..053f48f 100755 --- a/contrib/netbsd-tests/net/route/t_route.sh +++ b/contrib/netbsd-tests/net/route/t_route.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_route.sh,v 1.7 2016/08/10 23:00:39 roy Exp $ +# $NetBSD: t_route.sh,v 1.10 2016/12/21 02:46:08 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -25,9 +25,6 @@ # POSSIBILITY OF SUCH DAMAGE. # -RUMP_LIBS="-lrumpdev -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpnet_shmif" -RUMP_LIBS_IPV6="$RUMP_LIBS -lrumpnet_netinet6" - # non_subnet_gateway SOCK_CLIENT=unix://commsock1 SOCK_GW=unix://commsock2 @@ -49,7 +46,7 @@ IP6DST=fc00:0:0:2::2 BUS_SRCGW=bus1 BUS_DSTGW=bus2 -DEBUG=false +DEBUG=${DEBUG:-false} TIMEOUT=1 PING_OPTS="-n -c 1 -w $TIMEOUT" @@ -64,13 +61,11 @@ route_non_subnet_gateway_head() route_non_subnet_gateway_body() { - atf_check -s exit:0 rump_server ${RUMP_LIBS} ${SOCK_CLIENT} - atf_check -s exit:0 rump_server ${RUMP_LIBS} ${SOCK_GW} + rump_server_start $SOCK_CLIENT + rump_server_start $SOCK_GW export RUMP_SERVER=${SOCK_GW} - - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS + rump_server_add_iface $SOCK_GW shmif0 $BUS atf_check -s exit:0 rump.ifconfig shmif0 192.168.0.1 atf_check -s exit:0 rump.ifconfig shmif0 up @@ -81,11 +76,10 @@ route_non_subnet_gateway_body() $DEBUG && rump.netstat -nr -f inet export RUMP_SERVER=${SOCK_CLIENT} - - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS + rump_server_add_iface $SOCK_CLIENT shmif0 $BUS atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.1/32 atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig -w 10 $DEBUG && rump.netstat -nr -f inet @@ -104,15 +98,14 @@ route_non_subnet_gateway_body() # Be reachable to the gateway atf_check -s exit:0 -o ignore rump.ping $PING_OPTS 192.168.0.1 - unset RUMP_SERVER + rump_server_destroy_ifaces } route_non_subnet_gateway_cleanup() { - $DEBUG && shmif_dumpbus -p - $BUS 2>/dev/null | tcpdump -n -e -r - - env RUMP_SERVER=$SOCK_CLIENT rump.halt - env RUMP_SERVER=$SOCK_GW rump.halt + $DEBUG && dump + cleanup } atf_test_case route_command_get cleanup @@ -140,8 +133,7 @@ setup_endpoint() local gw=${5} export RUMP_SERVER=${sock} - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr ${bus} + rump_server_add_iface $sock shmif0 $bus if [ $mode = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${addr} atf_check -s exit:0 -o ignore rump.route add -inet6 default ${gw} @@ -150,6 +142,7 @@ setup_endpoint() atf_check -s exit:0 -o ignore rump.route add default ${gw} fi atf_check -s exit:0 rump.ifconfig shmif0 up + atf_check -s exit:0 rump.ifconfig -w 10 if $DEBUG; then rump.ifconfig shmif0 @@ -161,13 +154,10 @@ setup_forwarder() { mode=${1} - export RUMP_SERVER=$SOCKFWD - atf_check -s exit:0 rump.ifconfig shmif0 create - atf_check -s exit:0 rump.ifconfig shmif0 linkstr $BUS_SRCGW - - atf_check -s exit:0 rump.ifconfig shmif1 create - atf_check -s exit:0 rump.ifconfig shmif1 linkstr $BUS_DSTGW + rump_server_add_iface $SOCKFWD shmif0 $BUS_SRCGW + rump_server_add_iface $SOCKFWD shmif1 $BUS_DSTGW + export RUMP_SERVER=$SOCKFWD if [ $mode = "ipv6" ]; then atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6SRCGW} atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6DSTGW} @@ -178,6 +168,7 @@ setup_forwarder() atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig shmif1 up + atf_check -s exit:0 rump.ifconfig -w 10 if $DEBUG; then rump.netstat -nr @@ -204,9 +195,9 @@ setup_forwarding6() setup() { - atf_check -s exit:0 rump_server $RUMP_LIBS $SOCKSRC - atf_check -s exit:0 rump_server $RUMP_LIBS $SOCKFWD - atf_check -s exit:0 rump_server $RUMP_LIBS $SOCKDST + rump_server_start $SOCKSRC + rump_server_start $SOCKFWD + rump_server_start $SOCKDST setup_endpoint $SOCKSRC $IP4SRC $BUS_SRCGW ipv4 $IP4SRCGW setup_endpoint $SOCKDST $IP4DST $BUS_DSTGW ipv4 $IP4DSTGW @@ -216,9 +207,9 @@ setup() setup6() { - atf_check -s exit:0 rump_server $RUMP_LIBS_IPV6 $SOCKSRC - atf_check -s exit:0 rump_server $RUMP_LIBS_IPV6 $SOCKFWD - atf_check -s exit:0 rump_server $RUMP_LIBS_IPV6 $SOCKDST + rump_server_start $SOCKSRC netinet6 + rump_server_start $SOCKFWD netinet6 + rump_server_start $SOCKDST netinet6 setup_endpoint $SOCKSRC $IP6SRC $BUS_SRCGW ipv6 $IP6SRCGW setup_endpoint $SOCKDST $IP6DST $BUS_DSTGW ipv6 $IP6DSTGW @@ -380,6 +371,7 @@ route_command_get_body() setup setup_forwarding test_route_get + rump_server_destroy_ifaces } route_command_get6_body() @@ -388,36 +380,20 @@ route_command_get6_body() setup6 setup_forwarding6 test_route_get6 -} - -dump() -{ - - env RUMP_SERVER=$SOCKSRC rump.netstat -nr - env RUMP_SERVER=$SOCKFWD rump.netstat -nr - env RUMP_SERVER=$SOCKDST rump.netstat -nr - - shmif_dumpbus -p - bus1 2>/dev/null| tcpdump -n -e -r - - shmif_dumpbus -p - bus2 2>/dev/null| tcpdump -n -e -r - -} - -cleanup() -{ - - env RUMP_SERVER=$SOCKSRC rump.halt - env RUMP_SERVER=$SOCKFWD rump.halt - env RUMP_SERVER=$SOCKDST rump.halt + rump_server_destroy_ifaces } route_command_get_cleanup() { + $DEBUG && dump cleanup } route_command_get6_cleanup() { - dump + + $DEBUG && dump cleanup } diff --git a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c index b73e52a..2c21a90 100644 --- a/contrib/netbsd-tests/rump/modautoload/t_modautoload.c +++ b/contrib/netbsd-tests/rump/modautoload/t_modautoload.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_modautoload.c,v 1.4 2015/12/27 08:21:44 pgoyette Exp $ */ +/* $NetBSD: t_modautoload.c,v 1.5 2016/09/14 03:19:11 ozaki-r Exp $ */ #include <sys/types.h> #include <sys/mount.h> @@ -46,6 +46,7 @@ mountkernfs(void) atf_tc_fail_errno("mkdir /kern"); new_autoload = true; + old_len = sizeof(old_autoload); new_len = sizeof(new_autoload); error = sysctlbyname("kern.module.autoload", &old_autoload, &old_len, diff --git a/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c b/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c index d4eee3a..6e78d02 100644 --- a/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c +++ b/contrib/netbsd-tests/rump/rumpkern/t_lwproc.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_lwproc.c,v 1.7 2015/01/21 15:19:01 pooka Exp $ */ +/* $NetBSD: t_lwproc.c,v 1.8 2017/01/10 22:36:29 christos Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -29,6 +29,7 @@ #include <sys/types.h> #include <sys/wait.h> +#include <sys/stat.h> #include <rump/rump.h> #include <rump/rump_syscalls.h> diff --git a/contrib/netbsd-tests/sys/net/t_print.c b/contrib/netbsd-tests/sys/net/t_print.c index 0aaeb30..ff17895 100644 --- a/contrib/netbsd-tests/sys/net/t_print.c +++ b/contrib/netbsd-tests/sys/net/t_print.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $ */ +/* $NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_print.c,v 1.1 2014/12/02 19:48:21 christos Exp $"); +__RCSID("$NetBSD: t_print.c,v 1.2 2016/08/27 11:30:49 christos Exp $"); #include "net/dl_print.c" @@ -147,7 +147,10 @@ ATF_TC_BODY(sdl_print, tc) memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr)); sdl.sdl_index = (uint16_t)i; r = sdl_print(buf, l, &sdl); - e = snprintf(res, l, "[%s]:%zu", tst[i].str, i); + if (i == 3) + e = snprintf(res, l, "link#%zu", i); + else + e = snprintf(res, l, "[%s]:%zu", tst[i].str, i); ATF_REQUIRE_STREQ(buf, res); ATF_REQUIRE_EQ(r, e); } @@ -157,7 +160,10 @@ ATF_TC_BODY(sdl_print, tc) memcpy(&sdl.sdl_addr, &tst[i].ia, sizeof(sdl.sdl_addr)); sdl.sdl_index = (uint16_t)i; r = sdl_print(buf, l, &sdl); - e = snprintf(res, l, "[%s]:%zu", tst[i].str, i); + if (i == 3) + e = snprintf(res, l, "link#%zu", i); + else + e = snprintf(res, l, "[%s]:%zu", tst[i].str, i); ATF_REQUIRE_STREQ(buf, res); ATF_REQUIRE_EQ(r, e); } diff --git a/contrib/netbsd-tests/usr.bin/config/t_config.sh b/contrib/netbsd-tests/usr.bin/config/t_config.sh index 8a8079c..55af069 100755 --- a/contrib/netbsd-tests/usr.bin/config/t_config.sh +++ b/contrib/netbsd-tests/usr.bin/config/t_config.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_config.sh,v 1.7 2015/10/04 07:59:47 uebayasi Exp $ +# $NetBSD: t_config.sh,v 1.8 2016/08/27 12:08:14 christos Exp $ # # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -25,12 +25,32 @@ # POSSIBILITY OF SUCH DAMAGE. # +srcdir=.. +merge_backslash() +{ + sed ' +: again +/\\$/ { + N + s/\\\n// + t again +} +' "$1" +} run_and_check_prep() { local name="${1}"; shift - mkdir compile - supportdir="$(atf_get_srcdir)/support" + mkdir -p compile + srcdir="$(atf_get_srcdir)" + if [ ! -d "${srcdir}/support" ]; then + srcdir="$(dirname "${srcdir}")" + if [ ! -d "${srcdir}/support" ]; then + atf_fail "bad source directory ${srcdir}" + exit 1 + fi + fi + supportdir="${srcdir}/support" local config_str eval config_str=\$${name}_config_str @@ -38,7 +58,7 @@ run_and_check_prep() config="d_${name}" printf "$config_str" >"${config}" else - config="$(atf_get_srcdir)/d_${name}" + config="${srcdir}/d_${name}" fi } @@ -121,28 +141,28 @@ test_case deffs_redef fail "Checks that config doesn't allow a deffs to use" \ "the same name as a previous defflag/defparam" # Selecting an undefined option. -undefined_opt_config_str=' -include "../d_min" +undefined_opt_config_str=" +include \"${srcdir}/d_min\" options UNDEFINED -' +" test_case undefined_opt pass \ "Checks that config allows a selection for an undefined options" # Negating an undefined option. -no_undefined_opt_config_str=' -include "../d_min" +no_undefined_opt_config_str=" +include \"${srcdir}/d_min\" no options UNDEFINED -' +" no_undefined_opt_stderr='match:UNDEFINED' test_case no_undefined_opt warn \ "Checks that config allows a negation for an undefined options" # Attribute selection test_case select pass "Attribute selection" -select_config_str=' -include "../d_min" +select_config_str=" +include \"${srcdir}/d_min\" select c -' +" check_select() { local f=Makefile @@ -158,11 +178,11 @@ select_body() { # Attribute negation test_case no_select pass "Attribute negation" -no_select_config_str=' -include "../d_min" +no_select_config_str=" +include \"${srcdir}/d_min\" select c no select a -' +" check_no_select() { local f=Makefile @@ -181,10 +201,10 @@ no_select_body() { # Device instance test_case devi pass "Device instance" -devi_config_str=' -include "../d_min" +devi_config_str=" +include \"${srcdir}/d_min\" d0 at root -' +" check_devi() { local f=ioconf.c @@ -226,9 +246,7 @@ check_min_makefile() grep -q '^%' $f >tmp.template grep -q '^MACHINE=regress$' $f && - grep -q '^PARAM=-DMAXUSERS=4$' $f && - grep -q '^all: regress$' $f && - grep -q '^regress:' $f && + (merge_backslash $f | grep -q '^IDENT=[ ]*-DMAXUSERS="4"') && [ ! -s tmp.template ] && : } diff --git a/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh b/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh index 9c19116..2d532c0 100755 --- a/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh +++ b/contrib/netbsd-tests/usr.bin/netpgpverify/t_netpgpverify.sh @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: t_netpgpverify.sh,v 1.3 2016/06/01 06:39:11 agc Exp $ +# $NetBSD: t_netpgpverify.sh,v 1.4 2016/08/28 15:59:15 christos Exp $ # # Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -525,7 +525,7 @@ StZtC+VbuN66pfHwsAIAAw== EOF uudecode << EOF begin-base64 644 NetBSD-6.0_hashes.asc.gz -H4sICAAAAAACA05ldEJTRC02LjBfaGFzaGVzLmFzYwDUvduOXceVpX3deoq87B8o +H4sICLYIw1cCA05ldEJTRC02LjBfaGFzaGVzLmFzYwDUvduOXceVpX3deoq87B8o y3E+NNDA7yqrXQZKsmHZQN8V4igTRYkCSVWV++n7G4tMcu9kZnJlSgW4SYsmM3fG ihUz5pxjRMzDr37Fr3/86ne//+bmj7/74823v//dN1/99ubrr7799je/+0rf+9UX /9ze/PV/3Hz7z7+xX/Drz39dN/vVy5ev/uPFD9/dvHhz027Gq+9/fLnerpuXL968 @@ -6708,223 +6708,223 @@ pL+3CVk1P6YRa9KiMyiRJWfnUcDul1ZuoxYIExVsxJTRktenJljvSqENKgZEXQQW BeCV0wUcL/W2jQwurZdliEKl2Ol1HS0Xpw+yNnd9qx0rSprqJhxbsLFvfQAi0aZN pTRGqo9C9qYTP8xFN3tCiDKUTNeRnoJ2u51wDl1ddeJgE/FtR7seraSeOo4asdKK bxwm6/orfaEf8K9bixVNVftP13/91f5hVoH4dzDUKrcQQIuRU4qxndLiRl+02mk/ -Bh1fXF4EQ/TgfzV3bl1CFcmXf+dT9Oss12jmyfusNQ8IXpBWQW21fZmVVxtEEBRB -Pv3s3ymwq6CoOsXfB221Fak8eU5kRuzIjNi7Vu0jbRwtMMQ4a+7dRjdho1Re1isd -jn4IRwv/dXIzoZ9ZKHiqm4BLHEZZrFxTLDkprfdCiDD1piSMKCchDGZXsyvSn4kg -l1ahU6K3Ynyb+S6ZNo1KSiiGAF2hsHMklKdnizClGkjiYD5q9lwTXjI2S8xqA28y -mRla0PiNJAysrKEOaw6Y8aKi+Do5qa2wR2/KfPWvUXCpQ3CX/Oixr+yjbYfsecFz -tGV82iz0ckCpBEGyImxtyAQIYDm4e4WJempDgEapmefAOMywCbx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PzZ1b +X//7s0dPv8wf/+fn8u+b8fntj3+pz679+HG4ux798uv2y7f3y70Pknn69cOfPv3h +obt/68EHd776bdz843n/6ZPtm4fzwW/XP37+6fNfvvnm2b343c/Xn4YX9vtrX3zz +2U+Pv3/85fxo3rz/9ffX/xjLfPPi92d/rJ8+eXr39+/urC/y9+/d/c+PH7XH1/+1 +nt6+c/uLfHM9fHAvXQ9ffPjztce3bt2xjx494P6s3Pn27vXfb/vb7bv1zdMb9vH2 +5Na/f/rnJy/K7x8+/+TO/burfPX8n/67B5+37x+/mA+++/Wzm9f+Yz//9tvf/C/x +0U3/6ON79Yu7f3ypiPC5+f7bh09vvBf79a/uvffVk5+efGDufdp+/fDZD7999/TO +i7r9/uzzX839G9duf5TN3X/a+3cf3Lz707I37j364vtfPv3xt3+t35W6Xe/6bfnx +/V/e++3x7Yc/fPHj7Wc3Xnx076MH6+GjP8rPX975+doH//7i+bOP/p3vv7jR4s9P +zQfun59tN756+tuzm7d+/DLdjvX6oxg+/Ohbc7/Gr/8I9cUq929/9MX12+3FXD9+ +cu36XXvj0zuPXPz9h9/6oz8++LLceTpvP/sgmE8e/7g9efLRk5u/vLiRf/rsl/DA +3X04f/vpAz9/efrTN0/lc9972q+ZB1/f//zZjU9a/P73p4+/IF15+OT2rVuf3r31 +3Yzxu/7Tg3L/0xeP37t+3z76z40H9sObn3//6EF58Um7/ezu7XvX4h/3fnh+45O7 +5fP5xwfmgf3mvV8/uvZ/H33yXT/ZJLc+v3neFvn/qZKFEe79DQA= ==== EOF gunzip NetBSD-6.0_hashes.asc.gz @@ -6958,18 +6958,15 @@ YzFlNiBiZjcxIDg4NDUgNDE2YiA5NTIyIDc5ZGUgYjYxZSA0ODhlIGVlNzQgCgo= EOF uudecode << EOF begin-base64 644 expected18 -R29vZCBzaWduYXR1cmUgZm9yIGdwZ3NpZ25lZC1hLmdwZyBtYWRlIFN1biBTZXAg -IDkgMTc6NDM6MDEgMjAxMgpzaWduYXR1cmUgIDIwNDgvUl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zdHJpbmcKTCBtdGltZQp0ZXh0ClBST0c9cApTUkNTPXBhcnNl +LmMKV0FSTlM9NQpNS01BTj1ubwpDUFBGTEFHUys9LWcgLU8wCkxERkxBR1MrPS1n +IC1PMAoKLmluY2x1ZGUgPGJzZC5wcm9nLm1rPgoKdDogJHtQUk9HfQoJLi8ke1BS +T0d9IGdwZ3NpZ25lZC1hLmdwZwo= ==== EOF uudecode << EOF @@ -7207,13 +7194,12 @@ IG5ldHBncHZlcmlmeQo= ==== EOF atf_check -s eq:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg - atf_check -s eq:0 -o file:2.expected -e empty b2e < 2.in - atf_check -s eq:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -c verify a.gpg - atf_check -s eq:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -c verify NetBSD-6.0_RC2_hashes.asc + atf_check -s eq:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify a.gpg +# atf_check -s eq:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify NetBSD-6.0_RC2_hashes.asc atf_check -s eq:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc - atf_check -s eq:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify < a.gpg + atf_check -s eq:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < a.gpg atf_check -s eq:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc - atf_check -s eq:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc +# atf_check -s eq:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc atf_check -s eq:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg #atf_check -s eq:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg #atf_check -s eq:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg @@ -7225,7 +7211,7 @@ EOF atf_check -s eq:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg atf_check -s eq:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg atf_check -s eq:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig - atf_check -s eq:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -c cat -k pubring.gpg det.sig + atf_check -s eq:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat det.sig #atf_check -s eq:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc } diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c new file mode 100644 index 0000000..508bcc9 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_anon_union.c @@ -0,0 +1,16 @@ +/* struct with only anonymous members */ + +struct foo { + union { + long loo; + double doo; + }; +}; + +int +main(void) { + + struct foo *f = 0; + printf("%p\n", &f[1]); + return 0; +} diff --git a/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c new file mode 100644 index 0000000..31628b4 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/xlint/lint1/d_c99_union_cast.c @@ -0,0 +1,18 @@ +/* union cast */ + +struct bar { + int a; + int b; +}; + +union foo { + struct bar *a; + int b; +}; + +void +foo(void) { + struct bar *a; + + ((union foo)a).a; +} diff --git a/lib/libc/tests/db/Makefile b/lib/libc/tests/db/Makefile index fe54d3b..c056384 100644 --- a/lib/libc/tests/db/Makefile +++ b/lib/libc/tests/db/Makefile @@ -7,12 +7,14 @@ PROGS+= h_lfsr FILESDIR= ${TESTSDIR} -FILES= README +FILES+= README NETBSD_ATF_TESTS_C+= db_hash_seq_test NETBSD_ATF_TESTS_SH+= db_test ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' +CFLAGS+= -I${SRCTOP}/lib/libc/db/btree + .include "../Makefile.netbsd-tests" .include <bsd.test.mk> diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 476b5b7..ac9f8e0 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -12,10 +12,20 @@ ATF_TESTS_C+= popen_test ATF_TESTS_C+= posix_spawn_test ATF_TESTS_C+= wordexp_test -# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep +# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, # TODO: t_siginfo (fixes require further inspection) # TODO: t_sethostname_test (consistently screws up the hostname) +CFLAGS+= -DTEST_LONG_DOUBLE + +# Not sure why this isn't defined for all architectures, since most +# have long double. +.if ${MACHINE_CPUARCH} == "aarch64" || \ + ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -D__HAVE_LONG_DOUBLE +.endif + NETBSD_ATF_TESTS_C= alarm_test NETBSD_ATF_TESTS_C+= assert_test NETBSD_ATF_TESTS_C+= basedirname_test diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index af0341c..1548fac 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -10,6 +10,14 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test .endif +# Not sure why this isn't defined for all architectures, since most +# have long double. +.if ${MACHINE_CPUARCH} == "aarch64" || \ + ${MACHINE_CPUARCH} == "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -D__HAVE_LONG_DOUBLE +.endif + # TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi NETBSD_ATF_TESTS_C+= abs_test NETBSD_ATF_TESTS_C+= atoi_test diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile index ed5eaa9..be2f4e7 100644 --- a/lib/libc/tests/sys/Makefile +++ b/lib/libc/tests/sys/Makefile @@ -59,6 +59,8 @@ NETBSD_ATF_TESTS_C+= ucontext_test NETBSD_ATF_TESTS_C+= umask_test NETBSD_ATF_TESTS_C+= unlink_test NETBSD_ATF_TESTS_C+= wait_test +NETBSD_ATF_TESTS_C+= wait_noproc_test +NETBSD_ATF_TESTS_C+= wait_noproc_wnohang_test NETBSD_ATF_TESTS_C+= write_test DPADD.getpid_test+= ${LIBPTHREAD} @@ -66,6 +68,8 @@ LDADD.getpid_test+= -lpthread DPADD.timer_create_test+= ${LIBRT} LDADD.timer_create_test+= -lrt +CSTD?= c99 + .include "../Makefile.netbsd-tests" SRCS.mlock_test+= mlock_helper.c diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index b0725dc..cd8f868 100644 --- a/lib/libthr/tests/Makefile +++ b/lib/libthr/tests/Makefile @@ -22,6 +22,7 @@ NETBSD_ATF_TESTS_C+= sigsuspend_test NETBSD_ATF_TESTS_C+= siglongjmp_test NETBSD_ATF_TESTS_C+= sleep_test NETBSD_ATF_TESTS_C+= swapcontext_test +NETBSD_ATF_TESTS_C+= timedmutex_test NETBSD_ATF_TESTS_SH= atexit_test NETBSD_ATF_TESTS_SH+= cancel_test diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 9b4e9c7..318fc7b 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -16,12 +16,15 @@ NETBSD_ATF_TESTS_C+= asin_test NETBSD_ATF_TESTS_C+= atan_test NETBSD_ATF_TESTS_C+= cbrt_test NETBSD_ATF_TESTS_C+= ceil_test +NETBSD_ATF_TESTS_C+= casinh_test NETBSD_ATF_TESTS_C+= cos_test NETBSD_ATF_TESTS_C+= cosh_test NETBSD_ATF_TESTS_C+= erf_test NETBSD_ATF_TESTS_C+= exp_test NETBSD_ATF_TESTS_C+= fmod_test +NETBSD_ATF_TESTS_C+= fe_round_test NETBSD_ATF_TESTS_C+= infinity_test +NETBSD_ATF_TESTS_C+= ilogb_test NETBSD_ATF_TESTS_C+= ldexp_test NETBSD_ATF_TESTS_C+= log_test NETBSD_ATF_TESTS_C+= pow_test @@ -42,7 +45,7 @@ TAP_TESTS_C+= exponential_test TAP_TESTS_C+= fenv_test TAP_TESTS_C+= fma_test TAP_TESTS_C+= fmaxmin_test -TAP_TESTS_C+= ilogb_test +TAP_TESTS_C+= ilogb2_test TAP_TESTS_C+= invtrig_test TAP_TESTS_C+= invctrig_test TAP_TESTS_C+= logarithm_test @@ -68,6 +71,8 @@ DPADD+= ${LIBM} IGNORE_PRAGMA= +SRCS.ilogb2_test= ilogb_test.c + # Copied from lib/msun/Makefile .if ${MACHINE_CPUARCH} == "i386" ARCH_SUBDIR= i387 |