/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1996-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _MEMA_TEST_H
#define _MEMA_TEST_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct mtest_alloc_ent {
void *buf;
};
struct mtest_handle {
int fd;
void *drvhandle;
};
struct mtest_table_ent {
const char *test_name;
};
extern struct mtest_table_ent mtest_table[];
#define MTEST_DEFAULT_TEST (0)
extern char **mtest_build_opts(int *maxerr_idx);
struct mtest_error {
int error_type;
};
/*
* Error types.
*/
#define MTEST_ERR_NONE 0
/*
* Test routine return codes.
*/
#define MTEST_DONE 0
/*
* Each test is allowed maximum number of errors and the index has
* to be coordinated with the token table size in mema_test_config.c
*/
/*
* Test functions should use this buffer allocation interface.
* The test framework will deallocate them on return.
*/
extern void mtest_deallocate_buf(mtest_handle_t, void *);
extern void mtest_deallocate_buf_all(mtest_handle_t);
/*
* Test write: mtest_write(handle, buffer, page_num, line_offset, line_count)
* A line count of 0 indicates the whole page.
* A return of 0 indicates success. A return of -1 indicates a failure of
* the device interface.
*/
struct mtest_error *);
/*
* Message interface. If the upper layer has verbose on, the
* message will be seen by the user.
*/
extern void mtest_message(mtest_handle_t, const char *);
#ifdef __cplusplus
}
#endif
#endif /* _MEMA_TEST_H */