TargetRTS Debugger OTDC 5.2 Detailed Level Test Plan

MULTI-THREADED VERSION

Last Modified: July 22nd, 1998

Important Notice

Copyright 1991-1998 ObjecTime Limited. All rights reserved. The license management portion of this product is based on: Elan License Manager ” 1989-1998 Elan Computer Group, Inc. All rights reserved. Unpublished -- rights reserved under all Copyright laws including Copyright laws of the United States. ObjecTime (and logo) is a registered trademark of ObjecTime Limited. Developer is a trademark of ObjecTime Limited. ObjecTime Limited (OTL) PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Information in this publication is subject to change from time to time without notice. Some states, provinces, or jurisdictions do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you. ObjecTime Limited (OTL) and its licensors retain ownership to the ObjecTime computer program and other computer programs offered by OTL (hereinafter collectively called “ObjecTime”) and their documentation. Use of ObjecTime is governed by the Development License Agreement associated with your purchase. Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraphs (a) through (d) of the Commercial Computer Software-Restricted Rights clause FAR 52.227-19 and its successors. For units of the Department of Defense (DoD), the license for this software is subject to the “Restricted Rights” as that term is defined in the DFAR 252.227-7013 (c)(1)(ii), Rights in Technical Data and Computer Software and its successors. The contractor/manufacturer is: ObjecTime Limited 340 March Road Kanata, Ontario Canada, K2K 2E4 When acquired by the Government, commercial computer software and related documentation so legended shall be subject to the following: (A) Title to and ownership of the software and documentation shall remain with the Contractor. (B) User of the software and documentation shall be limited to the facility for which it is acquired. (C) The Government shall not provide or otherwise make available the software or documentation, or any portion thereof, in any form, to any third party without the prior written approval of the Contractor. Third parties do not include prime contractors, subcontractors and agents of the Government who have the Government’s permission to use the licensed software and documentation at the facility, and who have agreed to use the licensed software and documentation only in accordance with these restrictions. This provision does not limit the right of the Government to use software, documentation, or information therein, which the Government has or may obtain without restrictions. (D) The Government shall have the right to use the computer software and documentation with the computer for which it is acquired at any other facility to which that computer may be transferred; to use the computer software and docu3mentation with a backup computer when the primary computer is inoperative; to copy computer programs for safekeeping (archives) or backup purposes; and to modify the software and documentation or combine it with other software. Provided, that the unmodified portions shall remain subject to these restrictions.

COMMERCIAL COMPUTER SOFTWARE — RESTRICTED RIGHTS

(c) (1) The restricted computer software delivered under this contract may not be used, reproduced or disclosed by the Government except as provided in subparagraph(c)(2). (c)(2) The restricted computer software may be — (i) Used or copied for use in or with the computer or computers for which it was acquired, including use at any Government installation to which such computer or computers may be transferred; (ii) Used or copied for use in or with backup computer if any computer for which it was acquired is inoperative; (iii) Reproduced for safekeeping (archives) or backup purposes; (iv) Modified, adapted, or combined with other computer software, provided that the modified, combined, or adapted portions of the derivative software incorporating any of the delivered, restricted computer software shall be subject to same restrictions set forth in this contract.

Abstract

This document contains the test plan for verifying the TargetRTS debugger



Table of Contents:



  1.  Introduction

  2.  TargetRTS configuration

  3.  TargetRTS debugger command list

  4.  Testing of configuration without the debugger

  5.  Testing of configuration with the debugger

 

1. Introduction

This document provides the test plan for the TargetRTS debugger. It could be used 

to test any platform supporting the debugger. The purpose of this test plan is to

verify that all known features of the debugger are working properly. 



Command parameters and order of test cases: For each test case, a suggested command 

and parameter is given. If you change the order of the test cases, you might not get

the expected results. The results will have to be analysed according to the new sequence 

of operations.

2. TargetRTS configuration

There are currently three (2) TargetRTS possible configurations for the debugger which are



RSLDEBUG = RSLFALSE      : Minimum executable size, no debugger

