test_dyndns.c revision 44996f2ea96ce75bf76f5155a6bdecf295593d97
it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License /* In order to access opaque types */ usleep(
50000);
/* 50 miliseconds */ usleep(
50000);
/* 50 miliseconds */ /* Do not alocate directly on ifap->ifa_addr to * avoid alignment warnings */ /* convert straddr into ifa_addr */ /* There must be only one address with the correct value */ /* ip addresses are returned in different order */ /* ip addresses are returned in different order */ for (i = 0; i <
size; i++) {
for (i = 0; i <
size; i++) {
/* addresses are returned in reversed order */ /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
"\nupdate delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" /* fallback case realm and server */ "update delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" "update delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" "update delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" "\nupdate delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" "\nupdate add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
"\nupdate delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.1\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::444\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
"\nupdate delete bran_stark. in A\n" "update add bran_stark. 1234 in A 192.168.0.1\n" "update add bran_stark. 1234 in A 192.168.0.2\n" "update delete bran_stark. in AAAA\n" /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
"\nupdate delete bran_stark. in A\n" "update delete bran_stark. in AAAA\n" "update add bran_stark. 1234 in AAAA 2001:cdba::444\n" "update add bran_stark. 1234 in AAAA 2001:cdba::555\n" /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
/* ip addresses are returned in different order */ /* ip addresses are returned in different order */ /* getifaddrs is called twice in sss_get_dualstack_addresses() */ for (i = 0; i <
2; i++) {
/* loopback - invalid for dns (should be skipped) */ /* linklocal - invalid for dns (should be skipped) */ /* ip addresses are returned in different order */ /* ip addresses are returned in different order */ /* ip addresses are returned in different order */ /* ip addresses are returned in different order */ /* Wait until the test finishes with EOK */ /* Wait until the test finishes with EIO (child error) */ /* Wait until the test finishes with EIO (child error) */ /* The event queue may not be empty. We need to make sure that all events * are processed. Unfortunately, tevent_loop_wait() contains a bug that * prevents exiting the loop even if there are no remaining events, thus * we have to use tevent_loop_once(). * FIXME: use tevent_loop_wait() when the bug is fixed /* Wait until the timer hits */ /* Testsuite setup and teardown */ {
"dyndns_update",
"true" },
{
"dyndns_refresh_interval",
"2" },
_(
"Do not delete the test database after a test run"),
NULL },
/* Utility functions unit test */ /* Dynamic DNS update unit tests*/ /* Dynamic DNS dualstack unit tests*/ /* Messages for nsupdate */ /* Set debug level to invalid value so we can deside if -d 0 was used. */ /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */