SunVTS 2.1 Test Reference Manual
  Search only this book
Download this book in PDF
CHAPTER 32

Serial Ports Test (sptest)


sptest checks the system's on-board serial ports (zs[0,1], zsh[0,1], se[0,1], se_hdlc[0,1]), as well as any multi-terminal interface (ALM2) boards (mcp[0-3]). Data is written and read in asynchronous and synchronous modes utilizing various loopback paths.
Intervention Mode must be enabled to run this test. This test is non-scalable.
TABLE 32-1
ModeDescription
Asynchronous TestingThis mode uses the asynchronous communication protocol as described in the zs(7D)and se(7D)man pages. The termio(7I)interface is used for configuring port characteristics.

The user can select the loopback paths to utilize, the amount of data to transfer, and the baud rate to use.

The test writes and reads data through the loopback path and compares the data to the original data. The test starts by sending a single character. If no errors or timeouts are detected, the rest of the data is simultaneously written and read, then compared.

TABLE 32-1 (Continued)
ModeDescription
Synchronous TestingThis mode uses the synchronous hdlc-framing interface as described in the zsh(7D) and se_hdlc(7D) man pages. Data is written and read in checksum-protected packets.

The user can select the loopback paths to use and the clock rate.

The synchronous test runs in three phases:

The first phase looks for activity on the port. If no activity is detected for at least four seconds, the test proceeds to the next phase. If activity is detected sptest exits with an error.

The second phase attempts to send and receive one packet. If no packets are detected after five attempts, the test exits with an error. If a packet is returned, the result is compared to the original. If the length and content of the packets do not match exactly, the test exits with an error.

The third phase attempts to send many packets through the loop. Some packet drops are to be expected especially on a heavily loaded system. The test allows a percentage of the packets to be dropped. The user can set the drop tolerance between 0% and 99%. The default is 20%. If the system is extremely busy then the drop tolerance should be increased. Each packet is compared with its original for length and content. If a mismatch is detected, the test exits with an error.


Synchronous Testing Software Requirements

If you have zs(7D) serial ports on your machine, the synchronous devices may not exist. Look in /dev for zsh[0,1]. If they do not exist you can create them. Verify that the following two lines are in the /etc/devlink.tab file. If they are not there, then add them.

  type=ddi_pseudo;name=zsh zsh\M0  
  type=ddi_pseudo;name=clone;minor=zsh zsh  


CAUTION Caution - The white spaces in the lines above must be a single tab character before and after the zsh variables; using spaces will not work.

When these lines have been added to the /etc/devlink.tab file:
· Change directories to /kernel/drv, and execute the add_drv zsh command.
If this command does not work:
· Execute the rem_drv zsh command and then execute the add_drv zsh command again.

sptest Options

Graphic

FIGURE 32-1 sptest

There are a variety of loopback paths available. The internal loopback paths do not require an external connector. Their availability depends on the device. The zs(7D) device has an internal path for synchronous mode and the se(7D) device has an internal path for asynchronous mode. The external loopback connectors are described in Appendix A. The exact type of loopback connector required depends on the system I/O panel.
Legend: In the following table, a represents port a of the CPU board (motherboard), b represents port b of the CPU board, and the device names of the ports for each CPU board are listed.
TABLE 32-2 sptest
CPU Port Async Device Sync Device
0 a
b
zs0 or se0
zs1 or se1
zsh0 or se_hdlc0
zsh1 or se_hdlc1
1 a
b
zs2
zs3
zsh2 *
zsh3 *
2 a
b
zs4
zs5
zsh4 *
zsh5 *
* Currently, only zsh0 and zsh1 are supported by device drivers.


TABLE 32-3 sptest
sptest OptionsDescription
Test TypeSelects how the test will run. Test options include: · a= runs the test on port a

· b= runs the test on port b

· a_b= runs the test on ports a and b sequentially · a_b_concurrent= runs the test on port a and port b concurrently

Test ModeSelects the mode to put the serial device into before running the test. The modes available are asynchronous, synchronous or both. When both is selected, the test runs in asynchronous mode then synchronous mode
Loopback TypeSelects the loopback test. Options include: ·Internal is an internal path for a, b, a_b, and a_b_concurrent test types

