Creating and Editing Generic Option Files for Advanced Users
|
This appendix provides detailed information about the generic option file. This information is provided to enable users to create or edit a generic option file.
To create a custom generic option file, it is recommended to start with one that is created from a GUI such as CDE. The generic option file is in XML format, and can be edited with any text editor. The following example provides a sample generic option file that uses comments to describe the structure of generic option files:
Note - Use XML comments when you edit a generic option file. All XML comments should strictly start with <!-- and should strictly end with -->. XML syntax does not allow ---> as a legal comment terminator (because of 3 dashes). A space followed by --> is required to terminate XML comments.
|
The following is an example of a host-independent generic option file:
<?xml version="1.0" ?>
<!-- This is SunVTS Generic Option file in xml format.
To edit this file, refer to SunVTS Userguide Manual. -->
<vts_options>
<vts_info fmt_version="1.0" vts_version="6.1"
src_hostname="myhostname"
description="First Generated on Thu Apr 11 02:08:57 2002" />
<!-- assert action is used to abort loading if the current
mode is not an expected mode e.g. offline, etc.
The assert action used only for cumulative mode load. -->
<action name="assert" args="mapping logical" />
<action name="assert" args="tmode offline" />
<system_options>
<option name="system_override" value="enable" />
<option name="system_concurrency" value="0" />
......
......
</system_options>
<!-- Example Test: nettest -->
<test name="nettest" >
<args_format>
<arg name="target" label="Target Host" op_type="TEXT"
default="" size="48" />
<arg name="test" label="Test_Type" op_type="INC_CHOICE"
default="Random+Increment+Pattern"
choices="Random,Increment,Pattern" />
<arg name="timeout" label="Receive_Timeout"
op_type="NUMERIC"
default="120" min="1" max="600" />
<arg name="warn" label="Print_Warning" op_type="TOGGLE"
default="Disable" choices="Enable,Disable" />
</args_format>
<std_options>
<option name="status" value="enabled" />
<option name="max_passes" value="0" />
<option name="max_errors" value="1" />
<option name="max_time" value="0" />
<option name="number_of_instances" value="2" />
<option name="processor_affinity" value="unbound" />
</std_options>
<!-- The instance tag can be omitted and test_args tag
can appear directly inside test tag if options are same
for all instances. -->
<instance number="0">
<!-- Specify arg by name or label. Both are legal. -->
<test_args>
<arg name="target" value="" />
<arg name="test" value="Random+Increment+Pattern"/>
<arg name="timeout" value="60" />
<arg name="warn" value="Enable"/>
</test_args>
</instance>
<instance number="1">
......
</instance>
</test>
</vts_options>
|
The following is an example of a simple generic option file. When this file is loaded, only one hardware test option is cumulatively configured.
<?xml version="1.0" ?>
<vts_options>
<action name="assert" args="tmode offline" />
<test name="nettest" >
<test_args>
<arg name="timeout" value="75" />
</test_args>
</test>
</vts_options>
|
C.1 Main Components Overview
This section provides a brief overview of the main components of a the generic options file. The following list specifies the main classes and tags used for the generic options file specification components:
-
Actions Specifications -- Use <action ... /> tag
-
System Level Options -- Use <system_options> ... </system_options> tags
-
Test Level Options - logical and physicalUse <test ...> ... </test> tags
-
Group Level Options - logical and physicalUse <group ...> ... </group> tags
-
Device Level Options - logical and physicalUse <device ...> ... </device> tags
-
Instance Level Options - logical and physicalUse <instance ...> ... </instance> tags
-
Standard Options - logical and physicalUse <std_options> ... </std_options> tags
-
Option Specifications - logical and physicalUse <option .... /> tag
-
Test Program Arguments Options - logical and physicalUse <test_arg> <arg ... /> ... </test_arg> tags
C.1.1 Top Level Components
Out of the preceding list of components, the actions specifications, system level options, test level options, and group level options could appear at the top level immediately inside the <vts_option> tags. These top level tags could appear in any order within the <vts_option> tags.
C.1.2 Group Level Options
The group refers to either a logical group or a physical group (depending on the current display mapping) under which tests devices are displayed in UI. Group level options could contain standard options, test level options, and another group level options. Note that nested groups appear in physical mapping display.
C.1.3 Instance Level Options
Instance level options should appear inside test level or device level options. If the same options should be applied to all instances, the instance tags should not be specified.
C.1.4 Device Level Options
Device level options, if present, should always appear inside the test level option. If the options to be applied should be the same for all devices for a specific test, device tags should not be specified.
C.1.5 Test Level Options
Test level options can contain standard options, device level options, instance level options, and test program arguments options. If test program arguments options appear immediately inside the <test> tag, then those options are applied for all devices for that test and to all instances for these devices.
C.1.6 The Standard Options
The standard options tag <std_options> could appear inside test level, device level, or group level option tags. The only tag that can appear inside the standard options tag is the <option .. /> tag. Depending on where the standard options appear (inside test, group, device, or instance), the legal values for <option ... /> use will be restricted. The legal values for <option ... /> are described in the subsequent sections.
C.1.7 Option Specification
The option specification <option ... /> tag should appear inside <std_options> or inside <system_options>. When it appears inside <system_options>, only the options described in the table for system options are allowed. When it appears inside <std_options> the corresponding tables describe the legal options allowed depending on the context.
C.1.8 Option Descriptions for Standard Options
The legal values for the option tag <option ... />, which appears inside <std_options> are different depending on the context:
C.1.9 Test Program Arguments Specification
The <test_args> could either appear immediately inside the <test>, <device>, or <instance> tags.The hardware test program arguments could be specified in the following format:
<test_args>
<arg name=arg_name value=value />
<arg name=arg_name value=value />
<arg label=label value=value />
<arg ... />
...
</test_args>
|
To specify the program argument option, only one attribute of name or label needs to be specified. The arg option value is either specified by name or by the corresponding label for that option. The label is the one which is displayed for the corresponding test option in the UI.
C.1.10 File Header
The first line should be:
The preceding line is required for all XML format files. The rest of the option file should be enclosed within <vts_options> and </vts_options> tags. Immediately after the start <vts_options>, the <vts_info> tag is optional. If specified, this tag will be used to check against the file format version that is provided through fmt_version attribute. Currently only version 1.0 generic option file format is supported. The other attributes of <vts_info> exist only for informational purposes.
C.1.11 Actions Specification
The format of actions specification is: <action name="action_name" args="action_args">. The following table lists the supported action_name and action_args:
TABLE C-1 Supported action_name and action_args
Action Name
|
Action Args
|
Description
|
set
|
"mapping logical"
|
Switch to logical mapping display.
|
set
|
"mapping physical"
|
Switch to physical mapping display.
|
set
|
"tmode offline"
|
Switch to offline or functional test mode.
|
set
|
"tmode online"
|
Switch to online test mode.
|
set
|
"tmode connection"
|
Switch to connection test mode.
|
set
|
"tmode exclusive"
|
Switch to exclusive test mode.
|
select
|
path_name
|
Path name of test or group to be selected. For example, "/" for path name selects all.
|
deselect
|
path_name
|
Path name of test or group to be deselected. For example, "/" for path name deselects all.
|
assert
|
"mapping logical"
|
If the current display mapping is not logical, the option file loading will abort. Typically useful in a cumulative load.
|
assert
|
"mapping physical"
|
To assert that the current mapping is physical; if not, abort.
|
assert
|
"tmode offline"
|
To assert that the current mode is offline or functional; if not, abort.
|
assert
|
"tmode online"
|
To assert that the current mode is online; if not, abort.
|
assert
|
"tmode connection"
|
To assert that the current mode is connection; if not, abort.
|
assert
|
"tmode exclusive"
|
To assert that the current mode is exclusive; if not, abort.
|
C.1.12 System Level Options
System level options are specified in the following format:
<system_options>
<option name="option_name" value="option_value" />
<option name="option_name" value="option_value" />
....
</system_options>
|
The following table lists the supported system level option names and values:
TABLE C-2 Supported System Level Option Names and Values
Category
|
Option Name
|
Option Value
|
Description
|
Global
|
intervention
|
"enable" or "disable"
|
Either enables or disables intervention mode.
|
Threshold Options
|
max_system_passes
|
0 or positive number
|
Maximum number of system passes before stopping. 0 for unlimited. The definition of a system pass is when all selected tests have run one time.
|
max_system_errors
|
0 or positive number
|
Maximum number of system errors before stopping. 0 for unlimited.
|
max_system_time
|
0 or positive number
|
Maximum number of minutes for testing before stopping. 0 for unlimited.
|
Notify Options
|
send_email
|
"disabled", "now", "on_error", "periodically", or "on_error&periodically"
|
Description in the same order: Disable sending email; or Send e-mail now; or only on error; or send e-mail with time period set in log_period option; or send email periodically and on error.
|
email_address
|
"e-mail-addr"
|
E-mail address where the test status messages are sent to. "root" by default.
|
log_period
|
0 or positive number
|
Specifies time in minutes between sending test status email. Use 0 to disable.
|
Schedule Options
|
auto_start
|
"enable" or "disable"
|
If enabled, SunVTS testing will start automatically when invoked without the need to press the start button.
|
single_pass
|
"enable" or "disable"
|
If enabled, runs only one pass of each selected test.
|
system_concurrency
|
0 or positive number
|
Maximum number of test instances that can run concurrently. 0 means unlimited.
|
group_concurrency
|
0 or positive number
|
Maximum number of test instances that can run concurrently in the same group. 0 means unlimited.
|
Advanced Options
|
system_override
|
"enable" or "disable"
|
If enabled, the system level options supersede the group-specific, test-specific, and device-specific option settings in favor of the options set at the system level. By default, it is enabled.
|
group_override
|
"enable" or "disable"
|
If enabled, group level options supersede the test level and device level options in favor of the group options. The system override option supersedes this option. By default, it is enabled.
|
group_lock
|
"enable" or "disable"
|
If enabled, protects specific group options from being changed from the options set at the system level. The System Override option supersedes this option. By default, it is disabled.
|
test_lock
|
"enable" or "disable"
|
If enabled, protects specific device level options from being changed from the options set at the test level, group level, or system level. The System Override and Group Override options supersede this option. By default, it is disabled.
|
Test Execution Options
|
See Descritpion
|
See Description.
|
The test execution options could appear in system level, group level, test level, or device level. See for a description of the test execution standard options.
|
C.1.13 Group Level Standard Options
Group level standard options are specified in following format:
<group>
<std_options>
<option name="option_name" value="option_value" />
<option name="option_name" value="option_value" />
....
</std_options>
</group>
|
The following table provides a list of supported group level standard options:
TABLE C-3 Supported Group Level Standard Options
Category
|
Option Name
|
Option Value
|
Description
|
General
|
status
|
"enable" or "disable"
|
Either enables or disables all the devices in the group
|
Schedule Options
|
group_concurrency
|
0 or positive number
|
Maximum number of test instances that can run concurrently in this group. 0 means unlimited.
|
Advanced Options
|
group_override
|
"enable" or "disable"
|
If enabled, group level options supersede the test level and device level options in favor of the group options. The system override option at the system level supersedes this option. By default, it is enabled.
|
group_lock
|
"enable" or "disable"
|
If enabled, protects specific group options from being changed from the options set at the system level (the system override option at the system level supersedes this option.) By default, it is disabled.
|
test_lock
|
"enable" or "disable"
|
If enabled, protects specific device level options from being changed from the options set at the test level, group level, or system level. (the system override option at the system level and group override options supersede this option.) By default, it is disabled.
|
Test Execution Options
|
See description
|
See description
|
The test execution options could appear in either the system level, group level, test level, or device level. See for a description of the test execution standard options.
|
C.1.14 Test and Device Level Standard Options
The standard options in the test level are specified in the following format:
<test name=test_name >
<std_options>
<option name="option_name" value="option_value" />
<option name="option_name" value="option_value" />
....
</std_options>
.....
</test>
|
The standard options in the device level are specified in the following format:
<test name=test_name >
<device name=device_name >
<std_options>
<option name="option_name" value="option_value" />
<option name="option_name" value="option_value" />
....
</std_options>
</device>
.....
</test>
|
The legal standard options for the test level and device level are the same. The test level standard options are applied to all devices being tested by that test. The device level standard options are applied to only the specified device.
TABLE C-4 Test and Device Level Standard Options
Category
|
Option Name
|
Option Value
|
Description
|
General
|
status
|
"enable" or "disable"
|
When specified at the test level, enables/disables testing for all devices for that test. When specified at the device level, enables/disables testing on the specified device.
|
AdvancedOptions
|
test_lock
|
"enable" or "disable"
|
If enabled, protects specific device level options from being changed from the options set at the test level, group level, or system level. The system override at the system level and group override options supersede this option. By default, it is disabled.
|
Test Execution Options
|
See Description
|
See Description
|
The test execution options could appear in system level, group level, test level, or device level. See for a description of the test execution standard options.
|
C.1.15 Instance Level Standard Options
The instance level stdandard options are specified in following format:
<test name=test_name >
.....
<instance>
<std_options>
<option name="option_name" value="option_value" />
</std_options>
....
</instance>
.....
</test>
|
The only instance level standard option allowed is processor_affinity. For the description of processor_affinity option, refer to .
C.1.16 Test Execution Standard Options
The test execution options could appear at the system level, group level, test level, or device level. Depending on the different override options enabled or disabled, test execution options at certain levels override the options specified in another level. The following table describes the test execution valid option names and values.
TABLE C-5 Test Execution Standard Options
Option Name
|
Option Value
|
Description
|
verbose
|
"enable" or "disable"
|
Displays verbose messages in the SunVTS messages window.
|
core_file
|
"enable" or "disable"
|
If enabled, creates a core file when a test session results in a core dump.
|
run_on_error
|
"enable" or "disable"
|
If enabled, SunVTS continues to run until the max errors value is reached. If disabled, irrespective of max errors, SunVTS stops testing on encountering first test failure. When run_on_error is enabled, the tests are also invoked with a run on error flag.
|
max_passes
|
non-negative-number
|
Number of test passes before stopping. Default 0 means unlimited.
|
max_errs
|
non-negative-number
|
Number of test errors before stopping. Default 0 means unlimited.
|
max_time
|
non-negative-number
|
Time limit in minutes before stopping. 0 means there is no time limit.
|
max_delay
|
non-negative-number
|
Specifies, in seconds, the amount of time to pause between execution of a test. Valid range is between 0 to 60. By default, 0 performs no delay.
|
number_of_instances
|
non-negative-number
|
Specifies number of instances to run each scalable test.
|
processor_affinity
|
unbound, sequential, or processor-id
|
Specifies how the instances of the test should bind to different processors. Applicable only in multi-processor systems. unbound is the default and does not bind the test instances to any processor. sequential binds all the test instances to different processors in the system as the test processes are created. Even if the number of processors is higher than instances, the sequential binding will eventually bind test instances to all the processors one after another as the test passes and progresses. Specifiying a processor-id (non-negative-number) binds the test instance(s) to a specific processor.
|