|
Packit Service |
99d1c0 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
Packit Service |
99d1c0 |
/* lib/krad/t_test.h - Shared declarations for libkrad test programs */
|
|
Packit Service |
99d1c0 |
/*
|
|
Packit Service |
99d1c0 |
* Copyright 2013 Red Hat, Inc. All rights reserved.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
99d1c0 |
* modification, are permitted provided that the following conditions are met:
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* 1. Redistributions of source code must retain the above copyright
|
|
Packit Service |
99d1c0 |
* notice, this list of conditions and the following disclaimer.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* 2. Redistributions in binary form must reproduce the above copyright
|
|
Packit Service |
99d1c0 |
* notice, this list of conditions and the following disclaimer in
|
|
Packit Service |
99d1c0 |
* the documentation and/or other materials provided with the
|
|
Packit Service |
99d1c0 |
* distribution.
|
|
Packit Service |
99d1c0 |
*
|
|
Packit Service |
99d1c0 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
Packit Service |
99d1c0 |
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
Packit Service |
99d1c0 |
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
Packit Service |
99d1c0 |
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
|
Packit Service |
99d1c0 |
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
Packit Service |
99d1c0 |
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
Packit Service |
99d1c0 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
Packit Service |
99d1c0 |
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
Packit Service |
99d1c0 |
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
Packit Service |
99d1c0 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
Packit Service |
99d1c0 |
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit Service |
99d1c0 |
*/
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#ifndef T_TEST_H_
|
|
Packit Service |
99d1c0 |
#define T_TEST_H_
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#include "internal.h"
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#include <sys/wait.h>
|
|
Packit Service |
99d1c0 |
#include <signal.h>
|
|
Packit Service |
99d1c0 |
#include <unistd.h>
|
|
Packit Service |
99d1c0 |
#include <stdio.h>
|
|
Packit Service |
99d1c0 |
#include <stdlib.h>
|
|
Packit Service |
99d1c0 |
#include <string.h>
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#define insist(x) insist_impl(__FILE__, __LINE__, #x, x)
|
|
Packit Service |
99d1c0 |
#define noerror(x) noerror_impl(__FILE__, __LINE__, #x, x)
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
struct event {
|
|
Packit Service |
99d1c0 |
krb5_boolean error;
|
|
Packit Service |
99d1c0 |
union
|
|
Packit Service |
99d1c0 |
{
|
|
Packit Service |
99d1c0 |
krb5_error_code retval;
|
|
Packit Service |
99d1c0 |
krad_code code;
|
|
Packit Service |
99d1c0 |
} result;
|
|
Packit Service |
99d1c0 |
};
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
void
|
|
Packit Service |
99d1c0 |
noerror_impl(const char *file, int line, const char *cmd, int retval);
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
void
|
|
Packit Service |
99d1c0 |
insist_impl(const char *file, int line, const char *cmd, krb5_boolean result);
|
|
Packit Service |
99d1c0 |
|
|
Packit Service |
99d1c0 |
#endif /* T_TEST_H_ */
|