·Plug_a_to_a__b_to_b is an external loopback plug for a, b, a_b, and a_b_concurrent test types

·no_modem_a_to_b is an external loopback cable for a_to_b and a_to_b_concurrent test types

·Modem_a_to_b is an external loopback cable with a modem attached to generate synchronous Transmit and Receive clocks. This type is only available in synchronous test mode

TABLE 32-3 sptest
sptest OptionsDescription
Data TypeSelects the data pattern to transfer. The user can select:
·Random
·Sequential
·Alphanumeric
·0x00-0xff
Async Baud RateSelects the baud rate for asynchronous mode testing. The valid rates are: 110, 300, 600, 1200, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200, 460800, and ALL. The default rate is 9600 baud. Some platforms can only support up to 38400 or 76800. The test will return an error if you try to use a higher baud rate then is supported. For baud rates greater then 153600 the serial line drivers must be set for RS-423 mode and not RS-232 mode. The RS-423 and RS-232 modes are usually selected by a hardware jumper on the motherboard. Consult your hardware installation manual for more information.
Async Block SizeSelects the size (in bytes) of each write. This can range from 1 to 10000. The default is 100. If it is larger than the async size it will be truncated to the async size.
Async Data SizeSelects the total number of bytes to transfer in asynchronous mode. This can range from 1 to 10000.
Async ParitySelects the parity to use in asynchronous mode. The user can select even, odd, or none. The default is none.
Async Flow ControlSelects the type of flow control to use in asynchronous mode testing. The user can select Hardware (RTS/CTS), Software (XON/XOFF) or None. The default depends on the loopback type. Software flow control is not allowed on a, b, a_b, or a_b_concurrent loopback types.
Sync Baud RateSelects the device generated clock rate for synchronous mode testing. The valid rates are from 110 to 230400. The rate does not have to be a specific value as required for async mode baud rates. The default rate is 9600. Some platforms can only support up to 38400 or 76800. The test will return an error if you try to use a higher rate then is supported. For rates greater then 100000 the serial line drivers must be set for RS-423 mode and not RS-232 mode. The RS-423 and RS-232 modes are usually selected by a hardware jumper on the motherboard. Consult your hardware installation manual for more information.
Sync Packet Drop ToleranceSelects the tolerance level of synchronous mode dropped packets during the many_packets subtest. The default is 20%. The valid range is from 0% to 99%. Some packet drops are expected especially at higher clock rates and on a heavily loaded system.
TABLE 32-3 sptest
sptest OptionsDescription
Sync Poll CountSelects the number of seconds in additional time to wait for a synchronous mode packet to be sent. Additional time may be needed when there is heavy system activity and tim-outs are being detected. In general, the user can decrease the value to 0 when the system load is light or increase the value when there is a heavy system load.

sptest Test Modes

sptest supports all three SunVTS test modes.
TABLE 32-4 sptest
Test ModeDescription
Connection TestIn this mode, the sptest tries to open the port to determine if the device is connected. If it fails and the port is not busy, the test exits with an error. If it is successful or fails with a busy or exclusive use error, then the port is considered connected, and the test passes
Functional TestIn Functional test, sptest performs the selected loopback test

If you invoke SunVTS through SyMON, the following Functional Test description applies: sptest tries to minimize the impact on the application being tested. The Online test runs in synchronous and asynchronous modes. If the device supports an internal loopback then the functional test is run utilizing the internal loopback. The zs(7D) device supports an internal synchronous loopback and the se(7d) device supports an internal asynchronous loopback


sptest Command Line Syntax

/opt/SUNWvts/bin/sptest standard_arguments -o
dev=device_name,porta=first_port_name,T=port,L=loopback_type,M=mode,D=data_pat
tern,AB=async_baudrate,BS=async_write_size,S=async_total_size,PAR=parity,F=flow_cont
rol,B=sync_speed,DP=sync_drop_tolreance,P=sync_timeout