RSLDEBUG = RSLTRUE       : Maximum debugging (default)



The selection of the wanted configuration is done by editing the file "RTConfig.h"

The TargetRTS must be rebuilt and will reflect the change.



Update used for the following tests: C_DebuggingExample 

3. TargetRTS debugger command list

 

cont   		  Continue execution.

delete <n>        Delete trace point <n>.

detach		  Don't pay attention to <tasksId>.

exit              Terminate process.

go [<n>]          Deliver <n> messages (default is 10).

help              Print help information.

info <actor>      Show information about actor.

list              List all trace points.

log <detail-level>

		  Log ROOM messages             

         detail levels: none all

printstats <n>    Print current statistics for task <n>.

quit              Quit debug mode.

saps              Show registered SPPs and corresponding SAPs.

stats <n>         Alias for printstats.

step [<n>]        Deliver <n> messages (default is 1).

system            List all the active actors in the system.

tasks		  Print list of tasks

trace <actor> <type= endport | relayport | sap | spp> <port>

                  Trace messages involving port.

  Unambiguous abbreviations are permitted for all commands.

4. Testing of configuration without the debugger


This configuration is the one without the debugger. The following applies:



Test case 1:



Verify that the size of the executable is smaller than "with" debugger 

version of the executable file.



Test case 2:



Using unix commands such as "strings" or "hd" and "grep", search for the string 

"RTS debug" in the executable file. The absence of this string confirms that the debugger

was not linked.



Test case 3:



Run the executable. Enter "q" followed by enter. It should loop indefinitely after displaying:



