forked from z390development/z390
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Is509 correct errors in z390 implementation of HLASM built-in functio…
…ns (z390development#541) * is509 fixes for HLASM built-in functions * update readme * correct typo in comment * change TOPR2 report file name to TOPR2.TST * change comment HLASM LR to HLASM LangRef * add additional regression tests * remove unused statement and correct typo
- Loading branch information
Showing
26 changed files
with
4,659 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# errora2btests: regression test A2B error | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errora2btests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="A2BE1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 12 ]; then error "$prog" 12 $rc; fi | ||
|
||
prog="A2BE2" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 12 ]; then error "$prog" 12 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# errorisbintests: regression test ISBIN error | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errorisbintests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="ISBINE1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 8 ]; then error "$prog" 8 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# errorisdectests: regression test ISDEC error | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errorisdectests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="ISDECE1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 8 ]; then error "$prog" 8 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# errorishextests: regression test ISHEX error | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errorishextests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="ISHEXE1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 8 ]; then error "$prog" 8 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# errorissymtests: regression test ISSYM error | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errorissymtests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="ISSYME1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 8 ]; then error "$prog" 8 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# errorslatests: regression test SLA errors | ||
|
||
# global variable containing name of script; used by error function | ||
scriptName="errorslatests" | ||
|
||
######################################## | ||
# print error message and exit | ||
# | ||
# input: | ||
# $1 name of program for the error | ||
# $2 program expected return code | ||
# $3 program actual return code | ||
######################################## | ||
|
||
function error { | ||
echo "$scriptName ERROR: $1 expected RC=$2 but actual RC=$3; exiting" | ||
exit 8 | ||
} | ||
|
||
#set -e # exit on all errors; not for this script | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
prog="SLAE1" | ||
bash/asm rt/mlc/$prog | ||
rc=$? | ||
if [ $rc -ne 8 ]; then error "$prog" 8 $rc; fi | ||
|
||
# if we get here, there were no errors | ||
rc=0 | ||
echo "$scriptName exiting with RC=$rc" | ||
exit $rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# runhlasmbiftests: regression test HLASM built-in functions | ||
|
||
set -e # exit on all errors | ||
cd $(dirname $0) # set to directory of script - rt/bash | ||
cd .. # up to rt | ||
cd .. # up to z390 | ||
|
||
sysmac='sysmac(mac)' | ||
optable='optable(z390)' | ||
|
||
dir1="rt/test" | ||
dir2="rt/mlc" | ||
|
||
bash/asmlg ${dir1}/TESTOPR2 trace noloadhigh noinit $sysmac | ||
|
||
export REPORT=${dir2}/TOPR2.TST | ||
bash/asmlg ${dir2}/TOPR2 trace noloadhigh noinit $sysmac | ||
|
||
# if we get here, there were no errors | ||
echo "Verify tests ran without errors" | ||
echo " View ${dir1}/TESTOPR2.PRN to see tests checked with MNOTE,AIF" | ||
echo " View ${dir2}/TOPR2.TXT to see tests checked with code" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# x00c2bdxtests: regression test HLASM built-in functions | ||
|
||
set -e # exit on all errors | ||
cd $(dirname $0) # set to directory of script | ||
cd ../.. # up two directories; the z390 directory | ||
|
||
sysmac='sysmac(mac)' | ||
|
||
# assemble test program | ||
bash/asm rt/mlc/C2BDX00 trace noloadhigh $sysmac | ||
rc=$? | ||
if [ $rc -ne 0 ]; then | ||
echo "Error assembling test program; rc=$rc" | ||
exit $rc | ||
fi | ||
|
||
# if we get here, there were no errors | ||
echo "Verify tests ran without errors" | ||
echo " View rt/mlc/C2BDX00.PRN to see tests" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
* Test A2B built-in function error | ||
A2BE1 CSECT | ||
SR 15,15 | ||
BR 14 | ||
* | ||
LCLC &C | ||
* | ||
* HLASM LangRef example | ||
* | ||
*&C SETC 'abc' Preset result field | ||
&C SETC 'abc' | ||
* | ||
*&C SETC A2B(2345678901) Error; too large | ||
&C SETC A2B(2345678901) | ||
MNOTE 'A2B(2345678901)=&C' | ||
AIF ('&C' EQ 'abc').OK | ||
MNOTE 12.'Error; expected value is abc' | ||
.OK ANOP | ||
* | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
* Test A2B built-in function error | ||
A2BE2 CSECT | ||
SR 15,15 | ||
BR 14 | ||
* | ||
LCLC &C | ||
* | ||
* z390 example | ||
* | ||
*&C SETC 'abc' Preset result field | ||
&C SETC 'abc' | ||
* | ||
*&C SETC A2B(--2147483648) Error; overflow | ||
&C SETC A2B(--2147483648) | ||
MNOTE 'A2B(--2147483648)=&C' | ||
AIF ('&C' EQ 'abc').OK | ||
MNOTE 12.'Error; expected value is abc' | ||
.OK ANOP | ||
* | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
* Test HLASM built-in functions that have X'00' in argument string | ||
C2BDX00 CSECT | ||
LCLC &C2B,&C2D,&C2X | ||
* | ||
LCLC &NULL,&NULLj | ||
* | ||
* &NULL,&NULLj values taken from HLASM LangRef B2C examples | ||
&NULL SETC B2C('0') value 'n' = null char = X'00' | ||
&NULLj SETC '&NULL'.'j' value 'nj' | ||
* | ||
* HLASM LangRef examples | ||
* | ||
*&C2B SETC C2B('n') n = null char = X'00' | ||
&C2B SETC C2B('&NULL') | ||
MNOTE 'C2B(''&NULL'')=&C2B' | ||
AIF ('&C2B' EQ '00000000').OKC2B | ||
MNOTE 8,'C2B: Generated value not equal to expected value' | ||
.OKC2B ANOP | ||
* | ||
*&C2D SETC C2D('nj') n = null char = X'00' | ||
&C2D SETC C2D('&NULLj') | ||
MNOTE 'C2D(''&NULLj'')=&C2D' | ||
AIF ('&C2D' EQ '+145').OKC2D | ||
MNOTE 8,'C2D: Generated value not equal to expected value' | ||
.OKC2D ANOP | ||
* | ||
*&C2X SETC C2X('n') n = null char = X'00' | ||
&C2X SETC C2X('&NULL') | ||
MNOTE 'C2X(''&NULL'')=&C2X' | ||
AIF ('&C2X' EQ '00').OKC2X | ||
MNOTE 8,'C2X: Generated value not equal to expected value' | ||
.OKC2X ANOP | ||
* | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
* Test ISBIN built-in function error | ||
ISBINE1 CSECT | ||
SR 15,15 | ||
BR 14 | ||
* | ||
LCLA &A | ||
* | ||
* HLASM LangRef example | ||
* | ||
*&A SETA 123 Preset return value | ||
&A SETA 123 | ||
*&A ISBIN('') Error | ||
&A SETA ISBIN('') 0 | ||
MNOTE 'ISBIN('''')=&A' | ||
DC F'&A' | ||
AIF (&A EQ 0).OK | ||
MNOTE 12,'Error; expected value is 0' | ||
.OK ANOP | ||
* | ||
END |
Oops, something went wrong.