errno_test.c revision f5898cf3484b1588d5239faa4062a2b2b606ce91
/*
* Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config.h>
#include <stdio.h>
#include <atf-c.h>
typedef struct {
int err;
} testpair_t;
testpair_t testpair[] = {
{ EPERM, ISC_R_NOPERM },
{ ENOENT, ISC_R_FILENOTFOUND },
{ EIO, ISC_R_IOERROR },
{ EBADF, ISC_R_INVALIDFILE },
{ ENOMEM, ISC_R_NOMEMORY },
{ EACCES, ISC_R_NOPERM },
{ EEXIST, ISC_R_FILEEXISTS },
{ ENOTDIR, ISC_R_INVALIDFILE },
{ EINVAL, ISC_R_INVALIDFILE },
{ ENFILE, ISC_R_TOOMANYOPENFILES },
{ EMFILE, ISC_R_TOOMANYOPENFILES },
{ EPIPE, ISC_R_CONNECTIONRESET },
{ ELOOP, ISC_R_INVALIDFILE },
#ifdef EOVERFLOW
{ EOVERFLOW, ISC_R_RANGE },
#endif
#ifdef EAFNOSUPPORT
#endif
#ifdef EADDRINUSE
{ EADDRINUSE, ISC_R_ADDRINUSE },
#endif
#ifdef ENETDOWN
{ ENETDOWN, ISC_R_NETDOWN },
#endif
#ifdef ENETUNREACH
{ ENETUNREACH, ISC_R_NETUNREACH },
#endif
#ifdef ECONNABORTED
#endif
#ifdef ECONNRESET
#endif
#ifdef ENOBUFS
{ ENOBUFS, ISC_R_NORESOURCES },
#endif
#ifdef ENOTCONN
{ ENOTCONN, ISC_R_NOTCONNECTED },
#endif
#ifdef ETIMEDOUT
{ ETIMEDOUT, ISC_R_TIMEDOUT },
#endif
#ifdef EHOSTDOWN
{ EHOSTDOWN, ISC_R_HOSTDOWN },
#endif
#ifdef EHOSTUNREACH
#endif
{ 0, ISC_R_UNEXPECTED }
};
}
size_t i;
}
}
/*
* Main
*/
ATF_TP_ADD_TCS(tp) {
return (atf_no_error());
}