rsp_regr_vu_misc.c
2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <sys/types.h>
#include <sys/sbd.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/sema.h>
#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 test_1();
int test_2();
int test_3();
int test_bugfix_3_1();
int test_intr();
int test_pc();
int test_sem_1();
/*
* An array of tests, each of which corresponds to a separate menu
* item callable from the master ide menu.
*/
static TEST_REF TestRefs[] = {
{"test_1", RSP_TEST_BASE+0, test_1},
{"test_2", RSP_TEST_BASE+1, test_2},
{"test_3", RSP_TEST_BASE+2, test_3},
{"test_bugfix_3_1", RSP_TEST_BASE+3, test_bugfix_3_1},
{"test_intr", RSP_TEST_BASE+4, test_intr},
{"test_pc", RSP_TEST_BASE+5, test_pc},
{"test_sem_1", RSP_TEST_BASE+6, test_sem_1},
{"",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_misc(void) {rsp_regr(TestRefs);}
/*
* Tests
*/
int test_1() {return generic_rsp_regression("tests/test_1");}
int test_2() {return generic_rsp_regression("tests/test_2");}
int test_3() {return generic_rsp_regression("tests/test_3");}
int test_bugfix_3_1() {return generic_rsp_regression("tests/test_bugfix_3_1");}
int test_intr() {return generic_rsp_regression("tests/test_intr");}
int test_pc() {return generic_rsp_regression("tests/test_pc");}
int test_sem_1() {return generic_rsp_regression("tests/test_sem_1");}