C H A P T E R  54

SunHSI Board Test (sunlink)

sunlink Description

The sunlink test verifies the functionality of the SBus and PCI bus SunHSItrademark boards by using the HDLC protocol. sunlink initializes and configures the selected channel.

Next, sunlink opens a datagram socket and tries to modify the socket to accept ioctl communications with the driver, and receive synchronous mode information from it.

sunlink then opens the ports, linking the upper and lower layers with ioctl calls. After initialization, this test checks for activity before attempting to send or receive data. An error message is returned if activity is detected. Otherwise the transmit buffer is filled with random data. Random data is used by default. You may also specify other patterns. The data is then transmitted. If the transmission succeeds, sunlink then receives the returned data and verifies that it is identical to what was sent. Finally, statistics about the send and receive are gathered from the socket.

A full sunlink test takes approximately eight minutes per port and makes a brief check of the board ports before the actual test begins. If the port is bad, the test immediately aborts and returns an error message.

sunlink Test Requirements

This test will not pass unless you install the correct loopback connectors or port-to-port cables on the ports you are testing. The ports specified for test in the Options dialog box must have loopback connectors attached. See Appendix A for loopback connector part numbers and wiring instructions.

sunlink Options

To reach the following dialog box, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system, might not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.

The Configuration field displays the available ports. (See TABLE 54-1.)

FIGURE 54-1 sunlink Test Parameter Options Dialog Box

Screenshot of the sunlink Test Parameter Options dialog box


TABLE 54-1 sunlink Options

sunlink Options


Clock source

Selects either the onboard clock or an external clock for use when using sunlink. To use the external clock option, the transmit, receive, and clock data lines must be physically looped back.

Internal Loopback

Enables or disables internal loopback tests. Internal Loopback is only needed when the Loopback setting is not port-to-port, and the clock source is onboard.

Baud Rate

Specifies the bit rate transfer speed from 9600 bauds to 2.048 Mb/sec.


Specifies the loopback type--simple single external port loopback, multiple external port loopback, and port-to-port external loopback.

sunlink Loopback Connectors

Refer to Appendix A of this manual for information on SunLinktrademark loopback cables and loopback connectors. Refer to the High Speed Serial Interface hardware manuals for information on null modem cables.

sunlink Test Modes

TABLE 54-2 sunlink Supported Test Modes

Test Mode



Runs the full set of tests.

sunlink Command-Line Syntax

/opt/SUNWvts/bin/sunlink standard-arguments -o dev=device-name,p=port, P=data-pattern,brate=speed-n,I,C=clocksource

TABLE 54-3 sunlink Command-Line Syntax




Specifies the device to be tested.

Use hih0 for the HDLC protocol.


Specifies the port number to be tested.


Specifies the data-pattern as one of the following:

  • c--Character (0x55)
  • i--Incrementing
  • d--Decrementing
  • r--Random (default)


Specifies the bit rate transfer speed from 9600 bs to 2.048 Mb/sec.


Enables internal loopback for HSI.


Specifies the clock source value as one of the following:

  • B--Onboard clock source
  • E--External clock source

The following is typical command-line syntax for testing a SunHSI board:

# /opt/SUNWvts/bin/sunlink -o dev=hih0,P=0+1+2+3,brate=100000

This command tests the internal loopback for ports 0, 1, 2, and 3. It does not run for the port-to-port internal loopback test.