Skip to content

Commit

Permalink
Move test cases from build procedure into the groovy test framework (z…
Browse files Browse the repository at this point in the history
…390development#551)

* Add TESTDFP1 and TESTDFP2 to RunAsmTests.groovy script

* remove tests from bat\BLDLIB.BAT and add reference files

* update TESTFPC1.TF1 to correct version

* Move TESTFPC1 and TESTFPC2 from linklib to tests directory

* Convert WTOs in TESTFPC1 and 2 to write to file output

* Fix remaining references to TESTDFP1 and TESTDFP2

* re-enable disabled groovy script

* Change OPTB# to use extreme LRECL for reading the z390 .prn listing because it contains a line with all options and paths

* Undoing changes for optable tests - these belong in a different branch

* Fix various oversights

* Modify macro RT1 to route output either to file, or to log

* remove superfluous statement from groovy test script

* Modify mac\RT1 macro to allow test programs to request a user abendwith non-default abend code

* For mac\RT1 improve quality of comments

* More documentation improvements

* Make abend logic in mac\RT1.MAC more flexible
  • Loading branch information
abekornelis authored Aug 21, 2024
1 parent 80bf7b4 commit 4fb537e
Show file tree
Hide file tree
Showing 10 changed files with 557 additions and 38 deletions.
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,6 @@ linklib/RTGENDIR
linklib/rtlink
linklib/SQXTR
linklib/SUPERZAP
linklib/TESTFPC1
linklib/TESTFPC2
linklib/UNREF
linklib/ZSTRMAC
rt/RTGENCMP
Expand Down Expand Up @@ -352,8 +350,6 @@ rt/all/TESTEXT1
rt/all/TESTEXT2
rt/all/TESTFP1
rt/all/TESTFP2
rt/all/TESTFPC1
rt/all/TESTFPC2
rt/all/TESTINS1
rt/all/TESTINS2
rt/all/TESTINS3
Expand Down Expand Up @@ -419,8 +415,6 @@ rt/linklib/dif/RTLINK
rt/linklib/dif/SORT
rt/linklib/dif/SQXTR
rt/linklib/dif/SUPERZAP
rt/linklib/dif/TESTFPC1
rt/linklib/dif/TESTFPC2
rt/linklib/dif/UNREF
rt/linklib/dif/ZSTRMAC
rt/linklib/save/CVTTOHEX
Expand All @@ -434,8 +428,7 @@ rt/linklib/save/RTGENDIR
rt/linklib/save/rtlink
rt/linklib/save/SQXTR
rt/linklib/save/SUPERZAP
rt/linklib/save/TESTFPC2
rt/linklib/save/UNREF
\rt/linklib/save/UNREF
rt/linklib/save/ZSTRMAC
rt/test/TESTACT1
rt/test/TESTAIN1
Expand Down
2 changes: 0 additions & 2 deletions bash/bldlib
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ bash/asm linklib/SQXTR bal notiming stats
bash/asm linklib/DAT bal notiming stats

bash/asmlg linklib/IEFBR14 "sysobj(+linklib)"
bash/asmlg linklib/TESTFPC1 "sysobj(+linklib)"
bash/asmlg linklib/TESTFPC2 "sysobj(+linklib)"

bash/asm linklib/RTGENDIR noasm bal notiming stats "sysparm(RTGENDIR)"
bash/asm linklib/RTGENCMP noasm bal notiming stats "sysparm(RTGENCMP)"
6 changes: 2 additions & 4 deletions bat/BLDLIB.BAT
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ call bat\asm %z_TraceMode% linklib\CVTTOHEX bal notiming stats || goto e
call bat\asm %z_TraceMode% linklib\SQXTR bal notiming stats || goto error
call bat\asm %z_TraceMode% linklib\DAT bal notiming stats || goto error
call bat\asmlg %z_TraceMode% linklib\IEFBR14 sysobj(+linklib) || goto error
call bat\asmlg %z_TraceMode% linklib\TESTFPC1 sysobj(+linklib) || goto error
call bat\asmlg %z_TraceMode% linklib\TESTFPC2 sysobj(+linklib) || goto error

call bat\asm %z_TraceMode% linklib\RTGENDIR noasm bal notiming stats sysparm(RTGENDIR) || goto error
call bat\asm %z_TraceMode% linklib\RTGENCMP noasm bal notiming stats sysparm(RTGENCMP) || goto error
rem call bat\asm %z_TraceMode% linklib\RTGENDIR noasm bal notiming stats sysparm(RTGENDIR) || goto error
rem call bat\asm %z_TraceMode% linklib\RTGENCMP noasm bal notiming stats sysparm(RTGENCMP) || goto error
set z_ReturnCode=0
goto return

Expand Down
83 changes: 76 additions & 7 deletions mac/RT1.MAC
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
.* 09/22/06 ADD CCLE AND CCGE OPTIONS FOR USE IN TESTTIM2 TESTS
.* 03/05/08 ADD RT1 OK - INC COUNT BY 1
.* 04/19/08 RPI 833 add SETC quotes for HLASM compatibility
.* 08/17/24 #540 Add parameter to select either WTO or file output
.* Add option to request a user abend nnnn or (reg)
.*********************************************************************
&NAME RT1 &CMD,&CLC1,&CLC2,&LL
&NAME RT1 &CMD,&CLC1,&CLC2,&LL,&TYPE=WTO,&ABEND=101 #540
.*
.* REGRESSION TEST V1 COMMAND MACROS
.*
.* 1. RT1 MAIN - START PGM AND DISPLAY STARTUP WTO
.* &TYPE=FILE selects output to file #540
.* 2, RT1 START - START OF RT1 TEST MACROS FOLLOWING DATA
.* 3. RT1 CCE - TEST FOR PSW CC EQUAL (OPTIONAL CLC PARMS)
.* 4. RT1 CCL - TEST FOR PSW CC LOW (OPTIONAL CLC PARMS)
Expand All @@ -39,17 +42,21 @@
.* 7. RT1 CCLE - TEST FOR PSW CC HIGH (OPTIONAL CLC PARMS) RPI 461
.* 8. RT1 CC? - TEST FOR PSW CC = CC0-CC3
.* 9. RT1 OK - INC TEST COUNT BY 1
.* 9. RT1 ABORT - ABORT WITH TOTAL TESTS TO FAILURE AND USER 101 DUMP
.*10. RT1 END - DISPLAY TOTAL TESTS AND ENDED OK WTO
.*10. RT1 ABORT - ABORT WITH TOTAL TESTS TO FAILURE AND USER 101 DUMP #540
.*11. RT1 END - DISPLAY TOTAL TESTS AND ENDED OK WTO #540
.*12 RT1 ABEND - Abend with specified abend code #540
.* &ABEND=nnnn specifies desired user abend code #540
.*
GBLA &RT1_TOT
GBLC &RT1NAME
GBLC &RT1TYPE WTO / FILE #540
AIF ('&CMD' EQ 'MAIN').RT1MAIN
AIF ('&CMD' EQ 'START').RT1START
AIF ('&CMD' EQ 'END').RT1END
&NAME DS 0H
&RT1_TOT SETA &RT1_TOT+1
AIF ('&CMD' EQ 'OK').RT1OK
AIF ('&CMD' EQ 'ABEND').RT1ABEND #540
AIF ('&CMD' EQ 'ABORT').RT1ABORT
AIF ('&CLC1' EQ '').NOCLC
AIF ('&LL' EQ '').NOCLCLL
Expand All @@ -71,32 +78,78 @@
AIF ('&CMD' EQ 'CC3').RT1CC3
MNOTE 8,'RT1 INVALID COMMAND - &CMD'
MEXIT
.* #540
.RT1MAIN ANOP
AIF ('&TYPE' EQ 'WTO').TYPE_OK #540
AIF ('&TYPE' EQ 'FILE').TYPE_OK #540
MNOTE 8,'RT1 MAIN,TYPE=&TYPE - Invalid value for Type: should * #540
be WTO or FILE' #540
MEXIT , #540
.TYPE_OK ANOP , #540
&RT1TYPE SETC '&TYPE' Save for subsequent invocations #540
.* #540
.* Define inner macro to route output to either WTO or file #540
MACRO , #540
RT1SAY &MSG #540
GBLC &RT1TYPE WTO / FILE #540
.* #540
AIF ('&RT1TYPE' EQ 'FILE').DO_FILE #540
AIF ('&RT1TYPE' EQ 'WTO').DO_WTO #540
MNOTE 8,'RT1 - internal logic error - TYPE=&RT1TYPE is not sup* #540
ported' #540
MEXIT , #540
.DO_FILE ANOP , #540
PUT RT1OUT,&MSG Write message to file #540
MEXIT , #540
.DO_WTO ANOP , #540
WTO MF=(E,&MSG) Write message to log #540
MEND , #540
.* #540
&RT1NAME SETC '&NAME'
&RT1NAME SUBENTRY
WTO '&RT1NAME RT1 STARTED'
AIF ('&RT1TYPE' NE 'FILE').NO_OPEN #540
OPEN (RT1OUT,(OUTPUT)) Open output file #540
.NO_OPEN ANOP , #540
RT1SAY RT1_WTO0 Write start message #540
BRCL 15,RT1_START
.* #540
RT1_ABORT DS 0H
MVI RT1_ABORTED,C'T'
WTO '&RT1NAME RT1 TESTING ABORTED'
RT1SAY RT1_WTO9 Write abort message #540
.* #540
RT1_END DS 0H
MVC RT1_DTOT,=X'402020202020'
ED RT1_DTOT,RT1_TOT
WTO MF=(E,RT1_WTO1)
RT1SAY RT1_WTO1 Write test count #540
CLI RT1_ABORTED,C'T'
BE RT1_DUMP
WTO '&RT1NAME RT1 ENDED OK'
RT1SAY RT1_WTO8 Write ended okay message #540
AIF ('&RT1TYPE' NE 'FILE').NO_CLOS #540
CLOSE (RT1OUT) Close output file #540
.NO_CLOS ANOP , #540
SUBEXIT
RT1_DUMP DS 0H
AIF ('&RT1TYPE' NE 'FILE').NO_CLSE #540
CLOSE (RT1OUT) Close output file #540
.NO_CLSE ANOP , #540
ABEND 101
RT1_LINK EQU 11
RT1_DATA EQU *
RT1_TOT DC PL3'0' TOTAL RT1 TESTS COMPLETED
RT1_ONE DC P'1'
RT1_WTO0 DC AL2(RT1_WTO0_END-*,0),C'&RT1NAME RT1 STARTED' #540
RT1_WTO0_END EQU * #540
RT1_WTO1 DC AL2(RT1_WTO_END-*,0),C'&RT1NAME RT1 TESTS COMPLETED = '
RT1_DTOT DC CL6' ZZZZZ'
RT1_WTO_END EQU *
RT1_WTO8 DC AL2(RT1_WTO8_END-*,0),C'&RT1NAME RT1 ENDED OK' #540
RT1_WTO8_END EQU * #540
RT1_WTO9 DC AL2(RT1_WTO9_END-*,0),C'&RT1NAME RT1 TESTING ABORTED' #540
RT1_WTO9_END EQU * #540
RT1_ABORTED DC C'F'
AIF ('&RT1TYPE' NE 'FILE').NO_DCB #540
RT1OUT DCB DSORG=PS,MACRF=PM,DDNAME=RT1OUT,LRECL=160,RECFM=VT #540
.NO_DCB ANOP , #540
LTORG
RT1_TEST_CC0 DS 0H
BNE RT1_ABORT
Expand Down Expand Up @@ -127,6 +180,7 @@ RT1_TEST_CCLE DS 0H
.RT1START ANOP
RT1_START DS 0H
MEXIT
.* #540
.RT1CCE ANOP
.RT1CC0 ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC0
Expand All @@ -135,6 +189,7 @@ RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC0
LTORG
RT1_CCE&RT1_TOT DS 0H
MEXIT
.* #540
.RT1CCL ANOP
.RT1CC1 ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC1
Expand All @@ -143,6 +198,7 @@ RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC1
LTORG
RT1_CCL&RT1_TOT DS 0H
MEXIT
.* #540
.RT1CCH ANOP
.RT1CC2 ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC2
Expand All @@ -151,37 +207,50 @@ RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC2
LTORG
RT1_CCH&RT1_TOT DS 0H
MEXIT
.* #540
.RT1CC3 ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CC3
USING *,RT1_LINK
B RT1_CC3&RT1_TOT
LTORG
RT1_CC3&RT1_TOT DS 0H
MEXIT
.* #540
.RT1CCLE ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CCLE
USING *,RT1_LINK
B RT1_CCLE&RT1_TOT
LTORG
RT1_CCLE&RT1_TOT DS 0H
MEXIT
.* #540
.RT1CCGE ANOP
RT1_TEST&RT1_TOT BAS RT1_LINK,RT1_TEST_CCGE
USING *,RT1_LINK
B RT1_CCGE&RT1_TOT
LTORG
RT1_CCGE&RT1_TOT DS 0H
MEXIT
.* #540
.RT1OK ANOP
BAS RT1_LINK,RT1_OK
USING *,RT1_LINK
B RT1_OK&RT1_TOT
LTORG
RT1_OK&RT1_TOT DS 0H
MEXIT
.* #540
.RT1ABEND ANOP , #540
AIF ('&RT1TYPE' NE 'FILE').NO_CLS #540
CLOSE (RT1OUT) Close output file #540
.NO_CLS ANOP , #540
ABEND &ABEND #540
MEXIT , #540
.* #540
.RT1ABORT ANOP
B RT1_ABORT
MEXIT
.* #540
.RT1END ANOP
B RT1_END
MEXIT
Expand Down
2 changes: 0 additions & 2 deletions rt/RTLINK1.BAT
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ call rt\RT4 linklib\CVTTOHEX %1 %2 %3 %4 %5 %6 %7 %8 %9
call rt\RT4 linklib\SQXTR %1 %2 %3 %4 %5 %6 %7 %8 %9
call rt\RT4 linklib\DAT %1 %2 %3 %4 %5 %6 %7 %8 %9
call rt\RT1 linklib\IEFBR14 sysobj(linklib) %1 %2 %3 %4 %5 %6 %7 %8 %9
call rt\RT1 linklib\TESTFPC1 sysobj(linklib) %1 %2 %3 %4 %5 %6 %7 %8 %9
call rt\RT1 linklib\TESTFPC2 sysobj(linklib) %1 %2 %3 %4 %5 %6 %7 %8 %9
call zc390bld %1 %2 %3 %4 %5 %6 %7 %8 %9
rem gen zstrmac translator using zstrmac.bat
call zstrmac linklib\zstrmac.zsm linklib\zstrmac.txt notiming stats
Expand Down
16 changes: 9 additions & 7 deletions linklib/TESTFPC1.MLC → tests/TESTFPC1.MLC
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@
* 01/13/08 RPI 786 use fp compares to handle equivalent DFP values
* 03/19/08 RPI 819 clear high 32 bits of gprs to avoid bugs in fpconvrt
* 04/19/08 RPI 833 add SETC quotes for HLASM compatibilitys in fpconvrt
* 08/12/24 #540 BUILD procedure contains tests
* Converting WTO output to file output
*********************************************************************
* Test conversion from and to 128 bit integer and all 6 floating
* point types using default svc 170 and 171 and also using
* LINKAGE=MF call to FPCONVRT contributed by David Bond.
*********************************************************************
COPY ASMMSP
PRINT DATA
TESTFPC1 RT1 MAIN
TESTFPC1 RT1 MAIN,TYPE=FILE DCB name is RT1OUT #540
INT128 DC 0XL16,X'80',15X'00' largest negative 128 bit int
WORK16 DC XL16'00'
WTOMSG DC AL2(WTOEND-*,0)
Expand Down Expand Up @@ -82,12 +84,12 @@ LHT1 DC LH'-567678867789987898'
LA R2,&VAL
LA R3,L'&VAL
CALL CVTTOHEX,((R2),DHEX,(R3))
WTO MF=(E,WTOMSG)
PUT RT1OUT,WTOMSG #540
IF (CP,PRC,NE,=P'0')
MVC DRC,=X'40202020'
ED DRC,PRC+6
WTO MF=(E,WTOPRC)
ABEND 101
PUT RT1OUT,WTOPRC #540
RT1 ABEND,ABEND=102 Close file and abend #540
ENDIF
XC WORK16,WORK16
CFD CFD_&TYPE,OUT=WORK16,IN=DECIMAL,LINKAGE=&LINKAGE
Expand All @@ -96,12 +98,12 @@ LHT1 DC LH'-567678867789987898'
MVC DHEX,=CL32' '
LA R3,L'&VAL
CALL CVTTOHEX,(WORK16,DHEX,(R3))
WTO MF=(E,WTOMSG)
PUT RT1OUT,WTOMSG #540
IF (CP,PRC,NE,=P'0')
MVC DRC,=X'40202020'
ED DRC,PRC+6
WTO MF=(E,WTOPRC)
ABEND 102
PUT RT1OUT,WTOPRC #540
RT1 ABEND,ABEND=103 Close file and abend #540
ENDIF
AP RT1_TOT,=P'1'
* RPI 786 START TEST FOR DFP
Expand Down
Loading

0 comments on commit 4fb537e

Please sign in to comment.