Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/netinet/libalias/1_instance.c
#include <atf-c.h> | #include <atf-c.h> | ||||
#include <alias.h> | #include <alias.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
static int randcmp(const void *a, const void *b) { | #include "util.h" | ||||
int res, r = rand(); | |||||
(void)a; | |||||
(void)b; | |||||
res = (r/4 < RAND_MAX/9) ? 1 | |||||
: (r/5 < RAND_MAX/9) ? 0 | |||||
: -1; | |||||
return (res); | |||||
} | |||||
ATF_TC(2_destroynull); | ATF_TC(2_destroynull); | ||||
ATF_TC_HEAD(2_destroynull, env) | ATF_TC_HEAD(2_destroynull, env) | ||||
{ | { | ||||
atf_tc_set_md_var(env, "descr", "Destroy the NULL instance"); | atf_tc_set_md_var(env, "descr", "Destroy the NULL instance"); | ||||
} | } | ||||
ATF_TC_BODY(2_destroynull, dummy) | ATF_TC_BODY(2_destroynull, dummy) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |