top - download
⟦2c8d0fc4e⟧ Wang Wps File
Length: 19100 (0x4a9c)
Types: Wang Wps File
Notes: CPS/USM/006
Names: »4473A «
Derivation
└─⟦e9ca1be93⟧ Bits:30006183 8" Wang WCS floppy, CR 0382A
└─ ⟦this⟧ »4473A «
WangText
:…09…:…0b…:…01…9…08…9…09…9…0e……86…1
…02…
…02… …02…
…02…CPS/USM/006
…02…OKH/840111…02……02…#
TEST COMMAND
LANGUAGE
USERS
GUIDE
…02……02…CAMPS
1 TEST COMMAND LANGUAGE ..........................
5
2 LANGUAGE DESCRIPTION ...........................
8
2.1 LOGICAL REGISTERS ..........................
8
2.2 NOTATIONS ..................................
9
2.2.1 Register ...............................
9
2.2.2 Variable ...............................
9
2.2.3 Value ..................................
10
2.2.4 Text ...................................
10
2.3 COMMANDS ...................................
11
2.3.1 SET Command ............................
11
2.3.2 Dump Command ...........................
12
2.3.3 Verify Command .........................
13
2.3.4 Continue Command .......................
14
2.3.5 TEXT Command ...........................
14
2.4 COMMAND SEQUENCE ...........................
14
2.5 COMMAND FILE ...............................
15
3 ENVIRONMENT ....................................
16
3.1 TCI OUTPUT FORMAT ..........................
16
4 EXAMPLE ........................................
17
4.1 TEST CALL SEQUENCE .........................
18
4.2 TEST COMMANDS ..............................
21
4.3 TEST LOG ...................................
25
The following is a description of use of the Test Command
Language used for testing of CAMPS Modules.
References:
(1) OKH 820310
Proposal for Software Test Procedures.
(2) OKH 820323
Proposal for a Test Command Language.
There are some minor changes in the conventions described
in (2).
1̲ ̲ ̲T̲E̲S̲T̲ ̲C̲O̲M̲M̲A̲N̲D̲ ̲L̲A̲N̲G̲U̲A̲G̲E̲
A Test Call Sequence for a module consists of a series
of calls of the module. This series of calls shall
vary the input data to the module "in all possible
ways", and it shall cause output data to be dumped
to a Test Result File for subsequent verification.
Each call of the module is called a test case, and
the Test Call Sequence must then do the following for
each test case:
- Initialize registers and global variables properly
before the call of the module.
- Dump appropriate registers and global variables
to the Test Result File after the call of the module.
The Test Call Sequence has then the following structure:
- Initialize input data for first module call.
- Module Call
- Dump data after call
- Initialize input data for second module call
- Module Call
- Dump data after call
.
.
.
The Test Call Sequence is a "normal program", and Module
Calls are "normal calls" of the module in the appropriate
programming language.
Figure 1 shows the test setup.
The Test Call Sequence simulates superior modules calling
the Module under Test.
Simulated Environment and Real Environment each consists
of a mix of System Software Modules and lower level
modules.
The Test Command File is a set of test commands written
in a Test Command Language, which is particularly suited
to initialize input data and dump output data for the
Module Under Test.
The Test Result File consists of a copy of the executed
Test Commands and the resulting output data. This file
is the test documentation, and the results are used
to verify the proper function of the Module Under Test.
The Test Command Interpreter is called by Test Call
Sequence and Simulated Environment. It reads and executes
Test Commands and outputs Test Results.
The following abbreviations are used in the following:
TCI: Test Command Interpreter
TCL: Test Command Language
The Test Command File and the Test Result File must
have the fixed names:
TCI ̲COMMANDS Test Command File
TCI ̲LOG Test Result File
The Test Command Interpreter is invoked from Test Call
Sequence or Simulated Environment by calling the following
procedure which must be imported by Test Call Sequence.
E̲x̲p̲o̲r̲t̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲E̲A̲D̲ ̲C̲O̲M̲M̲A̲N̲D̲S̲
(SEQUENCE: INTEGER; "Pointer to sequence name terminated
by a binary zero.
R6); " C - LINK
This procedure is the entry point in TCI from test
call sequence or simulated procedures. It stores registers
in REGID..71. Then it reads commands from specified
sequence until a continue command is met. Then it restores
registers and returns and returns.
At first call the TCI variables are initialized and
files are opened.
FIGURE 1, Module Test Environment
2̲ ̲ ̲L̲A̲N̲G̲U̲A̲G̲E̲ ̲D̲E̲S̲C̲R̲I̲P̲T̲I̲O̲N̲
The language operates upon registers R0-R7 and on variables
in memory.
There are 3 main functions in the language:
a) S̲e̲t̲
This function inserts values into registers or
variables. It also includes the possibility of
moving data from/to variables/registers and to
add constants to variables/registers.
b) D̲u̲m̲p̲
This function dumps values of registers or variables
to the Test Result File.
c) V̲e̲r̲i̲f̲y̲
This function checks that specified registers or
variables have specified values. It includes the
possibility of comparing variables or registers.
2.1 L̲O̲G̲I̲C̲A̲L̲ ̲R̲E̲G̲I̲S̲T̲E̲R̲S̲
A major requirement is that data, which are external
to the Module Under Test, must be addressable by test
commands without having to use absolute addresses.
This requirement is accomplished by introducing a set
of logical registers.
Logical registers are elements of the register array:
EXPORT VAR REG: ARRAY(0..MAX ̲REG)
OF INTEGER
This array must be defined in the Test Call Sequence
main module and is imported into the Test Command Interpreter.
REG(0)-REG(7) are copies of the CPU Registers
R0-R7.
REG(8)-REG(MAX ̲REG) can be used for various operations
in the Test Command Language.
The most important use is as
static pointers to variables
which are external to the Module
Under Test.
If for example R̲8̲ ̲i̲s̲ ̲u̲s̲e̲d̲ ̲a̲s̲ ̲a̲ ̲p̲o̲i̲n̲t̲e̲r̲ ̲t̲o̲ ̲t̲h̲e̲ ̲g̲l̲o̲b̲a̲l̲
variable ACTIVE, the following variable initialization
must take place in the Test Call Sequence:
INIT REG(8) = ADDRESS(ACTIVE)
Rn is used in TCL to denote REG(n).
2.2 N̲O̲T̲A̲T̲I̲O̲N̲S̲
(offset)::= (hex)
(logical address)::= (hex)
(count)::= (hex)
(number)::= (hex)
2.2.1 R̲e̲g̲i̲s̲t̲e̲r̲
(register)::= R(number)
A register denotes an element of the register array.
R0-R7 denote the CPU General Purpose Registers.
(number) is the index of the element in the array.
Note that TCI d̲o̲e̲s̲ ̲n̲o̲t̲ perform any index check.
2.2.2 V̲a̲r̲i̲a̲b̲l̲e̲
(variable)::= (register)/
(register).(offset)/
(logical address).(offset)
A variable is a word in memory. It can either be a
register or it can be specified by a pointer and an
offset. The pointer may be a register or an absolute
logical address.
Examples:
R0 CPU register zero
R9 Register 9
R5.0 The word referenced by R5
AF1.3 The word with logical address AF4
2.2.3 V̲a̲l̲u̲e̲
(simple value)::= (register)/
(register).(offset)/
(logical address).(offset)/
(number)
(value)::= (simple value)/
(value)+(number)
(values)::= (value)/
(values)(spaces)(value)
A simple value is either the contents of a variable
or a hexadecimal number.
A value is a simple value, possibly modified by adding
one or more hexadecimal numbers.
A value series is a sequence of values separated by
spaces.
Examples:
R3+4 Contents of register three plus 4.
R3.4 Contents of memory word referenced by R3,
offset 4.
R3.4+1 The previous value plus one.
AF1.3 Contents of the word with logical address
AF4.
2.2.4 T̲e̲x̲t̲
A text is a sequence of characters enclosed in "s.
A text must not extend over more than one command line.
Note that insertion of non-graphic characters in a
text is n̲o̲t̲ supported.
2.3 C̲O̲M̲M̲A̲N̲D̲S̲
The Test Command Interpreter recognizes 5 different
commands:
(command)::= (Set command)/
(dump command)/
(verify command)/
(text command)/
(continue command)
They are specified in the following sections:
Each command is written on a single line.
A comment is indicated by the character ";". Then the
rest of the line is ignored by Test Command Interpreter.
Note that when a ";" follows a command, at least one
space must separate the command from ";".
Empty lines or lines containing only comments are allowed.
Note that the space character is used as delimiter
between elements of a command. Spaces must not occur
within variables or values.
Note also that only the first character of a command
identifier is significant.
2.3.1 S̲E̲T̲ ̲C̲o̲m̲m̲a̲n̲d̲
The SET Command assigns values to specified variables
or moves data from one location to another.
(set command)::= (set values)/
(move words)
(set values)::=
SET(spaces)(variable)(spaces)(values)
The specified values are inserted in consecutive memory
words, starting at specified variable.
(move words)::=
SET.(count)(spaces)(variable)(spaces)(variable)
A number of memory words specified by (count) are moved
from s̲e̲c̲o̲n̲d̲ variable to f̲i̲r̲s̲t̲ variable.
Note that the number of values or the count must not
exceed #80.
Eks.1 SET R9 A5
Assigns the value A5 to register 9.
Eks.2 SET R9.1 5 6 7
The three consecutive words referenced by R9
with offset one are assigned the values 5,
6 and 7
Eks.3 SET R1 R2+1
The value of register 2, incremented by one,
is assigned to register 1. Register 2 remains
unchanged.
Eks.4 SET A33.0 1
The word at logical address A33 is assigned
the value 1.
Eks.5 SET.5 R1 A33.0
The five words in locations A33-A37 are moved
to registers R1-R5.
2.3.2 D̲u̲m̲p̲ ̲C̲o̲m̲m̲a̲n̲d̲
DUMP.(count)(spaces)(variable)
Dumps the values of a consecutive set of variables
to the Result File.
Eks.1 DUMP.8 R0
Dumps the eight registers R0-R7
Eks.2 DUMP.1 R5.8
Dumps the memory word referenced by register
5 with offset 8.
Note that count must not exceed #80.
2.3.3 V̲e̲r̲i̲f̲y̲ ̲C̲o̲m̲m̲a̲n̲d̲
Dumps the values of a consecutive set of variables
to the Result File and checks that they have the specified
values. Those values which are not equal are flagged
with asterisks.
The command has two forms corresponding to those of
the SET Command.
(verify command)::= (verify values)/
(verify words)
(verify values)::=
VERIFY(spaces)(variable)(spaces)(values)
A number of words, starting at specified variable are
dumped. The number is the number of values. Each word
is compared with the corresponding value, and the dumped
word is preceeded by an asterisk if it is not equal
to the values.
(verify words)::=
VERIFY.(count)(spaces)(variable)(spaces)(variable)
Count words starting at first specified variable are
dumped. Each word is compared with the corresponding
word from second variable, and the dumped word is preceeded
with an asterisk if it is not equal to the value.
Eks.1 VERIFY R2 A6 0
Checks that R2 and R3 have the specified values.
Eks.2 VERIFY R5.1 R3+2
Checks that the memory word referenced by register
5, offset 1, differs by 2 from register 3.
Eks.3 VERIFY.1E R5.8 R3.20
Checks that 1E words referenced by R5 with
offset 8 are equal to the corresponding words
referenced by R3, offset 20.
Note that the number of values or count must not exceed
#80.
2.3.4 C̲o̲n̲t̲i̲n̲u̲e̲ ̲C̲o̲m̲m̲a̲n̲d̲
CONTINUE
Returns from the Test Command Interpreter to the calling
program. The CPU registers R0-R7 are loaded from Register
Array prior to the return.
2.3.5 T̲E̲X̲T̲ ̲C̲o̲m̲m̲a̲n̲d̲
The TEXT Command inserts a text into a specified variable
and the following memory locations. It is similar to
the first version of SET, refer 2.3.1, except that
the argument is a text string.
(text command)::=
TEXT(spaces)(variable)(spaces)(text)
Eks.1 TEXT R9 "ABCD"
Inserts the text string ABCD into R9 and R10.
Eks.2 TEXT R9.1 "ABCD"
Inserts the text string ABCD into the two words
referenced by R9, offset 1.
2.4 C̲O̲M̲M̲A̲N̲D̲ ̲S̲E̲Q̲U̲E̲N̲C̲E̲
(commands)::= (command)/
(commands)(nl)(command)
(name)::= (text)
(command sequence)::=
BEGIN (name)
(commands)
END (name)
A Command Sequence is a series of commands, separated
by new line characters. The beginning and termination
of a sequence are indicated by BEGIN and END respectively.
A Command Sequence is identified by a name, which is
a string of alphanumeric characters enclosed by "s.
The name is used in the program calling the Test Command
Interpreter to identify a Specific Command Sequence
in a Test Command File.
Eks.1 BEGIN"MAIN"
;Test Commands for MODULE XX
;Author: NN etc.
SET R= 5
CONTINUE; First call
DUMP.5 R0 ; Dump R0-R4
VERIFY R5.0 3
SET R0 1
CONTINUE ; Second Call
DUMP.5 R0
VERIFY R5.0 8
END "MAIN"
2.5 C̲O̲M̲M̲A̲N̲D̲ ̲F̲I̲L̲E̲
(command file)::= (command sequence)/
(command file)(nl)
(command sequence)
A Command File is a set of Command Sequences. The names
of the sequences must be different.
Each call of Test Command Interpreter from a program
must specify a Command Sequence by name. Each of the
sequences are processed sequentially by the Test Command
Interpreter.
3̲ ̲ ̲E̲N̲V̲I̲R̲O̲N̲M̲E̲N̲T̲S̲
TCI makes use of the UTILITYHELP module and can only
run under the Debugger.
The TCI link module is found in the file:
**GENS.D*tci.D*TCI.L
Refer to section 4 for an example of link of TCI.
TCI requires two files in C̲u̲r̲r̲e̲n̲t̲ ̲D̲i̲r̲e̲c̲t̲o̲r̲y̲:
TCI ̲COMMANDS which is the Command File, refer 2.5
TCI ̲LOG where output from TCI will be written.
Refer 3.1
The Main Module containing the Test Call Sequence must
declare and initialize the Register Array, refer 4.1
a)-b).
TCI has two fields open, and requires a stream for
each. Sufficient IO ressources must be declared in
Link Commands, refer section 4..
3.1 T̲C̲I̲ ̲O̲U̲T̲P̲U̲T̲ ̲F̲O̲R̲M̲A̲T̲
Each call of TCI (in Read ̲Commands, refer section 1)
will produce a header on the TCI ̲LOG file.
The header will contain the sequence name and an entry
number. The entry number is the number of times this
sequence has been entered.
Within each sequence a time count is maintained. The
commands read from TCI ̲COMMANDS are copied to TCI ̲LOG
preceeded by the line count.
Data which are dumped in DUMP or VERIFY commands are
preceeded by the absolute address of the first dumped
word.
If a syntax error occurs in a command, an error message
is output on current output, and the program is terminated.
The command in error is only partially output on TCI
̲LOG, and the error occurred at the last character output.
4̲ ̲ ̲E̲X̲A̲M̲P̲L̲E̲
This section shows an example of a run with TCI.
It consists of components:
a) Test Call Sequence
b) File TCI ̲COMMANDS containing three command sequences
c) A result file TCI ̲LOG containing the output from
the test run.
The process was linked by the following link commands:
MAIN: TCI ̲TEST.L
SUB: xxGENS.DxTCI.DxTCI.L
SUB: xxGENS.DxUTILITY HELP.DxUTH.L
SUB: xxGENS.DxDEBUG.DxDEBUG.L
SUB: xxDAMOS.DxKERNEL.DxGENS.DxPPP ̲VAR.L
P: LINKLIST
D: TCI
FDS: 10
10CBS: 40
STREAMS: 10
TLES: 80
MESSAGES: 40
4.1 T̲E̲S̲T̲ ̲C̲A̲L̲L̲ ̲S̲E̲Q̲U̲E̲N̲C̲E̲
The following Main Module shows an example of a Test
Call Sequence.
Note the following details:
a) R̲e̲g̲i̲s̲t̲e̲r̲ ̲A̲r̲r̲a̲y̲ ̲D̲e̲c̲l̲a̲r̲a̲t̲i̲o̲n̲
The Register Array is declared as an EXPORT VAR,
named REG. It is imported by TCI and manipulated
upon by the Test Commands.
b) R̲e̲g̲i̲s̲t̲e̲r̲s̲ ̲a̲s̲ ̲P̲o̲i̲n̲t̲e̲r̲s̲
Two registers (R9 and R1E) are initialized with
addresses of two arrays V1 and V2 respectively.
Thereby the Test Commands may manipulate upon V1
and V2 via the registers.
c) I̲m̲p̲o̲r̲t̲ ̲o̲f̲ ̲R̲e̲a̲d̲ ̲C̲o̲m̲m̲a̲n̲d̲s̲
The entry point in TCI is the procedure Read ̲ Commands,
which must be imported by the module containing
the Test Call Sequence. Refer section 1.
d) T̲e̲s̲t̲ ̲C̲a̲l̲l̲ ̲S̲e̲q̲u̲e̲n̲c̲e̲
Having initialized the Debugger, the program issues
a series of calls to TCI. In the normal case each
call would be followed by a call of the module
under test.
The first parameter in Read Commands is the address
of a sequence name.
The program ends up with an infinite loop of TCI
calls. The process will terminate when an "end
of file" or "end of sequence" condition occurs.…86…1
…02… …02… …02… …02…
edb udskrift…86…1 …02… …02… …02… …02…
edb udskrift …86…1 …02… …02… …02… …02…
4.2 T̲E̲S̲T̲ ̲C̲O̲M̲M̲A̲N̲D̲S̲
The following set of Test Commands have been used together
with the Test Call Sequence in the previous section
for the test of TCI itself.
The test includes use of the following absolute addresses:
a) Address of array V1: 23
b) Address of array V2: 44
c) Address of register array: 65
The test run terminates with an "end of sequence" message
when the END "SEQ3" is met.
The CPU time used for the test was about 240 SECONDS
! This is due to the slow down of instruction execution
by a factor 500 when using the Debugger.
edb udskrift
edb udskrift
edb udskrift
4.3 T̲E̲S̲T̲ ̲L̲O̲G̲
The following output was produced in the file TCI ̲LOG
when the Test Call Sequence was applied to the Test
Commands.
Note that another Test Call Sequence would have resulted
in another output even when applied to the same TCI
̲COMMANDS.
edb udskrift
edb udskrift
edb udskrift
edb udskrift
edb udskrift