rsp_regr_vu_mud.c 4.26 KB
#include <sys/types.h>
#ifdef __sgi__
#include <sys/sbd.h>
#endif
#include <sys/stat.h>
#include <sys/mman.h>
#ifdef __sgi__
#include <sys/sema.h>
#endif
#include <netinet/in.h>

#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <getopt.h>

#include <rcp.h>
#include <rsp.h>

/* From $ROOT/usr/include/ide, which is installed from PR/diags/include */
#include "diag.h"
#include "dbg_comm.h"

#define RSP_TEST_BASE	001

static int NumFailures = 0;

/* From rsp_regr_common.c: */
extern int generic_rsp_regression (const char *file_name);
extern void imem_init(FILE *file_p);
extern int rsp_regrInit();
extern int rsp_regrDo(TEST_REF *test_ref);
extern int rsp_regr(TEST_REF TestRefs[]);

int vmudh1_h();
int vmudh1_q();
int vmudh1_v();
int vmudh1_w();
int vmudh_h();
int vmudh_q();
int vmudh_v();
int vmudh_v1();
int vmudh_w();
int vmudl_h();
int vmudl_q();
int vmudl_v();
int vmudl_v1();
int vmudl_w();
int vmudm_h();
int vmudm_q();
int vmudm_v();
int vmudm_v1();
int vmudm_w();
int vmudn_h();
int vmudn_q();
int vmudn_v();
int vmudn_v1();
int vmudn_w();

/*
 * An array of tests, each of which corresponds to a separate menu
 * item callable from the master ide menu.
 */
static TEST_REF TestRefs[] = {
  {"vmudh1_h", 			RSP_TEST_BASE+0, vmudh1_h},
  {"vmudh1_q", 			RSP_TEST_BASE+1, vmudh1_q},
  {"vmudh1_v", 			RSP_TEST_BASE+2, vmudh1_v},
  {"vmudh1_w", 			RSP_TEST_BASE+3, vmudh1_w},
  {"vmudh_h", 			RSP_TEST_BASE+4, vmudh_h},
  {"vmudh_q", 			RSP_TEST_BASE+5, vmudh_q},
  {"vmudh_v", 			RSP_TEST_BASE+6, vmudh_v},
  {"vmudh_v1", 			RSP_TEST_BASE+7, vmudh_v1},
  {"vmudh_w", 			RSP_TEST_BASE+8, vmudh_w},
  {"vmudl_h", 			RSP_TEST_BASE+9, vmudl_h},
  {"vmudl_q", 			RSP_TEST_BASE+10, vmudl_q},
  {"vmudl_v", 			RSP_TEST_BASE+11, vmudl_v},
  {"vmudl_v1", 			RSP_TEST_BASE+12, vmudl_v1},
  {"vmudl_w", 			RSP_TEST_BASE+13, vmudl_w},
  {"vmudm_h", 			RSP_TEST_BASE+14, vmudm_h},
  {"vmudm_q", 			RSP_TEST_BASE+15, vmudm_q},
  {"vmudm_v", 			RSP_TEST_BASE+16, vmudm_v},
  {"vmudm_v1", 			RSP_TEST_BASE+17, vmudm_v1},
  {"vmudm_w", 			RSP_TEST_BASE+18, vmudm_w},
  {"vmudn_h", 			RSP_TEST_BASE+19, vmudn_h},
  {"vmudn_q", 			RSP_TEST_BASE+20, vmudn_q},
  {"vmudn_v", 			RSP_TEST_BASE+21, vmudn_v},
  {"vmudn_v1", 			RSP_TEST_BASE+22, vmudn_v1},
  {"vmudn_w", 			RSP_TEST_BASE+23, vmudn_w},
    {"",0,0}
};

static int failed_tests[512];

/*
 * diagnostic entry point:
 *
 * Each separately invokable ide diagnostic command corresponds to an
 * independent ".c" module; the entry point herein must match
 * the test name as specified in the rspcmd.awk script.  These command
 * names correspond to the names you see from the ide menu.  For this
 * module, there will be an ide command "rsp_regr".
 */

int rsp_regr_vu_mud(void) {rsp_regr(TestRefs);}

/*
 * Tests
 */

int vmudh1_h() {return generic_rsp_regression("tests/vmudh1_h");}
int vmudh1_q() {return generic_rsp_regression("tests/vmudh1_q");}
int vmudh1_v() {return generic_rsp_regression("tests/vmudh1_v");}
int vmudh1_w() {return generic_rsp_regression("tests/vmudh1_w");}
int vmudh_h() {return generic_rsp_regression("tests/vmudh_h");}
int vmudh_q() {return generic_rsp_regression("tests/vmudh_q");}
int vmudh_v() {return generic_rsp_regression("tests/vmudh_v");}
int vmudh_v1() {return generic_rsp_regression("tests/vmudh_v1");}
int vmudh_w() {return generic_rsp_regression("tests/vmudh_w");}
int vmudl_h() {return generic_rsp_regression("tests/vmudl_h");}
int vmudl_q() {return generic_rsp_regression("tests/vmudl_q");}
int vmudl_v() {return generic_rsp_regression("tests/vmudl_v");}
int vmudl_v1() {return generic_rsp_regression("tests/vmudl_v1");}
int vmudl_w() {return generic_rsp_regression("tests/vmudl_w");}
int vmudm_h() {return generic_rsp_regression("tests/vmudm_h");}
int vmudm_q() {return generic_rsp_regression("tests/vmudm_q");}
int vmudm_v() {return generic_rsp_regression("tests/vmudm_v");}
int vmudm_v1() {return generic_rsp_regression("tests/vmudm_v1");}
int vmudm_w() {return generic_rsp_regression("tests/vmudm_w");}
int vmudn_h() {return generic_rsp_regression("tests/vmudn_h");}
int vmudn_q() {return generic_rsp_regression("tests/vmudn_q");}
int vmudn_v() {return generic_rsp_regression("tests/vmudn_v");}
int vmudn_v1() {return generic_rsp_regression("tests/vmudn_v1");}
int vmudn_w() {return generic_rsp_regression("tests/vmudn_w");}