*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[9->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[10->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[11->?] UNBOUND!

 

Should it exit immediately, it means there is a problem.

 

5. Testing of configuration with the debugger

This configuration is the one with maximum debug information. The executable is invoked

on the target and the following test cases are applied. To run these tests, you must 

first run the executable which will show the debugger prompt such as:



ObjecTime C Target Run Time System

Release 5.20

Copyright © 1993-1998 ObjecTime Limited



RTS debug: -> Starting without a TO connection



Testing of informational commands:



Test case 4:



enter:			 "step"



expected output:	  step 1

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[9->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[10->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[11->?] UNBOUND!



enter:			 "step"



expected output:	  step 1



enter:			 "go 3"



expected output:	  go 3



enter:			 "saps"

expected output:	SPP TheCheater: 3 SAPs



Pass criteria: You should see the registered SAPS (3 in the case of our model)



Test case 5:



enter:			 "system"

expected output:	TopActor : TopActor(fixed) 0

			. server  : Server(fixed) 1

			. client  : Client(fixed) 2

			. client  : Client(fixed) 3

			. client  : Client(fixed) 4

			. kibitz  : Kibitz(fixed) 5



Pass criteria: you should see the current status of the model. Verify that you see the

               proper strings which consists of <refName>:<className> 

               (< type = fixed >) <actorId> for each actor



Test case 6:



enter:			 "info 2"

expected output:	 ClassName 	: Client

			 ReferenceName 	: client

			 CurrentState 	: Awake

			 Address 	: (Client_InstanceData*)0x37298  <- Address might be different

			 No Actor Probe attached.

			 		

			 End ports:

			     0: clientServerComm



			 SAPs:

			     0: Cheater registered as 'TheCheater'



Pass criteria: this command should list info about a particular actor. Invoke it using the 

               actorId (see system) as a parameter and verify that the printed strings are 

               relevant



Test case 7:



enter:			 "stats 0" or "printstats 0"

expected output:	Thread 0

			 messages[System]      : 0

			 messages[Panic]       : 0

			 messages[High]        : 0

			 messages[General]     : 3

			 messages[Low]         : 0

			 messages[Background]  : 0

			 messages[incoming]    : 0



			 messages[freeExternal]: 1

			 messages[freeInternal]: 97

			 messages[freeTCBs]    : 10

			 messages[activeTCBs]  : 0

			 messages[freeGlobal]  : 99

			

 

Pass criteria: Should normally list 3 General messages if the previous test cases

               were run properly. Both stats and printstats should be tested.



Testing of control commands:

Testing of tracing commands:



(The control and tracing commands are tested concurrently since we need some form of feedback as

to confirm the working of a control command)

Initial setting:

Turn the full logging by entering command 



enter:			 "log allexpected output:     	(debug prompt only)



Test case 8:



enter:			 "step" 



expected output:     	  step 1



			General message

			 to client(Client)<WaitForSynch>.System[0]:hello

			 from server(Server)<S1>.clientServerComm[1]

			 data (void *)0(0x0)



			General message

			 to server(Server)<top>.System[0]:huh

			 from client(Client)<S1>.clientServerComm[1]

			 data (void *)0(0x0)



Pass criteria: Should see the above info.



Test case 9:



enter:			 "go 3expected output:     	  go 3



			General message

			 to client(Client)<WaitForSynch>.System[0]:hello

			 from server(Server)<S1>.clientServerComm[2]

			 data (void *)0(0x0)



			General message

			 to server(Server)<S1>.System[0]:huh

			 from client(Client)<WaitForSync>.clientServerComm[1]

			 data (void *)0(0x0)



   			General message

			 to server(Server)<S1>.System[0]:huh

			 from client(Client)<WaitForSync>.clientServerComm[1]

			 data (void *)0(0x0)



			General message

			 to server(Server)<S1>.System[0]:huh

			 from client(Client)<WaitForSync>.clientServerComm[1]

			 data (void *)0(0x0)



			General message

			 to client(Client)<Awake>.System[0]:notMe

			 from server(Server)<S1>.clientServerComm[2]

			 data (void *)0(0x0)



			General message

			 to client(Client)<Awake>.System[0]:notMe

			 from server(Server)<S1>.clientServerComm[2]

			 data (void *)0(0x0)





Pass criteria: Should see the messages info such as the ones above.



Test case 10:



enter:			 "exit" 



expected output:     	  Task 0 detached

			



Pass criteria: Should get the operating system prompt



Test case 11:

(To execute the following you must invoke the executable again from the operating system

 before you attempt the command if you used the exit of case 10)



enter:			 "quit" 



expected output:     	  Task 0 detached  followed by



*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[9->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[10->?] UNBOUND!

*** Warning: Actor kibitz/Kibitz[5] sending signal Synchronization[2] data 0x0 on port Cheater[11->?] UNBOUND!

 

			

Pass criteria: It should loop indefinitely. If it exits, there is a problem.



Test case 12:

(To execute the following you must invoke the executable again from the operating system

 before you attempt the command if you used the quit of case 14)



enter:			 "trace 4 end 0expected output:     	 0: Port clientServerComm[0] on client : Client 4



enter:			 "go 20" 



expected output:     	  go 20



			General message

			 to client(Client)<WaitForSynch>.System[0]:hello

			 from server(Server)<S1>.clientServerComm[2]

			 data (void *)0(0x0)



			General message

			 to server(Server)<S1>.System[0]:huh

			 from client(Client)<WaitForSync>.clientServerComm[2]

			 data (void *)0(0x0)



  			General message

			 to client(Client)<Awake>.System[0]:notMe

			 from server(Server)<S1>.clientServerComm[2]

			 data (void *)0(0x0)



Pass criteria: Should see the messages same as above



Test case 13:



enter:			 "list" 



expected output:     	 0: Port  clientServerComm[0] on client : Client 4



Pass criteria: Should have the client actor listed as having a probe



Test case 14:



enter:			 "delete 0(zero not O)



expected output:     	  Deleted 0: Port clientServerComm[0] on client : Client 4



enter:			 "list" 



expected output:     	  (debug prompt only)



Pass criteria: Should not see the probe listed anymore



Test case 15:

enter:			 "help" 



expected output:     	  (see section 3 for expected output)



Pass criteria: Should see help text similar to description of section 3



Multi-thread specific test:



Test case 16:

enter:			 "tasks" 



expected output:     	  0: stopped TopActor



Pass criteria: Should see help text similar to description of section 3





enter:			 "exit"

to terminate the test