socket_test.c revision 2f17ad4545ca552c92c88f7cb1e2525050c10c67
/*
* Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket_test.c,v 1.3 2011/07/28 23:47:59 tbox Exp $ */
/*! \file */
#include <config.h>
#include <atf-c.h>
#include <unistd.h>
#include <time.h>
#include "../task_p.h"
#include "isctest.h"
/*
* Helper functions
*/
typedef struct {
} completion_t;
static void
}
static void
}
static void
#ifdef HAVE_NANOSLEEP
#else
/* Round up to the nearest second and sleep, instead */
#endif
}
static isc_result_t
int i = 0;
#ifndef ISC_PLATFORM_USETHREADS
while (isc__taskmgr_ready(taskmgr))
#endif
nap(1000);
}
if (completion->done)
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
}
/*
* Individual unit tests
*/
}
isc_region_t r;
/*
* Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
* each other.
*/
isc_test_end();
}
}
isc_region_t r;
/*
* Create two sockets: 127.0.0.1/5444 and 127.0.0.1/5445, talking to
* each other.
*/
isc_test_end();
}
/*
* Main
*/
ATF_TP_ADD_TCS(tp) {
return (atf_no_error());
}