/*
* 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, 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stddef.h>
#include <stdio.h>
#include <config_admin.h>
#include <memory.h>
#include <time.h>
#include "mema_test.h"
/*
* Test for stuck-at fault and transitional faults
* Algorithm:
* for i = 0 to npages
* write(0x55)
* for npages to 0
* read_compare(0x55)
* write(0xaa)
* for 0 to number of pages
* read_compare(0xaa)
* write(0x55)
* read_compare(0x55)
*
* stuck-at fault is detected because each cell have a 1 and a 0 is read
* transitional fault is detected because after each 0 to 1 and 1 to 0
* transition the value is check to be sure that the cell is not frozen.
*/
/*
* The following strings are subject of stderr output and
* gettext() is not used for them.
*/
static const
/*
* Macros do deal with test conditions.
*/
if ((handle->max_errors != 0) &&\
return (MTEST_DONE);\
}
static void
{
}
static void
{
if ((handle->max_errors != 0) &&
return;
else {
(*total_errorsp)++;
}
}
}
int
{
return (MTEST_LIB_ERROR);
}
total_errors = 0;
cond = CFGA_COND_OK;
== -1) {
return (MTEST_DEV_ERROR);
}
(pageno == 0)) {
}
}
== -1) {
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
/*
* Keep going if max errors is 0 or limit not
* reached.
*/
}
}
== -1) {
return (MTEST_DEV_ERROR);
}
(pageno == 0)) {
}
}
/* March 2 (repeated) */
== -1) {
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
}
== -1) {
return (MTEST_DEV_ERROR);
}
== -1) {
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
}
(pageno == 0)) {
}
}
return (MTEST_DONE);
}
/* this test look only for stuck-at fault */
int
{
return (MTEST_LIB_ERROR);
}
total_errors = 0;
cond = CFGA_COND_OK;
== -1) {
return (MTEST_DEV_ERROR);
}
(pageno == 0)) {
}
}
== -1) {
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
/*
* Keep going if max errors is 0 or limit not
* reached.
*/
}
}
== -1) {
return (MTEST_DEV_ERROR);
}
(pageno == 0)) {
}
}
/* March 2 */
== -1) {
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
}
(pageno == 0)) {
}
}
return (MTEST_DONE);
}
/* look for stuck-at, transition, coupling fault: inversion, idempotent */
int
{
long line;
return (MTEST_LIB_ERROR);
}
total_errors = 0;
cond = CFGA_COND_OK;
== -1) {
return (MTEST_DEV_ERROR);
}
(pageno == 0)) {
}
}
/*
* Line tests take 5-9 time longer and the reprting interval
* should be extended 3-5 times.
*/
/* March 1 */
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
/*
* Keep going if max errors is 0 or limit not
* reached.
*/
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
return (MTEST_DEV_ERROR);
}
} /* line */
}
}
}
(pageno == 0)) {
}
} /* page */
/* March 2 */
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
/*
* Keep going if max errors is 0 or limit not
* reached.
*/
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
}
total_errors++;
}
(pageno == 0)) {
}
} /* page */
/* March 3 */
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
}
}
(pageno == 0)) {
}
} /* page */
/* March 4 */
return (MTEST_DEV_ERROR);
}
cond != CFGA_COND_FAILED)
else
total_errors++;
}
return (MTEST_DEV_ERROR);
}
return (MTEST_DEV_ERROR);
}
}
}
(pageno == 0)) {
}
} /* page */
return (MTEST_DONE);
}