Lines Matching refs:expected
24 struct expected { struct
37 const struct expected *expected; argument
55 const struct expected *expected; in check() local
66 expected = ctx->expected + ctx->i++; in check()
70 if (ctx->match_host_p && expected->match_host_p) in check()
72 if (ctx->match_host_s && expected->match_host_s) in check()
74 if (ctx->match_ipv4 && expected->match_ipv4) in check()
76 if (ctx->match_ipv6 && expected->match_ipv6) in check()
79 expected_status = (parse_key || expected->no_parse_status < 0) ? in check()
80 expected->l.status : (u_int)expected->no_parse_status; in check()
81 expected_match = expected->l.match; in check()
83 if (ctx->x && expected->x) { \ in check()
84 expected_match |= expected->x; \ in check()
89 expected_keytype = (parse_key || expected->no_parse_keytype < 0) ? in check()
90 expected->l.keytype : expected->no_parse_keytype; in check()
93 if (expected->l.keytype == KEY_ECDSA || in check()
94 expected->no_parse_keytype == KEY_ECDSA) in check()
98 if (expected->l.keytype == KEY_DSA || in check()
99 expected->no_parse_keytype == KEY_DSA) in check()
103 if (expected->l.keytype == KEY_DSA || in check()
104 expected->no_parse_keytype == KEY_DSA || in check()
105 expected->l.keytype == KEY_RSA || in check()
106 expected->no_parse_keytype == KEY_RSA || in check()
107 expected->l.keytype == KEY_ECDSA || in check()
108 expected->no_parse_keytype == KEY_ECDSA) in check()
122 ASSERT_LONG_LONG_EQ(l->linenum, expected->l.linenum); in check()
126 if (expected->l.line != NULL) in check()
127 ASSERT_STRING_EQ(l->line, expected->l.line); in check()
128 ASSERT_INT_EQ(l->marker, expected->l.marker); in check()
130 if (expected->l.hosts != NULL) in check()
131 ASSERT_STRING_EQ(l->hosts, expected->l.hosts); in check()
133 if (expected->l.rawkey != NULL) in check()
134 ASSERT_STRING_EQ(l->rawkey, expected->l.rawkey); in check()
138 if (expected->l.key == NULL) in check()
140 if (expected->l.key != NULL) { in check()
142 ASSERT_INT_EQ(sshkey_equal(l->key, expected->l.key), 1); in check()
145 if (parse_key && !(l->comment == NULL && expected->l.comment == NULL)) in check()
146 ASSERT_STRING_EQ(l->comment, expected->l.comment); in check()
152 prepare_expected(struct expected *expected, size_t n) in prepare_expected() argument
157 if (expected[i].key_file == NULL) in prepare_expected()
160 if (expected[i].l.keytype == KEY_ECDSA) in prepare_expected()
164 if (expected[i].l.keytype == KEY_DSA) in prepare_expected()
168 switch (expected[i].l.keytype) { in prepare_expected()
176 test_data_file(expected[i].key_file), &expected[i].l.key, in prepare_expected()
182 cleanup_expected(struct expected *expected, size_t n) in cleanup_expected() argument
187 sshkey_free(expected[i].l.key); in cleanup_expected()
188 expected[i].l.key = NULL; in cleanup_expected()
192 struct expected expected_full[] = {
909 ctx.expected = expected_full; in test_iterate()
920 ctx.expected = expected_full; in test_iterate()
931 ctx.expected = expected_full; in test_iterate()
943 ctx.expected = expected_full; in test_iterate()
955 ctx.expected = expected_full; in test_iterate()
967 ctx.expected = expected_full; in test_iterate()
979 ctx.expected = expected_full; in test_iterate()
990 ctx.expected = expected_full; in test_iterate()
1001 ctx.expected = expected_full; in test_iterate()
1013 ctx.expected = expected_full; in test_iterate()
1026 ctx.expected = expected_full; in test_iterate()
1038 ctx.expected = expected_full; in test_iterate()
1051 ctx.expected = expected_full; in test_iterate()
1063 ctx.expected = expected_full; in test_iterate()
1074 ctx.expected = expected_full; in test_iterate()
1087 ctx.expected = expected_full; in test_iterate()
1101 ctx.expected = expected_full; in test_iterate()
1114 ctx.expected = expected_full; in test_iterate()