Commit 52b3af62 authored by Narayanan Iyer's avatar Narayanan Iyer
Browse files

T6.3-000A

parents
bkgrndset;
set ^stopbg=0
set unix=$ZVersion'["VMS"
if unix set pid=$J
else set pid=$$FUNC^%DH($J)
set file="ver_alternate.out"
open file:(newversion)
use file
write pid,!
close file
for i=1:1 quit:^stopbg=1 do switchver
switchver;
if unix zsy "$gtm_tst/$tst/u_inref/bkgrnd_mupip_set.csh"
else zsy "@vinrefdir:bkgrnd_mupip_set.com"
bkgrndstop;
set unix=$ZVersion'["VMS"
if unix set pid=$J
else set pid=$$FUNC^%DH($J)
set file="crash_job.out"
open file:(newversion)
use file
write pid,!
close file
if unix zsy "source gtm_test_crash_jobs_0.csh"
else zsy "@gtm_test_crash_jobs_0.com"
quit
d002556 ;
quit
init ;
set unix=$zversion'["VMS"
; since GTM V4 in VMS has a record-header of 7 bytes which is 1 byte lesser than GTM V4 in Unix, we need one more
; character in the VMS subscript to test the max_record_length case
if unix set subs="""ABCDEFG"",""HIJKLMNOP"",1,""QRSTUVWXY"","
if 'unix set subs="""ABCDEFGH"",""HIJKLMNOP"",1,""QRSTUVWXY"","
quit
;
mkdb1 ;
do init
s x=1
f i=1:4:12 do
. if x=0 do
. . X "Set ^a("_subs_"i)="""""
. X "Set ^a("_subs_"i+1)="""""
. X "Set ^a("_subs_"i+2)=$j(i+2,452)"
. X "Set ^a("_subs_"i+3)=$j(i+3,452)"
. S x=0
quit
mkdb2 ;
do init
f i=1:2:8 do
. X "Set ^a("_subs_"i)="""""
. X "Set ^a("_subs_"i+1)=$j(i+3,453)"
. S x=0
quit
mkdb3 ;
do init
s alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
k ^a
if unix set len=223
if 'unix set len=224
f i=1:3:26 do
. X "Set ^a("_subs_""""_$E(alpha,i)_""")="""" "
. set str=$j(i+1,len)
. X "Set ^a("_subs_""""_$E(alpha,i+1)_""")=str "
. set str=$j(i+2,len)
. X "Set ^a("_subs_""""_$E(alpha,i+2)_""")=str "
. S x=0
quit
mkdb4 ;
do mkdb3
quit
{
################################# scan phase block output filter ###############################
gsub("Total blocks in database -------[ ]*[0-9]* .0x[0-9a-z]*.","Total blocks in database -------##SCAN_BLOCKS##",$0)
gsub("Total local bitmap blocks -------[ ]*[0-9]* .0x[0-9a-z]*.","Total local bitmap blocks -------##SCAN_BLOCKS##",$0)
gsub("Blocks bypassed -----------------[ ]*[0-9]* .0x[0-9a-z]*.","Blocks bypassed -----------------##SCAN_BLOCKS##",$0)
gsub("Blocks processed ----------------[ ]*[0-9]* .0x[0-9a-z]*.","Blocks processed ----------------##SCAN_BLOCKS##",$0)
gsub("Blocks needing to be split ------[ ]*[0-9]* .0x[0-9a-z]*.","Blocks needing to be split ------##SCAN_BLOCKS##",$0)
gsub("- DT leaf .data. blocks ---------[ ]*[0-9]* .0x[0-9a-z]*.","- DT leaf (data) blocks ---------##SCAN_BLOCKS##",$0)
gsub("- DT index blocks ---------------[ ]*[0-9]* .0x[0-9a-z]*.","- DT index blocks ---------------##SCAN_BLOCKS##",$0)
gsub("- GVT leaf .data. blocks --------[ ]*[0-9]* .0x[0-9a-z]*.","- GVT leaf (data) blocks --------##SCAN_BLOCKS##",$0)
gsub("- GVT index blocks --------------[ ]*[0-9]* .0x[0-9a-z]*.","- GVT index blocks --------------##SCAN_BLOCKS##",$0)
############################ v4dbprepare random globals,records filter #########################
gsub("^--> Number of globals in directory tree : [0-9]*","--> Number of globals in directory tree : ##V4RAND##",$0)
gsub("^--> Number of records in global variable tree : [0-9]*","--> Number of records in global variable tree : ##V4RAND##",$0)
########################### MUPIP upgrade/downgrade statistics filter ##########################
gsub("%GTM-I-MUINFOUINT4, Old file header size : [0-9]* .0x[0-9A-Z]*.","%GTM-I-MUINFOUINT4, Old file header size : ##UPGRD_DWNGRD_BLKS##",$0)
gsub("%GTM-I-MUINFOUINT8, Old file length : [0-9]* .0x[0-9A-Z]*.","%GTM-I-MUINFOUINT8, Old file length : ##UPGRD_DWNGRD_BLKS##",$0)
gsub("%GTM-I-MUINFOUINT4, Old file start_vbn : [0-9]* .0x[0-9A-Z]*.","%GTM-I-MUINFOUINT4, Old file start_vbn : ##UPGRD_DWNGRD_BLKS##",$0)
gsub("%GTM-I-MUINFOUINT4, Old file gds blk_size : [0-9]* .0x[0-9A-Z]*.","%GTM-I-MUINFOUINT4, Old file gds blk_size : ##UPGRD_DWNGRD_BLKS##",$0)
gsub("%GTM-I-MUINFOUINT4, Old file total_blks : [0-9]* .0x[0-9A-Z]*.","%GTM-I-MUINFOUINT4, Old file total_blks : ##UPGRD_DWNGRD_BLKS##",$0)
########################### MUPIP REORG upgrade/downgrade statistics filter ##########################
gsub("Region[$A-Za-z ]*: Statistics : Blocks Read From Disk .Bitmap. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Read From Disk (Bitmap) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Skipped .Free. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Skipped (Free) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Read From Disk .Non-Bitmap. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Read From Disk (Non-Bitmap) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Skipped .new fmt in disk. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Skipped (new fmt in disk) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Skipped .new fmt in cache. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Skipped (new fmt in cache) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Converted .Bitmap. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Converted (Bitmap) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Statistics : Blocks Converted .Non-Bitmap. : 0x[0-9A-Z]*","Region ##REG## : Statistics : Blocks Converted (Non-Bitmap) : ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Started processing from block number .0x[0-9A-Z]*.","Region ##REG## : Started processing from block number ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Stopped processing at block number .0x[0-9A-Z]*.","Region ##REG## : Stopped processing at block number ##REORG_BLOCKS##",$0)
gsub("Region[$A-Za-z ]*: Total Blocks = .0x[0-9A-Z]*. : Free Blocks = .0x[0-9A-Z]*. : Blocks to upgrade = .0x[0-9A-Z]*.","Region ##REG## : Total Blocks = ##TOT_BLKS## : Free Blocks = ##FREE_BLKS## : Blocks to upgrade = ##UPG_BLKS##",$0)
gsub("Region[$A-Za-z ]*: MUPIP REORG UPGRADE finished","Region ##REG## : MUPIP REORG UPGRADE finished",$0)
gsub("Region[$A-Za-z ]*: Database is now FULLY UPGRADED","Region ##REG## : Database is now FULLY UPGRADED",$0)
gsub("upgrade[d ]*to GT.M.*","upgrade to GT.M ##MACHTYPE##",$0)
########################### MUPIP upgrade/downgrade dbcertify issues filter ###########################
gsub("%GTM-E-DBMAXREC2BIG, Maximum record size .[0-9][0-9][0-9]. is too large","%GTM-E-DBMAXREC2BIG, Maximum record size ##MAX_REC_SIZE## is too large",$0)
gsub("%GTM-E-DBCMODBLK2BIG, Block 0x[0-9A-Z]*","%GTM-E-DBCMODBLK2BIG, Block ##BLK_NO##",$0)
gsub("%GTM-E-DBCREC2BIG, Record with key .biggbl.[0-9]*. is length [0-9]* in block 0x[0-9A-Z]*","%GTM-E-DBCREC2BIG, Record with key ^biggbl(##KEY##) is length ##SIZE## in block ##BLOCK##",$0)
gsub("%GTM-E-MUDWNGRDTN, Transaction number 0x[0-9A-Z]* in database [A-Za-z. ]*is too big for MUPIP ","%GTM-E-MUDWNGRDTN, Transaction number ##TN## in database ##DATAFILE## is too big for MUPIP ",$0)
gsub("[%-]GTM-E-DYNUPGRDFAIL, Unable to dynamically upgrade block 0x[0-9A-Z]*","%GTM-E-DYNUPGRDFAIL, Unable to dynamically upgrade block ##TN##",$0)
########################### random V4 version chosen filter ###################
gsub("/usr/library/V4[0-9A-Z]*/[a-z][a-z][a-z]","##V4VER##",$0)
########################### VMS specific filiter for mumps.gld versions ###################
gsub("GTM$TEST_OUT_DIR_C:.TMP.MUMPS.GLD;[0-9]*","GTM$TEST_OUT_DIR_C:[TMP]MUMPS.GLD;##NO##",$0)
########################### integ output ###################
gsub("Directory[ ]*[0-9][0-9]*[ ]*[0-9AN][0-9AN]*[ ]*[0-9.AN][0-9.AN]*[ ]*[0-9AN][0-9AN]*","Directory##INTEG_INFO##")
gsub("Index[ ]*[0-9][0-9]*[ ]*[0-9AN][0-9AN]*[ ]*[0-9.AN][0-9.AN]*[ ]*[0-9AN][0-9AN]*","Index##INTEG_INFO##")
gsub("Data[ ]*[0-9][0-9]*[ ]*[0-9AN][0-9AN]*[ ]*[0-9.AN][0-9.AN]*[ ]*[0-9AN][0-9AN]*","Data##INTEG_INFO##")
gsub("Free[ ]*[0-9][0-9]*[ ]*[0-9AN][0-9AN]*[ ]*[0-9.AN][0-9.AN]*[ ]*[0-9AN][0-9AN]*","Free##INTEG_INFO##")
gsub("Total[ ]*[0-9][0-9]*[ ]*[0-9AN][0-9AN]*[ ]*[0-9.AN][0-9.AN]*[ ]*[0-9AN][0-9AN]*","Total##INTEG_INFO##")
########################### load output ###################
gsub("LOAD TOTAL[:]*[ ]*[ ]*Key [Cc]nt:[ ]*[0-9][0-9]*[ ]*[Mm]ax [Ss]ubsc [Ll]en:[ ]*[0-9][0-9]*[ ]*[Mm]ax [Dd]ata [Ll]en:[ ]*[0-9][0-9]*","LOAD TOTAL: Key cnt: ##KEYCOUNT## max subsc len: ##MAX_SUBSC_LEN## max data len: ##MAX_DATA_LEN##")
}
{print}
gengvn(int);
new str,num,strarr,lenarr,lowerc,upperc
set strarr(0)="abcdefghijklmnopqrstuvwxyz",lenarr(0)=26,lowerc=0
set strarr(1)="ABCDEFGHIJKLMNOPQRSTUVWXYZ",lenarr(1)=26,upperc=1
set strarr(2)="0123456789",lenarr(2)=10
set num=int
set nummod3=num#3
if nummod3=0 do
. set str="%"
if nummod3=1 do
. set index=num#26+1
. set str=$extract(strarr(lowerc),index,index)
. set num=num\26
if nummod3=2 do
. set index=num#26+1
. set str=$extract(strarr(upperc),index,index)
. set num=num\26
set lenmod3=0
for quit:num=0 do
. set lenstr=strarr(lenmod3)
. set radix=lenarr(lenmod3)
. set temp=num#radix
. set num=num\radix
. set char=$extract(lenstr,temp+1,temp+1)
. set str=str_char
. set lenmod3=(lenmod3+1)#3
quit str
jnlrecm ;jnlrec multi region, used from multiple subtests
; makes sure all types of records are generated
set fencing=$zsearch("test_replic.txt") ; if this file exists, then it is a replic test so do not use ZTS/ZTC
K ^acn
h 1
set unix=$zv'["VMS"
if unix set command="$gtm_tst/com/abs_time.csh "
else d
. set command="pipe write sys$output f$time() > "
. if $ZCMDLINE="NOTIME" s command=""
if ""'=command zsystem command_"time1_GTM_TEST_DEBUGINFO"
h 1
w "SET,TSET,USET,GSET,FSET",!
S (^acn(1),^bcn(1),^cn(1),^dcn(1))="this is SET"
TS ():(transaction="BATCH")
S (^acn(2),^bcn(2),^ccn(2),^dcn(2))="this is TSET"
S (^acn(3),^bcn(3),^ccn(3),^dcn(3))="this is USET"
S (^acn(3,1),^bcn(3,1),^ccn(3,1),^dcn(3,1))="this is USET"
h 1
if ""'=command zsystem command_"time2_GTM_TEST_DEBUGINFO"
h 1
TC
if (""=fencing) ZTS
S (^acn(5),^bcn(5),^ccn(5),^dcn(5))="this is FSET"
S (^acn(6),^bcn(6),^ccn(6),^dcn(6))="this is GSET"
S (^acn(6,1),^bcn(6,1),^ccn(6,1),^dcn(6,1))="this is GSET"
h 1
if ""'=command zsystem command_"time3_GTM_TEST_DEBUGINFO"
h 1
if (""=fencing) ZTC
;
w "KILL,TKILL,UKILL,GKILL,FKILL",!
K ^acn(1),^bcn(1),^ccn(1),^dcn(1)
TS
K ^acn(2),^bcn(2),^ccn(2),^dcn(2)
K ^acn(3),^bcn(3),^ccn(3),^dcn(3)
K ^acn(3,1),^bcn(3,1),^ccn(3,1),^dcn(3,1)
TC
if (""=fencing) ZTS
K ^acn(5),^bcn(5),^ccn(5),^dcn(5)
K ^acn(6),^bcn(6),^ccn(6),^dcn(6)
K ^acn(6,1),^bcn(6,1),^ccn(6,1),^dcn(6,1)
if (""=fencing) ZTC
if $data(^acn)=0 w "Passed SET and KILL",!
;
w "SET,TSET,USET,GSET,FSET",!
S (^acn(10),^bcn(10),^ccn(10),^dcn(10))="this is SET"
TS ():(transaction="online")
S (^acn(11),^bcn(11),^ccn(11),^dcn(11))="this is TSET"
S (^acn(11,11),^bcn(11,11),^ccn(11,11),^dcn(11,11))="this is USET"
S (^acn(12),^bcn(12),^ccn(12),^dcn(12))="this is USET"
S (^acn(12,12),^bcn(12,12),^ccn(12,12),^dcn(12,12))="this is USET"
TC
if (""=fencing) ZTS
S (^acn(13),^bcn(13),^ccn(13),^dcn(13))="this is FSET"
S (^acn(13,13),^bcn(13,13),^ccn(13,13),^dcn(13,13))="this is GSET"
S (^acn(14),^bcn(14),^ccn(14),^dcn(14))="this is GSET"
S (^acn(14,14),^bcn(14,14),^ccn(14,14),^dcn(14,14))="this is GSET"
h 1
if ""'=command zsystem command_"time4_GTM_TEST_DEBUGINFO"
h 1
if (""=fencing) ZTC
;
w "ZKILL,TZKILL,UZKILL,GZKILL,FZKILL",!
ZKILL ^acn(10),^bcn(10),^ccn(10),^dcn(10)
TS
ZKILL ^acn(11),^bcn(11),^ccn(11),^dcn(11)
ZKILL ^acn(12),^bcn(12),^ccn(12),^dcn(12)
TC
if (""=fencing) ZTS
ZKILL ^acn(13),^bcn(13),^ccn(13),^dcn(13)
ZKILL ^acn(14),^bcn(14),^ccn(14),^dcn(14)
if (""=fencing) ZTC
h 1
if ""'=command zsystem command_"time5_GTM_TEST_DEBUGINFO"
h 1
W "Check that only ^acn(11,11),^acn(12,12),^acn(13,13),^acn(14,14) are present",!
ZWR ^acn
q
verify
s fail=0
if "this is USET"'=^acn(11,11) s fail=1
if "this is USET"'=^acn(12,12) s fail=1
if "this is GSET"'=^acn(13,13) s fail=1
if "this is GSET"'=^acn(14,14) s fail=1
if "this is USET"'=^bcn(11,11) s fail=1
if "this is USET"'=^bcn(12,12) s fail=1
if "this is GSET"'=^bcn(13,13) s fail=1
if "this is GSET"'=^bcn(14,14) s fail=1
if "this is USET"'=^ccn(11,11) s fail=1
if "this is USET"'=^ccn(12,12) s fail=1
if "this is GSET"'=^ccn(13,13) s fail=1
if "this is GSET"'=^ccn(14,14) s fail=1
if "this is SET"'=^cn(1) s fail=1
if "this is USET"'=^dcn(11,11) s fail=1
if "this is USET"'=^dcn(12,12) s fail=1
if "this is GSET"'=^dcn(13,13) s fail=1
if "this is GSET"'=^dcn(14,14) s fail=1
if 1=fail w "FAILED VERIFY"
e w "PASSED VERIFY"
q
onlnread;
set ^stop=0
set unix=$ZVersion'["VMS"
if unix set pid=$JOB
else set pid=$$FUNC^%DH($JOB)
set file="concurrent_job.out"
open file:(newversion)
use file
write pid,!
close file
for i=1:1 quit:^stop=1 do verify
quit
verify ;
do vergvt^upgrdtst do verdirt^upgrdtst
quit
tenninety
set name=$piece($ZCMDLINE," ",1)
set infile=name_".ext",top10=name_"2.ext",rev90=name_"1_reverse.ext"
open infile:(readonly:exception="goto nofile")
use infile:exception="goto doneread"
for i=1:1 quit:$zeof read lines(i)
doneread
use $p
; there is no header
if i<3 goto nozwrheader
; there is not enough data, the 10% file will be empty
if i<12 goto notenoughdata
; -1 to drop the the extra count from the for loop
set total=i-1
; -2 to drop the two header lines, but add them back in
set toptencount=((total-2)/10)+2
open top10:newversion
use top10
for i=1:1:toptencount write lines(i),!
close top10
write "Wrote ",i," lines to the top 10% file",!
open rev90:newversion
use rev90
write lines(1),!,lines(2),!
for i=total:-1:toptencount write lines(i),!
close rev90
write "Wrote ",(total-(i-1))+2," lines to the reversed 90% file",!
write "Total lines (including zwr header) is ",total,!
quit
nozwrheader
write "%GTM-E-ERROR no headers in the extract",!
quit
notenoughdata
write "%GTM-E-ERROR not enough lines in the extract",!
quit
nofile
use $p
write $zstatus,!
if $length(name)=0 set name="<no file name given>"
write "%GTM-E-ERROR the file ",name," does not exist",!
quit
updates(gvname) ;
set tpcnt=0
for i=1:1:1024 do
. set istp=$random(2)
. if istp=1 tstart ():serial
. set var=gvname_"("_i_")"
. set @var=$justify(i,1+$r(100))
. if istp=1 tcommit set tpcnt=tpcnt+1
set file="settings.log"
open file:(APPEND)
use file
write "No of tp transactions for gvname",gvname," : ",tpcnt,!
close file
quit
upgrdtst;
; this test tries to create a lot of too-full blocks at all levels and both in the GVT and Directory Tree
; too-full => the block has less than 8 bytes (9 in VMS) of free space
; => this block needs to be identified by V5CERTIFY PHASE-1 and split by V5CERTIFY PHASE-2
; this is needed in order to test the V5CERTIFY code that is being developed for the DATABASE UPGRADE part of
; the 64bit-tn project (D9E03-002438)
set ;
do setdirt
do setgvt
quit
replay ;
set unix=$ZVersion'["VMS"
if ""=$ztrnlnm(type) set @type=20+$random(num)
else set @type=$ztrnlnm(type)
if unix set file="settings.csh"
else set file="settings.com"
open file:(append)
use file
if unix write "setenv "_type_" "_@type,!
else write "$define /nolog "_type_" "_@type,!
close file
quit
setdirt ;
new action
do replay
set ^dirtend=1+@type
write "--> Number of globals in directory tree : ",^dirtend,!
set action="set"
do dirtloop
quit
setgvt ;
new action
do replay
set ^gvtend=1+@type
write "--> Number of records in global variable tree : ",^gvtend,!
set action="set"
do gvtloop
quit
verify ;
do verdirt;
do vergvt;
quit
verdirt ;
new action
set action="ver"
do dirtloop
quit
vergvt ;
new action
set action="ver"
do gvtloop
quit
common ;
set prime=50000017 ;Precalculated
set root=5 ;Precalculated
quit
gvtloop ;
new maxerr,fl,str,i,value,num
do common
if $data(gvname)=0 new gvname set gvname="^x"
if $data(startidx)=0 new startidx set startidx=1
if $data(endidx)=0 new endidx set endidx=^gvtend
set fl=0
set maxerr=10
set num=root
for i=startidx:1:endidx do quit:(fl>maxerr)
. set num=(num*root)#prime
. set str=$$^genstr(num)
. set value=$justify(i#100,i#2+1)
. if action="set" set @gvname@(str)=value
. if (action="ver")&($GET(@gvname@(str))'=value) do
. . write "Verify Fail: i=",i," num=",num," ",gvname,"("_str_")=",$GET(@gvname@(str))," Expected=",value,! set fl=fl+1
if (action="ver") do
. if (fl>maxerr) write "Too many errors ",!
. if (fl=0) write " --> Verify all Global Variable Tree : PASS",!
. if (fl'=0) write " --> Verify all Global Variable Tree : FAIL",!
quit
dirtloop;
new maxerr,fl,str,i,value,num
do common
if $data(startidx)=0 new startidx set startidx=1
if $data(endidx)=0 new endidx set endidx=^dirtend
set fl=0
set maxerr=10
set num=root
for i=startidx:1:endidx do quit:(fl>maxerr)
. set num=(num*root)#prime
. set str=$$^gengvn(num)
. set value=$justify(i#10,i#100+1)
. set xstr="^"_str
. if action="set" set @xstr=value
. if (action="ver")&($GET(@xstr)'=value) do
. . write "Verify Fail: i=",i," num=",num," ",xstr,"=",$GET(@xstr),",Expected=",value,! set fl=fl+1
if (action="ver") do
. if (fl>maxerr) write "--> Verify Directory Tree : Too many errors ",!
. if (fl=0) write " --> Verify Directory Tree : PASS",!
. if (fl'=0) write " --> Verify Directory Tree : FAIL",!
quit
setbig ;
; create too-large records all of which will fit in V4 blocks but only some will fit in V5 blocks
; ^biggbl(1) and ^biggbl(2) will fit just right in a 512-byte sized V5 block
; ^biggbl(3) until ^biggbl(10) should not fit in a 512-byte sized V5 block
; ^biggbl(11) and ^biggbl(12) will fit just right in a 512-byte sized V5 block
;
do setgood
do setbad
quit
initbig ;
; The following is called as part of "setdirt" to ensure the global name "^biggbl" is part of the directory tree
; as part of the v4dbprepare.csh/.com script. This will have the effect of creating a global in the Directory Tree
; and Global Variable Tree but removing it only from the GVT. The DT will thus have the global name as part of
; v4dbprepare thereby we would have done dbcertify on it. The later setbig^upgrdtst should not update the DT
; as the global name already exists there. It will update only the GVT.
;
set ^biggbl=1
kill ^biggbl
quit
setgood ;
new i
for i=1,2,11,12 set ^biggbl(i)=$justify(i,480+((i-1)#10))
quit
setbad ;
new i
for i=3:1:10 set ^biggbl(i)=$justify(i,480+((i-1)#10))
quit
killbig ;
; kill only the too-large records (i.e. biggbl(3) upto biggbl(10) instead of all ^biggbl(i))
; this is because ^biggbl(1) and ^biggbl(2) will fit JUST TIGHT in a V5 512-byte sized block that
; we want to test that this boundary condition is handled right by the MUPIP REORG UPGRADE and/or GTM logic
;
new i
for i=3:1:10 kill ^biggbl(i)
quit
vrfybig ;
new i,expec,fl
set fl=0
for i=1,2,11,12 do
. set actual=$get(^biggbl(i))
. set expec=$justify(i,480+((i-1)#10))
. if actual'=expec write "Verify Fail: ^biggbl(",i,")=",actual,",Expected=",expec,! set fl=fl+1
for i=3:1:10 do
. set actual=$get(^biggbl(i))
. set expec=""
. if actual'=expec write "Verify Fail: ^biggbl(",i,")=",actual,",Expected=",expec,! set fl=fl+1
if (fl=0) write " --> Verify Directory Tree : PASS",!
if (fl'=0) write " --> Verify Directory Tree : FAIL",!
quit
#!/usr/local/bin/tcsh -f
#################################################################
# #
# Copyright (c) 2013-2016 Fidelity National Information #
# Services, Inc. and/or its subsidiaries. All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
#
#####################################################
# D9E03-002438 - 64 Bit Transaction Number
#####################################################
# read_only [Mohammad]
# rolling_upgrade [Mohammad]
# mupip_upgrd_dwngrd [Balaji]
# mu_reorg_upgrd_dwngrd [Balaji]
# dbcertify [Balaji]
# mupip_journal [Balaji]
# vermismatch [Balaji]
# mupip_integ [Balaji]
# mupip_create [Balaji]
# mupip_backup_restore [Balaji]
# basic [kishore]
# mupip_set_version [kishore]
# blks_to_upgrade [kishore]
# extract_upg_downg [kishore]
# dse_commands [kishore]
# D9F07002556 [narayanan]
echo "64 Bit Transaction Number tests starts ..."
# Encryption needs to disabled for this test as it deals with v4 db format most of the places
setenv test_encryption_orig $test_encryption
if ("ENCRYPT" == "$test_encryption" ) then
setenv test_encryption NON_ENCRYPT
endif
# MM access method works well only from versions V5.3-002. Since most of the subtests need V4 version, force BG
source $gtm_tst/com/gtm_test_setbgaccess.csh
# set the following env. var as this test handles the desired db block format itself
setenv gtm_test_mupip_set_version "disable"
setenv gtm_test_disable_randomdbtn 1
###################################################################################
# For 64 bit tests we have to pick & random V4 version & use them for all sub-tests
# the script has to be sourced to carry the random value to the test
# output of the script will be in variable v4ver
#
if ($?gtm_test_replay) then
source $gtm_test_replay
else
# Over time, we have seen certain random setting values expose GTM-5873 so want to test those
# more frequently than they would normally be exercised (if we let them be chosen by the default
# randomization, it might take years for this to be exercised). We know of two settings that triggered
# GTM-5873 so include those here. And run them each 10% of the time. And run randomized for 80% of the rest
# (i.e. dirtrand/gvtrand will be chosen randomly inside setdirt^upgrdtst and setgvt^upgrdtst).
set randno = `$gtm_exe/mumps -run rand 10`
if ($randno == 1) then
# Settings that exposed GTM-5873 (C9G04-002790) : Apr 2006
setenv rand_collation 1
setenv dirtrand 5225
setenv gvtrand 31711
setenv v5cert_randno 1
setenv jnl_rand 71
setenv dirtrand1 2885
setenv gvtrand1 21097
else if ($randno == 2) then
# Settings that exposed regression in GTM-5873 (C9G04-002790) : Mar 2015
setenv rand_collation 0
setenv dirtrand 9541
setenv gvtrand 20722
setenv v5cert_randno 1
setenv jnl_rand 48
setenv dirtrand1 405
setenv gvtrand1 30609
endif
if !( $?gtm_platform_no_V4 ) then
setenv v4ver `$gtm_tst/com/random_ver.csh -type V4`
if ( "$v4ver" =~ "*-E-*") then
# This will cause the test to fail, but the subtests should all pass
echo "There are no V4 versions. Dynamically setting gtm_platform_no_V4"
setenv gtm_platform_no_V4 1
echo "setenv gtm_platform_no_V4 1" >> settings.csh
else
echo "setenv v4ver $v4ver" >> settings.csh
endif
endif
endif
####################################################################################
## set env. vars to switch version in the tests ( to be used in all sub-tests)
setenv sv5 "source $gtm_tst/com/switch_gtm_version.csh $tst_ver $tst_image"
#
setenv DBCERTIFY "$gtm_exe/dbcertify"
setenv MUPIPV5 "env gtm_dist=$gtm_exe $gtm_exe/mupip"
####################################################################################
# setup the env var to switch to the target V4 version
# Prepare too-full blocks database using v4dbprepare.csh
# save and use it for all the sub-tests below
# Not required for 64bit machines and replic test
if ( !($?test_replic) && !($?gtm_platform_no_V4) ) then
setenv sv4 "source $gtm_tst/com/switch_gtm_version.csh $v4ver $tst_image"
$sv4
mkdir ../dbprepare
cd ../dbprepare
echo "# chosen V4 VERSION FOR this 64bittn test run is "$v4ver >>&! v4dbprepare.log
source $gtm_tst/$tst/u_inref/v4dbprepare.csh >>&! v4dbprepare.log
cd -
$sv5
endif
####################################################################################
##
setenv subtest_list_common ""
if ( $?gtm_platform_no_V4 ) then
setenv subtest_list_non_replic "basic mupip_journal mupip_integ dse_commands "
else
setenv subtest_list_non_replic "basic dbcertify mupip_upgrd_dwngrd vermismatch read_only blks_to_upgrade extract_upg_downg D9F07002556 "
setenv subtest_list_non_replic "$subtest_list_non_replic mupip_journal mupip_integ dse_commands mu_reorg_upgrd_dwngrd mupip_create mupip_backup_restore mupip_set_version "
endif
setenv subtest_list_replic "rolling_upgrade"
#
######################################################
if ($?test_replic == 1) then
setenv subtest_list "$subtest_list_common $subtest_list_replic"
else
setenv subtest_list "$subtest_list_common $subtest_list_non_replic"
endif
######################################################
setenv subtest_exclude_list ""
# filter out some subtests for some servers
set hostn = $HOST:r:r:r
#
$gtm_tst/com/submit_subtest.csh
unsetenv v4ver
echo "64 Bit Transaction Number tests ends"