Lines Matching full:expected
90 const struct sshauthopt *expected) in compare_opts() argument
95 ASSERT_PTR_NE(expected, NULL); in compare_opts()
96 ASSERT_PTR_NE(expected, opts); /* bozo :) */ in compare_opts()
98 #define FLAG_EQ(x) ASSERT_INT_EQ(opts->x, expected->x) in compare_opts()
110 if (expected->x == NULL) \ in compare_opts()
111 ASSERT_PTR_EQ(opts->x, expected->x); \ in compare_opts()
113 ASSERT_STRING_EQ(opts->x, expected->x); \ in compare_opts()
123 ASSERT_SIZE_T_EQ(opts->nx, expected->nx); \ in compare_opts()
124 if (expected->nx == 0) \ in compare_opts()
126 for (i = 0; i < expected->nx; i++) \ in compare_opts()
127 ASSERT_STRING_EQ(opts->x[i], expected->x[i]); \ in compare_opts()
137 struct sshauthopt *opts, *expected; in test_authkeys_parse() local
152 compare_opts(opts, expected); \ in test_authkeys_parse()
153 sshauthopt_free(expected); \ in test_authkeys_parse()
159 expected = default_authkey_opts(); in test_authkeys_parse()
165 expected = default_authkey_opts(); in test_authkeys_parse()
171 expected = default_authkey_restrict_opts(); in test_authkeys_parse()
185 expected = default_authkey_opts(); in test_authkeys_parse()
186 expected->force_tun_device = 1; in test_authkeys_parse()
192 expected = default_authkey_opts(); in test_authkeys_parse()
193 expected->force_tun_device = SSH_TUNID_ANY; in test_authkeys_parse()
204 expected = default_authkey_opts(); \ in test_authkeys_parse()
205 expected->var = val; \ in test_authkeys_parse()
208 expected = default_authkey_restrict_opts(); \ in test_authkeys_parse()
209 expected->var = val; \ in test_authkeys_parse()
234 expected = default_authkey_opts(); \ in test_authkeys_parse()
235 expected->var = strdup(val); \ in test_authkeys_parse()
236 ASSERT_PTR_NE(expected->var, NULL); \ in test_authkeys_parse()
239 expected = default_authkey_restrict_opts(); \ in test_authkeys_parse()
240 expected->var = strdup(val); \ in test_authkeys_parse()
241 ASSERT_PTR_NE(expected->var, NULL); \ in test_authkeys_parse()
259 expected = default_authkey_opts(); \ in test_authkeys_parse()
260 expected->var = commasplit(val, &expected->nvar); \ in test_authkeys_parse()
261 ASSERT_PTR_NE(expected->var, NULL); \ in test_authkeys_parse()
264 expected = default_authkey_restrict_opts(); \ in test_authkeys_parse()
265 expected->var = commasplit(val, &expected->nvar); \ in test_authkeys_parse()
266 ASSERT_PTR_NE(expected->var, NULL); \ in test_authkeys_parse()
293 struct sshauthopt *opts, *expected; in test_cert_parse() local
297 compare_opts(opts, expected); \ in test_cert_parse()
298 sshauthopt_free(expected); \ in test_cert_parse()
306 expected = default_authkey_opts(); \ in test_cert_parse()
307 expected->var = 0; \ in test_cert_parse()
313 expected = sshauthopt_new(); \ in test_cert_parse()
314 ASSERT_PTR_NE(expected, NULL); \ in test_cert_parse()
315 expected->var = 1; \ in test_cert_parse()
329 expected = default_authkey_opts(); in test_cert_parse()
336 expected = sshauthopt_new(); in test_cert_parse()
337 ASSERT_PTR_NE(expected, NULL); in test_cert_parse()
344 expected = default_authkey_opts(); in test_cert_parse()
345 expected->force_command = strdup("foo"); in test_cert_parse()
346 ASSERT_PTR_NE(expected->force_command, NULL); in test_cert_parse()
353 expected = default_authkey_opts(); in test_cert_parse()
354 expected->required_from_host_cert = strdup("127.0.0.1/32,::1/128"); in test_cert_parse()
355 ASSERT_PTR_NE(expected->required_from_host_cert, NULL); in test_cert_parse()
380 struct sshauthopt *key_opts, *cert_opts, *merge_opts, *expected; in test_merge() local
389 expected = NULL; \ in test_merge()
405 sshauthopt_free(expected); \ in test_merge()
417 compare_opts(merge_opts, expected); \ in test_merge()
425 expected = mostly_off ? \ in test_merge()
427 expected->var = val; \ in test_merge()
428 ASSERT_PTR_NE(expected, NULL); \ in test_merge()
485 expected = default_authkey_opts(); in test_merge()
486 expected->required_from_host_cert = strdup("127.0.0.1/32,::1/128"); in test_merge()
487 ASSERT_PTR_NE(expected->required_from_host_cert, NULL); in test_merge()
488 expected->required_from_host_keys = strdup("127.0.0.1"); in test_merge()
489 ASSERT_PTR_NE(expected->required_from_host_keys, NULL); in test_merge()
494 expected = default_authkey_opts(); in test_merge()
499 expected = default_authkey_opts(); in test_merge()
500 expected->required_from_host_keys = strdup("127.0.0.1"); in test_merge()
501 ASSERT_PTR_NE(expected->required_from_host_keys, NULL); in test_merge()
506 expected = default_authkey_opts(); in test_merge()
507 expected->required_from_host_cert = strdup("127.0.0.1/32,::1/128"); in test_merge()
508 ASSERT_PTR_NE(expected->required_from_host_cert, NULL); in test_merge()
513 expected = default_authkey_opts(); in test_merge()
514 expected->force_command = strdup("foo"); in test_merge()
515 ASSERT_PTR_NE(expected->force_command, NULL); in test_merge()
520 expected = default_authkey_opts(); in test_merge()
525 expected = default_authkey_opts(); in test_merge()
526 expected->force_command = strdup("bar"); in test_merge()
527 ASSERT_PTR_NE(expected->force_command, NULL); in test_merge()
532 expected = default_authkey_opts(); in test_merge()
533 expected->force_command = strdup("foo"); in test_merge()
534 ASSERT_PTR_NE(expected->force_command, NULL); in test_merge()
544 expected = default_authkey_opts(); in test_merge()
545 expected->force_tun_device = 6; in test_merge()
551 expected = default_authkey_opts(); in test_merge()
552 expected->permitopen = commasplit("127.0.0.1:*,127.0.0.1:123", in test_merge()
553 &expected->npermitopen); in test_merge()
559 expected = default_authkey_opts(); in test_merge()
560 expected->env = commasplit("foo=a,bar=b", &expected->nenv); in test_merge()