TABLE 32-5 sptest
ArgumentExplanation
dev=device_nameSpecifies which serial port(s) to test. There is no default value; you
must specify a device name such as:
se0,
zs0, zs1
zs2, zs3
..., ...
porta=port_nameThe name of the first device of a serial device pair. The default is a.
M=modeThe default test mode is asynchronous. Specify one of the following
modes:
asynch
synch
both
T=test_typeSpecifies the type of test to run:
· a= runs the test on port a
· b= runs the test on port b
· a_b= runs the test on ports a and b sequentially
· a_b_concurrent= runs the test on port a and port b concurrently
· a_to_b= runs the test from port a to port b
L=test_loopbackType of loopback connector attached to ports:
No_modem_a_to_b
Internal_a_to_a__b_to_b
Plug_a_to_a__b_to_b
Modem_a_to_b
D=data_patternSelects the data pattern to transfer. The user can select:
Random
Sequential
Alphanumeric
0x00-0xFF
AB=baud_rateAsynchronous baud rate (default = 9600). The valid values are between 110 - 460800.

Note: Some platforms can only support asynchronous baud rates up to 38400 or 76800. For baud rates greater then 153600 the serial line drivers must be set for RS-423 mode and not RS-232 mode.

TABLE 32-5 sptest(Continued)
ArgumentExplanation (Continued)
BS=write_sizeAsynchronous mode write size; from 1 to 10000 bytes.
S=sizeAsynchronous mode total number of bytes to write. 1 to 10000 bytes.
PAR=parityAsynchronous mode parity type:
None
Even
Odd
F=flow_control and
default
Asynchronous mode flow control
Hardware (RTS/CTS)
Software (xon/xoff)
None
B=baud_rateSynchronous baud rate (default = 9600). The valid rates are between 110 - 256000.

Note: Some platforms can only support synchronous rates up to 38400 or 76800. For rates greater then 100000 the serial line drivers must be set for RS-423 mode and not RS-232 mode.

DP=drop_toleranceSynchronous mode drop packet tolerance (default=20%)
P=poll_secondsSynchronous mode additional wait time during poll (in seconds).

sptest Error Messages

TABLE 32-6 sptest

Error MessageProbable Cause(s)Recommended Action
6003data miscompare, cnt = <number>, exp =System load too heavy for selected baud rateReduce the system load.

<value>, obs = <value>,
receive device =
<name>, source device =
Loopback connection
defective
Lower the baud rate.

<name>, baud rate =Bad serial port hardwareCheck loopback connection.

<value>

System software errorIf the problem persists, contact your authorized Sun service provider.
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
6011<name>: packet readSystem load too heavyReduce the system load.

failed, error = <error_message>, speed = <number>Loopback connection missing or defectiveCheck loopback connection.
Bad serial port hardwareprovider.If the problem persists, contact your authorized Sun service
6012your authorized Sun serviceprovider.
6013
Bad serial port hardwareprovider.If the problem persists, contact your authorized Sun service
6016
Bad serial port hardwareIf the problem persists, contact your authorized Sun service
System software error
provider.
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
6018<name>: port not readySystem load too heavyReduce the system load.

for writing after <number> seconds, speed = <number>Loopback connection missing or defectiveCheck loopback connection.
Bad serial port hardware..If the problem persists, contact your authorized Sun service
System software error
provider.
6020packet data miscompare,System load too heavyReduce the system load.

cnt = <number> exp =
<value>, obs = <value>,
device = <name>, speed =
Loopback connection
defective
Check loopback connection.
<number>
Bad serial port hardware
If the problem persists, contact your authorized Sun service
System software error
provider.
6021<name>: port not readySystem load too heavyReduce the system load.

for reading after <number> seconds, no data available, speed =Loopback connection missing or defectiveCheck loopback connection.
<number>
Bad serial port hardware
If the problem persists, contact your authorized Sun service
System software error
provider.
6022<name>: port not readySystem load too heavyReduce the system load.

for writing after <number> seconds, wrote <number> bytes out ofLoopback connection missing or defectiveCheck loopback connection.
<number>. Baud rate =
Bad serial port hardware
If the problem persists, contact
<number>
your authorized Sun service
System software error
provider.
8001Test Type a_to_b is not
allowed on Quick Test!
8002<name>: open() failed,
error = <error_message>
8003Invalid Data Type:
I=<text>
8004<name>: poll() error,
(revents & (POLLERR |
POLLHUP | POLLNVAL)) =
<value>
8005Siemens serial device
(se) does not support
synchronous internal
loopback test
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
8006Invalid port parameter:
<name>


