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