$! $!Check the output status of "perforce info" for the new and old client. $!This test assumes that your definition of P4PORT is correct and OK, $!and that re-defining it to "nowhere.nada.com:1667" will exit with $!a bad status indication when "perf info" is executed. $! $!The command "perf info" is one of the very few commands that indicates $!a (Fatal) error when a connection cannot be made. This test $!tries to determine if both perforce and newperf exhibit the same $STATUS $!under bad conditions. $! $!An example of expected behavior for a bad P4PORT: $! $! $ define/user p4port "dsfddsfds" $! $ perf info $! Error error: $! Connect to server failed; check $P4PORT. $! TCP connect to dsfddsfds failed. $! dsfddsfds: service unknown. $! $ sho sym $status $! $STATUS == "%X00038004" $! $ total_tests = 4 $ tests_passed = 0 $! $ define/user_mode sys$output nl: $ define/user_mode sys$error nl: $ perforce info $ old_good_status = $status $! $ define/user_mode sys$output nl: $ define/user_mode sys$error nl: $ newperf info $ new_good_status = $status $! $ ! old_p4port_table = f$trnlnm("P4PORT", , , , ,"TABLE_NAME") $ ! old_p4port = f$trnlnm("P4PORT") $ ! deassign/table='old_p4port_table' P4PORT $ set noon $! $ non_existant_p4port = "nowhere.nada.com:1667" $! $ define/user_mode sys$output nl: $ define/user_mode sys$error nl: $ define/user_mode/nolog P4PORT "''non_existant_p4port'" $ perforce info $ old_bad_status = $status $! $ define/user_mode sys$output nl: $ define/user_mode sys$error nl: $ define/user_mode/nolog P4PORT "''non_existant_p4port'" $ newperf info $ new_bad_status = $status $! $ set on $ ! define/table='old_p4port_table' P4PORT "''old_p4port'" $! $ if old_good_status .ne. 1 $ then write sys$output "not ok 1" $ else write sys$output "ok 1" $ tests_passed = tests_passed + 1 $ endif $ if new_good_status .ne. 1 $ then write sys$output "not ok 2" $ else write sys$output "ok 2" $ tests_passed = tests_passed + 1 $ endif $ if old_bad_status .eq. 1 $ then write sys$output "not ok 3" $ else write sys$output "ok 3" $ tests_passed = tests_passed + 1 $ endif $ if new_bad_status .eq. 1 $ then write sys$output "not ok 4" $ else write sys$output "ok 4" $ tests_passed = tests_passed + 1 $ endif $ if tests_passed .ne. total_tests $ then $ show symbol old_good_status $ show symbol new_good_status $ show symbol old_bad_status $ show symbol new_bad_status $ endif
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5686 | peter_prymmer |
VMS DCL procedures to reveal several bugs in (at least) the 2002.2 release of the p4.exe client program for VMS including: 1) use of "p4" as a foreign command global symbol is not recommended (these tests use "perforce" and "newperf") 2) the inability to deal with RMS versioning (demonstrated by the revert_deletion.com test) 3) the inability to recognize uppercase parameters and switches (demonstrated by the dash_v.com test) 4) a regression in dealing with a return() of a bad $STATUS to the command level when P4PORT is incorrectly set and you issue "perf info" (info_status.com test) I recommend reading the readme and modifying p4_setup.com and revert_deletion.com before trying to use these procedures. |