8007Invalid device name '<name>', must specify either zs<X> or se<X>, where X is the first instance number of a device pair (ex., zs0)

8009Failed ioctl <name>, device = <name>, error = <error_message>

8010<name>: Not able to push Tty compatibility STREAMS module

8011Invalid Test Type: T=<name>

8012Invalid Mode: M=<name>

8013<name> device does not exist

8014Invalid baud_rate: <number>

8015write() to <name> failed: <error_message>, baud rate = <number>

8016read() to <name> failed: <error_message>, baud rate = <number>

8017Invalid size, requested = <number> bytes, min = <number>, max <number>

8018Could not open <name> after waiting <number>Another process is using the portStop other process using the port.
seconds
Port is hung
If the problem persists, contact your authorized Sun service
Bad serial port hardware
provider.
System software error
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
8021<name>: No validSystem load too heavyReduce the system load.

packets returned after <number> attempts, last error = <error_message>,Timeout too shortIncrease Sync_Poll_Count from pop menu.

wrote <number> packets,
read <number> packets,
Loopback connection missing
or defective
Check the loopback connection.
device accounting shows
<number> packets sent and

Bad serial port hardware..If the problem persists, contact
<number> packets received
your authorized Sun service
System software error
provider.
8022printdlprim: unsupported
primitive type <value>


8023stringtoaddr: invalid
input string: <text>


8025dlinfoack: response ctl.len too short: <number>

8026dlinfoack: DL_INFO_ACK was not M_PCPROTO

8027dlokack: response ctl.len too short: <number>

8028dlokack: DL_OK_ACK was not M_PCPROTO

8029dlerrorack: response ctl.len too short: <number>

8030dlerrorack: DL_OK_ACK was not M_PCPROTO

8031dlbindack: response ctl.len too short: <number>

8032dlbindack: DL_OK_ACK was not M_PCPROTO

8033sigalrm: TIMEOUT

8037invalid packet length: <number>

8038<name>: poll() failed,System load too heavyReduce the system load.
error = <error_message>
Bad serial port hardware
If the problem persists, contact your authorized Sun service
System software error
provider.
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
8039Failed I_STR ioctl, cmd = <name>, device = <name>, error = <error_message>

8040<name>: No packetsNo transmit clock presentReduce the system load.

sent, last error = <error_message>, wrote <number> packets, readSystem load too heavyIncrease Sync_Poll_Count from the pop menu.

<number> packets, device

Timeout too shortCheck the loopback connection.
accounting shows <number>
packets sent and <number>

Loopback connection missing If the problem persists, contact
packets received
or defective
your authorized Sun service provider.
Bad serial port hardware
System software error
8041Sporadic packets detected on <name>. The port mustAnother process is generating activity on the portStop other process using the port.
be quiescent before
Bad serial port hardware
Stop other process using the port.
System software error
8042syncinit: <name> missing
minor device number
8046Test requires local or
remote modem loopback
(external data loop,
external clocking)
8047<name> loopback type
not allowed on Connection
test
8048<name> loopback type
not allowed on online
mode
8049Invalid baud rate for
device <name>, select
between <number> and
<number>
8050<name> internal loopback
test not allowed on
<name> device
8051Thread creation failed,
<error_message>
TABLE 32-6 sptest(Continued)

Error MessageProbable Cause(s)Recommended Action
8054<name>: At least <number>System load too heavyReducethe system load.

packets dropped (tolerance = <number>), last error =Loopback connection missing or defectiveIncrease the drop tolerance option.

<error_message>. WroteBad serial port hardwareCheck the loopback connection.

<number> packets, read <number> packets. Device statistics shows <number> packets sent and <number> packets received. <number> packets dropped in outbound queueing, <number> packets dropped in inbound queueingSystem software errorIf the problem persists, contact your authorized Sun service provider.
8055<name>: <number> badSystem load too heavyReduce the system load.

packets received, last error = <error_message>, wrote <number> packets,Loopback connection missing or defectiveCheck the loopback connection.
read <number> packets,

Bad serial port hardware

device accounting shows <number> packets sent and
If the problem persists, contact your authorized Sun service
System software error
provider.
<number> packets received