-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#207] Add r122/tprestart subtest (tests YottaDB/YDB#207)
- Loading branch information
Showing
6 changed files
with
121 additions
and
0 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
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,27 @@ | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
; ; | ||
; Copyright (c) 2018 YottaDB LLC. 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. ; | ||
; ; | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
tprestart ; | ||
set ^stop=0,jmaxwait=0 ; signal child processes to proceed | ||
do ^job("child^tprestart",5,"""""") ; start 5 jobs | ||
hang 10 ; let child run for 10 seconds | ||
set ^stop=1 ; signal child processes to stop | ||
do wait^job ; wait for child processes to die | ||
quit | ||
|
||
child ; | ||
for i=1:1 quit:^stop=1 do | ||
. tstart ():serial | ||
. set x=$incr(^c) | ||
. set ^a(x)=1,^b(x)=2 | ||
. tcommit | ||
quit |
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,37 @@ | ||
#!/usr/local/bin/tcsh -f | ||
################################################################# | ||
# # | ||
# Copyright (c) 2018 YottaDB LLC. 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. # | ||
# # | ||
################################################################# | ||
# | ||
#------------------------------------------------------------------------------------------------------------- | ||
# List of subtests of the form "subtestname [author] description" | ||
#------------------------------------------------------------------------------------------------------------- | ||
# tprestart [nars] Test that TPRESTART syslog message has the correct global name when restart "type" is 4 | ||
#------------------------------------------------------------------------------------------------------------- | ||
|
||
echo "r122 test starts..." | ||
|
||
# List the subtests separated by spaces under the appropriate environment variable name | ||
setenv subtest_list_common "" | ||
setenv subtest_list_non_replic "" | ||
setenv subtest_list_non_replic "$subtest_list_non_replic tprestart" | ||
setenv subtest_list_replic "" | ||
|
||
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 | ||
|
||
# Submit the list of subtests | ||
$gtm_tst/com/submit_subtest.csh | ||
|
||
echo "r122 test DONE." |
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,5 @@ | ||
v63004 test starts... | ||
##SUSPEND_OUTPUT REPLIC | ||
PASS from tprestart | ||
##ALLOW_OUTPUT REPLIC | ||
v63004 test DONE. |
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,14 @@ | ||
Files Created in ##TEST_PATH##: | ||
Using: ##SOURCE_PATH##/mumps -run GDE | ||
mumps.gld | ||
Using: ##SOURCE_PATH##/mupip | ||
a.dat | ||
b.dat | ||
mumps.dat | ||
------------------------------------------------------------------------------------------------- | ||
Below is a list of global names & region names in the TPRESTART syslog messages that do not match | ||
------------------------------------------------------------------------------------------------- | ||
------------------------------------------------------------------------------------------------- | ||
##SOURCE_PATH##/mupip | ||
##SOURCE_PATH##/mupip integ -REG * | ||
No errors detected by integ. |
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 @@ | ||
#!/usr/local/bin/tcsh -f | ||
################################################################# | ||
# # | ||
# Copyright (c) 2018 YottaDB LLC. 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. # | ||
# # | ||
################################################################# | ||
# | ||
|
||
$gtm_tst/com/dbcreate.csh mumps 3 | ||
|
||
set syslog_time_before = `date +"%b %e %H:%M:%S"` | ||
$ydb_dist/mumps -run tprestart | ||
set syslog_time_after = `date +"%b %e %H:%M:%S"` | ||
set | grep syslog_time > debug.txt # record these variables for test debugging if later needed | ||
$gtm_tst/com/getoper.csh "$syslog_time_before" "$syslog_time_after" syslog2.txt | ||
|
||
# Search for TPRESTART messages belonging to this test (hence the `pwd` below) and ensure they have the right global name. | ||
# $8 is the full path of the database file name | ||
# $15 is the global name (subscripted or unsubscripted) | ||
# It is possible the global name is ^*DIR to imply directory tree. Filter that out. | ||
# It is possible the global name has subscripts. Filter that out. | ||
# Finally compare the unsubscripted global name against the database file name. | ||
$grep "TPRESTART.*`pwd`" syslog2.txt | $tst_awk '{print $8, $15}' | grep -vw DIR | sed 's/(.*)//g' | sort -u >& reg_gbl.out | ||
echo "-------------------------------------------------------------------------------------------------" | ||
echo "Below is a list of global names & region names in the TPRESTART syslog messages that do not match" | ||
echo "-------------------------------------------------------------------------------------------------" | ||
$grep -v "`pwd`/a.dat; ^a;" reg_gbl.out | $grep -v "`pwd`/b.dat; ^b;" | $grep -v "`pwd`/mumps.dat; ^c;" | ||
echo "-------------------------------------------------------------------------------------------------" | ||
|
||
$gtm_tst/com/dbcheck.csh |