KCMS Test Suite User's Guide

Chapter 4 KCMS Test Script Descriptions

In This Chapter

This chapter describes each test script in the KCMS test suite. The chapter groups the test scripts into the categories listed in Table 4-1 and presents them in the order shown (that is, loading profiles is presented first, connecting profiles second, and so forth).

Test Script Categories

Table 4-1 shows the KCMS API function name and the corresponding script command name that is used by the kcmstest utility. When describing a function being performed, this chapter uses the test script command name.

Table 4-1 Test Script Categories

Category 

KCMS "C" API Function  

Script Command 

Loading profiles 

KcsLoadProfile()()

LOAD:

Connecting profiles 

KcsConnectProfile()()

CONNECT:

Evaluating profiles 

KcsEvaluateProfile()()

EVAL:

Optimizing profiles 

KcsOptimizeProfile()()

OPTIMIZE:

Modifying load hints 

KcsModifyLoadHints()()

See "Cross-Category API Functions And Script Commands" .

Saving profiles 

KcsSaveProfile()()

See "Cross-Category API Functions And Script Commands" .

Getting attributes 

Setting attributes 

KcsGetAttribute()()

KcsSetAttribute()()

GETATTR:

SETATTR:

Updating profiles 

KcsUpdateProfile()()

UPDATE:

Freeing profiles 

KcsFreeProfile()()

See "Cross-Category API Functions And Script Commands" .

Enhancements 

No particular function; tests new features and bug fixes 

 

Cross-Category API Functions And Script Commands

The KcsAvailable()(), KcsCreateProfile()(), KcsFreeProfile()(), KcsModifyLoadHints()(), KcsSaveProfile()(), and KcsSetCallback()() functions in the KCMS framework API are not addressed directly as a testing category in a single script. Each of these functions is exercised in the course of performing normal testing.

In addition, the LOG: command is not associated with a particular KCMS API function. Instead it serves to show comment data in the test scripts.

Table 4-2 Testing the SAVE: Command

Category 

Script Name 

Connecting Profiles 

IC_conerr.scr

Getting and Setting Attributes 

IC_attr1.scr

Updating Profiles 

IC_update1.scr, IC_update2.scr

Enhancements 

IC_gray.scr, IC_pacbug.scr, IC_sun_update.scr, IC_updatewin.scr, IC_xprofilesav.scr, IC_xprofilesavremote.scr, IC_xprofilesavroot.scr

For More Information on API Functions

This chapter summarizes the testing of the KCMS API functions. Operation of a function is described only where it is necessary to describe the associated testing. For a detailed function descriptions, see the KCMS SDK manual KCMS Application Developer's Guide.


Note -

Many of the images resulting from EVAL: calls are not saved. This is only to limit the amount of disk space used by the test suite. See "EVAL: Keywords and Values" (ImageOut= keyword) for details on how to save the resulting image.


Loading Profiles

Load All Now

Script Name

IC_lana.scr

Concept

IC_lana.scr loads an arbitrarily large number of profiles and verifies that profiles can be connected and an image evaluated.

Description

This script demonstrates that the KCMS framework can load and maintain several profiles in memory at the same time. The load hint specified in each of the load commands is AllNow. (See Table 3-11 for the LOAD: command LoadHint= keyword values and the corresponding load hints.) The type of profiles loaded varies (monitor, printer, scanner, color space). The script first loads all the profiles, after which it performs some simple operations such as CONNECT: and EVAL: to demonstrate that the framework can operate under these conditions. Then all the profiles are freed from memory with the FREE: command.

Verification

Each command is expected to return a successful status. Examine the test images output by the EVAL: command. Do not make color quality evaluations unless you have the appropriate devices to do so.

Load Many

Script Name

IC_lmany.scr

Concept

IC_lmany.scr performs many loads but with few profiles in memory at any one time. It confirms that subsequent profile-related operations can be performed successfully.

Description

This script demonstrates that the KCMS framework can load many profiles in succession while the framework continues to operate without error. The type of profiles loaded vary (monitor, printer, scanner, color space), and the profiles are loaded with the AllNow load hint. (See Table 3-11 for the LOAD: command LoadHint= keyword values and the corresponding load hints.) In general, the script simply loads the profiles and immediately frees them. After loading and freeing 100 profiles, it loads more profiles, connects them, and evaluates some images. Then it frees the profiles with the FREE: command.

Verification

Each command is expected to return a successful status. Examine the test images output by the EVAL: command. Do not make color quality evaluations unless you have the appropriate devices to do so.

Load Hints Test

Script Name

IC_lhints.scr

Concept

IC_lhints.scr loads profiles, varying the load hints applied. It performs subsequent operations, verifying that all parts of a profile required for an operation get automatically loaded if they were not specified in the load hints.

Description

This script demonstrates that the KCMS framework can perform a LOAD: command with a variety of load hints applied. The script performs additional functions to verify the automatic loading of profiles. For example, when a profile is loaded specifying attributes only, it is expected that a CONNECT: command can complete successfully without having to manually load the remainder of the profile. The type of profiles loaded vary (monitor, printer, scanner, color space). The load hints are broken down into categories similar to the ones in the KCMS Application Developer's Guide (that is, what, how, when, and where to load and unload a profile). The script mixes these various load hint categories and loads several profiles. After these operations are completed all the profiles are freed from memory.


Note -

The operation load hints forward, reverse, simulate, and gamut have no effect in the LOAD: command. Unless attributes only is specified, all available transformations are loaded. Even if attributes only is specified, KcsConnectProfiles()()automatically loads all the transformations. This is provided, however, for CMM developers who provide these capabilities in their CMMs.


The script performs the following operation sequence:

  1. It loads scanner and monitor profiles specifying various load hints. It attempts to connect the profiles.

  2. It loads scanner and printer profiles, specifying load when needed, unload when needed, and the image content hint settings. It attempts to connect the profiles, specifying the forward transformation. It verifies that the profile can be connected.

  3. It loads monitor and printer profiles, specifying the graphics content hint. It connects the profiles, specifying forward and graphics. It evaluates an image using this complete transformation and verifies success.

  4. It loads scanner and monitor profiles, specifying the content unknown hint. It connects the profiles, specifying forward and unknown. It evaluates using this complete transformation and verifies success.

  5. It loads a PhotoCD profile, specifying attributes only. It gets all the profile attributes.

  6. It loads scanner, monitor, and printer profiles, specifying the content unknown hint. It creates complete transformations for each of the following paths and evaluates using these transformations:

    1. scanner ->printer (forward)

    2. printer -> monitor reverse)

    3. monitor->printer->monitor (simulate)

To save disk space, it does not output the images resulting from the EVAL: commands. This can be changed if you have enough disk space on your system. See "EVAL: Keywords and Values" (ImageOut= keyword) for details on how to save the resulting image.


Note -

To date, profiles with an image, graphics, or a content unknown hint are not available. Since image, graphics, and colorimetric content hints execute the same code anyway, these tests should complete successfully. This is provided, however, for CMM developers who provide this functionality in their CMMs.


Verification

All commands are expected to return successfully.

Connecting Profiles

Connect Profiles

Script Name

IC_connect.scr

Concept

IC_connect.scr connects various types of device profiles into complete profiles. It evaluates using the complete profiles.

Description

This script demonstrates that the KCMS framework can connect a variety of profiles in a variety of ways. It loads profiles of the following types: scanner, monitor, and printer. After the profiles are loaded, the script makes a variety of connections with the CONNECT: command.

Initially the script works with scanner and monitor profiles, creating complete profiles, one for each of the following transformation types: forward, reverse, and gamut. It evaluates using the profiles containing the forward transformations.

Next it loads monitor and printer profiles and creates complete profiles including forward, reverse, and simulate transformations. It creates additional profiles that not only contain these transformations but have image content hints specified as well. Then it evaluates using the forward and simulate profiles. To save disk space, outputs are not saved.

Finally the script works with scanner and printer profiles.

At various points, the script evaluates the connected profiles to verify that the new profile can be used to process image data. Additionally, it varies the content of the connected profile (image, content unknown, and so forth).

Verification

Each command is expected to return successfully.

Connect Many Profiles

Script Name

IC_conmany.scr

Concept

IC_conmany.scr performs many CONNECT: commands. It confirms that subsequent framework operations can be performed successfully.

Description

This script demonstrates that the KCMS framework can connect many profiles in succession while the framework continues to operate without error. The script loads a variety of profiles (monitor, printer, scanner, Photo CD), and connects them with a variety of operation and content hints. On the profiles loaded, it performs 20 connect calls. With the 20 connected profiles in memory, it evaluates the complete profiles. It does not save the color-managed images. After the operations are completed, it frees the profiles from memory.

Verification

Each command is expected to return successfully.

Connect Error

Script Name

IC_conerr.scr

Concept

IC_conerr.scr attempts to connect various types of device profiles into complete profiles, testing the error handling capabilities of the CONNECT: command.

Description

This script demonstrates that the KCMS framework can perform the CONNECT: command under a variety of error conditions and return the correct status. The script performs the CONNECT: command with the following error conditions:

Verification

Commands that are expected to fail will have the expected failure status provided as part of the CONNECT: script command.

Evaluating Profiles

Evaluate

Script Name

IC_eval.scr

Concept

IC_eval.scr performs several EVAL: commands on different image types (computer-generated graphics, scanned images). The resolution of the images varies from 72 dpi to 200 dpi. It saves the TIFF file outputs of the evaluate tests to allow for subjective evaluation of color quality.


Note -

Subjective evaluation of the images requires the following devices: Apple 13" monitor, Kodak XL 7720 printer, Kodak ColorEdge 1550 copier-printer. Images used in this test are scanned on a Microtek 600ZS scanner.


Description

This script demonstrates that the KCMS framework can successfully perform the EVAL: command under varying input and output conditions. First several profiles are loaded, and the CONNECT: command is used to create forward, reverse, and simulate test profiles. Test images are evaluated through each of the profiles that were previously connected. After these operations are completed, all the profiles are freed from memory with the FREE: command.

Verification

Each command in this script is expected to return successfully. As a post-test exercise, you should generate and examine each of the images output from the EVAL: command as an additional verification that the evaluate tests completed successfully.

Evaluate Gamut Range

Script Name

IC_gamut.scr

Concept

IC_gamut.scr checks the color gamut of an image it evaluates.

Description

This script demonstrates that the KCMS framework can successfully perform the EVAL: command and check the color gamut. First the script loads two profiles and connects them to create a resulting profile. It then evaluates the image through the resulting profile, requesting that the color gamut be checked. Since not all devices can represent the same number or range of colors, gamut testing can indicate how many of the image's colors are reproducible on the output device.

Verification

The number of pixels that are out of gamut (that is, their colors are not reproducible) is printed. The output image is not saved but instead is represented by 0's and FF's. Each 0 represents an in-gamut pixel and each FF, an out-of-gamut pixel.

Evaluate Many

Script Name

IC_evalmany.scr

Concept

IC_evalmany.scr evaluates many images, processing over 100 MB of image data.

Description

This script demonstrates that the KCMS framework can successfully perform the EVAL: command repetitively. First the script loads several profiles, and the CONNECT: command is called to create forward, reverse, and simulate profiles. In all, this test performs 25 EVAL: calls, constituting the processing of over 100 MB of image data. The script does not save the resulting evaluated image.

For details on how to save the image, see "EVAL: Keywords and Values" (ImageOut= keyword). Be sure you have enough disk space to do so.

Verification

Each command is expected to return successfully.

Evaluate Layout

Script Name

IC_layouts.scr

Concept

IC_layouts.scr evaluates images with the organization of the image data varied. The image organizations tested are: RGB row interleaved, RGB interleaved, and RGB planar. kcmstest is responsible for organizing the image data in the specified format. The script processes graphic images and saves the output for later evaluation. In all cases, the output images should be saved in RGB interleaved image organization so they can be examined after the test is completed.

Description

This script demonstrates that the KCMS framework can successfully perform the EVAL: command under varying input and output conditions. First the script loads several profiles and uses the CONNECT: command is to create forward, simulate test, and reverse profiles. Test images are passed through these profiles, exercising various image organizations specified for the input image. After these operations are completed, all the profiles are freed from memory.

Verification

Each command is expected to return successfully. As a post-test exercise, you can examine each of the images output from the EVAL: command as additional verification that the evaluate layout tests completed successfully.

Evaluate Error

Script Name

IC_evalerr.scr

Concept

IC_evalerr.scr attempts to create test conditions that cause the EVAL: command to return various errors.

Description

This script demonstrates that the KCMS framework can perform a CONNECT: command under a variety of error conditions and return the appropriate error status. The script performs the CONNECT: command with the following error conditions:

Verification

Commands that are expected to fail will have the expected failure status provided as part of the EVAL: script command.

Optimizing Profiles

Speed Optimization

Script Name

IC_optspeed.scr

Concept

IC_optspeed.scr evaluates test images using complete profiles it creates with forward, reverse, and simulate transformations. It optimizes the profiles for speed and again evaluates the images.

Description

This script demonstrates that the KCMS framework can create complete profiles with forward, reverse, and simulate transformations and can optimize them for speed. The script loads a scanner, monitor, and printer profile and creates three connected profiles with the forward, reverse, and simulate operations. It evaluates each connected profile and records the time required to perform each evaluation in the log file. Then it optimizes the connected profiles for speed and repeats evaluations. The time required to perform each evaluation is again recorded to the log file. The script does not save the color-managed images.

Verification

Each of the commands performed in this test is expected to complete successfully. The optimized profiles are expected to reduce the time required to evaluate the image.

Size Optimization

Script Name

IC_optsize.scr

Concept

IC_optsize.scr creates complete profiles that have forward, reverse, and simulate transformations and gets the profile sizes. It optimizes the complete profiles for size. Then it gets the new profile sizes. The profiles are written to the log file.

Description

This test script demonstrates that the KCMS framework can create complete profiles with forward, reverse, and simulate transformations and can optimize them for size. It uses scanner, color space, and printer profiles to test the OPTIMIZE: command for size. It creates complete profiles, specifying the forward, reverse, and simulate transformations. Using the GETATTR: command, it gets the size of the complete profiles. Once this is done, it uses the OPTIMIZE: command to optimize an image for size. Again the script gets the size of each of the completed profiles.

Verification

Each of the commands performed is expected to complete successfully. The optimized profile sizes are expected to be reduced from the original sizes.

Getting and Setting Attributes

Get/Set Attribute

Script Name

IC_attr1.scr

Concept

IC_attr1.scr sets attributes for a variety of device profiles, which it saves and frees from memory. Then it reloads the profiles and verifies that the attributes were correctly set. It varies the attributes that it sets and gets.

Description

This script demonstrates that the KCMS framework can perform SETATTR: commands for scanner, printer, and monitor profiles and verify that the attributes were correctly set. Prior to operating on each profile type, the script uses the GETATTR: command to retrieve all the attributes for that profile. After setting the attributes with the SETATTR: command, the script saves and then frees each profile from memory. Then it reloads the profile and performs a GETATTR: command on the attributes previously set. You should examine the log file to verify that:

Verification

All the commands performed in this test are expected to complete successfully. Additionally, the profile attributes are expected to be modified to the values specified in the SETATTR: commands.

Attribute Test 2

Script Name

IC_attr2.scr

Concept

IC_attr2.scr creates a new profile and sets a variety of attributes. It gets the attributes and verifies that they have been properly set. It saves the profile, frees it, reloads the saved profile, and again gets the attributes.

Description

This script demonstrates that the KCMS framework can set the attributes of a profile it creates. After it creates the profile, it uses the SETATTR: command to set the attributes. Then it uses the GETATTR: command to get all the attributes it set. The script saves the profile and frees it from memory. Then it reloads the profile and again gets the attributes it set.

Verification

All the commands performed in this test are expected to be successfully completed. You should examine the log file to verify that:

Lookup Tables

Script Name

IC_lut.scr

Concept

IC_lut.scr uses data files in the data directory to set a lookup table (LUT) structure in the profile and to get the LUT from the profile.

Description

This script demonstrates that the KCMS framework can support both 8-bit and 16-bit LUTs. Not all profiles use the LUT technology within the profile, so not all profiles will have LUTs. See the KCMS Application Developer's Guide for more information on the types of LUTs.

The SETATTR: command takes the name of the data file in the data directory containing the LUT structure of values.

The GETATTR: command prints out the LUTs. The data can be very large--75,000 values. Once the LUTs are set, the profile must be saved before they are actually written into and accessed by the GETATTR: command.

Verification

Examine the log to verify that the LUT values printed out match the LUT values in the data files.

Updating Profiles

Update Scanner Profile

Script Name

IC_update1.scr

Concept

IC_update1.scr creates and updates a scanner profile with HP Scanjet calibration and characterization data. It connects the scanner profile with a monitor profile to create a complete profile. The complete profile is then used to evaluate an image. The resulting image is saved for post-test subjective evaluation.

Description

This script demonstrates that the KCMS framework can create and update a scanner profile with calibration and characterization data. The data used will not necessarily match your scanner.

The test script verifies that, after the profile is updated, it can be connected to a monitor profile and the resulting profile used to evaluate images.

The script creates a scanner profile and sets several attributes after which it performs the UPDATE: command. Then it saves the updated profile and connects it to a monitor profile. It evaluates the test image using this complete profile. Then it frees the profiles from memory.

Verification

All the commands listed in this test are expected to complete successfully. You need to subjectively evaluate the image resulting from the EVAL: command.

Update Monitor Profile

Script Name

IC_update2.scr

Concept

IC_update2.scr creates and updates a monitor profile with calibration data. Monitor profiles in this test contain no characterization data; however the SETATTR: command must set the monitor white point and the CIEXYZ chromaticity for the red, green, and blue phosphors.

The monitor white point and chromaticity for the red, green, and blue phosphors of ICC profiles are defined in CIEXYZ color space. After the profile is created, it is connected with a printer profile to create a complete profile.


Note -

The scanner profile will have been previously verified. The complete profile is then used to evaluate the image. The resulting image is saved for post-test subjective evaluation.


Description

This script demonstrates that the KCMS framework can create and update a monitor profile with calibration data. It uses the Sony 16" monitor profile distributed with the KCMS product and updates it with the appropriate monitor calibration data. The resulting data may not match your system characteristics.

The test script examines monitor profile updating. It loads the monitor profile and performs the appropriate SETATTR: commands. It then performs the UPDATE: command. It saves the updated profile and frees it from memory. It reloads the profile and connects it to a printer profile. Using this complete profile, it evaluates the test image.

Verification

All the commands in this test are expected to completed successfully. You need to subjectively evaluate the image resulting from the EVAL: command.

Enhancement Tests

The scripts listed below are described alphabetically by script name. These scripts test value-added features and bug fixes to the KCMS framework.

IC_evalplus.scr

Concept

IC_evalplus.scr connects configured X Window System visual profiles to scanner and printer profiles and evaluates the profiles in the same manner as generic profiles.

Description

This script is similar to IC_eval.scr (see "Evaluate" ) with one exception: the monitor profile used is a configured/calibrated X Window System visual profile for the current frame buffer. This test should succeed if the system has been previously configured using the kcms_configure(1) or kcms_calibrate(1) command. After evaluation, the script frees the profiles from memory.

Verification

All the commands listed in this script are expected to complete successfully.

IC_gray.scr

Concept

IC_gray.scr creates a gray profile and sets attributes.

Description

This script demonstrates that the KCMS framework can create a gray device color profile and set several attributes. It performs the following sequence of events first on a display profile and then on an input profile.

It uses the CREATE: command to create the new profile and sets several attributes with the SETATTR: command. Then it uses the GETATTR: command to get the attributes to verify that they are properly set. It saves the profile and frees it from memory. Then it reloads the profile and again verifies the attributes.

Verification

All the commands are expected to complete successfully.

IC_loadsol.scr

Concept

IC_loadsol.scr loads and frees 100 59

Solaris file-type profiles without memory problems.

Description

This script demonstrates that the KCMS framework successfully can load and free 100 Solaris(TM) file-type profiles. The script actually verifies a previous fix of an error that caused file descriptors to overflow because of improper file closings in the library.

Verification

All the commands in this script are expected to complete successfully.

IC_pacbug.scr

Concept

IC_pacbug.scr verifies a bug in the CONNECT: command.

Description

This script tests scanner and monitor profile connects. It tests a previous bug in the system.

Verification

All the commands complete as expected.

IC_sun_update.scr

Concept

IC_sun_update.scr verifies a bug in the UPDATE: command.

Description

This script demonstrates that the KCMS framework can update a monitor profile several times. It loads, updates, and saves a monitor profile to a different name three times and frees the updated profiles. Then the script reloads each of the saved monitor profiles and a scanner profile. It connects each monitor profile to the scanner profile, specifying the forward transformation operation and evaluates the results. Finally, the script frees all the profiles from memory.

Verification

All the commands are expected to complete successfully.

IC_updatewin.scr

Concept

IC_updatewin.scr updates a profile several times in a row.


Note -

This script must be run as root.


Description

This script demonstrates that the KCMS framework can update an X Window System profile several times--saving and freeing the profile each time.

Verification

All the commands are expected to complete successfully.

IC_xdisplay.scr

Concept

IC_xdisplay.scr recognizes a display number when accessing a remote host.

Description

This script demonstrates that the KCMS framework can recognize a display number when accessing a remote host. It requests a Solaris file profile from display 0.0 of a remote host that has a single display. It loads a local X Window System profile and sets an attribute to verify that the host is reset properly. Then it frees the profiles from memory.


Note -

The kcms_server(1) daemon must be running on the remote most. If it is not running, type kcms_server in a command shell as root on the remote host.


Verification

All the commands in this test are expected to complete successfully provided the kcms_server(1) daemon is running.

IC_xprofile.scr

Concept

IC_xprofile.scr tests ways of finding profiles.

Description

IC_xprofile.scr sets the environment variable KCMS_PROFILES to a directory containing a profile called junk1.pro, which should be a copy of an existing profile copied to this directory prior to running the test. It essentially tests the ability of the library to use KCMS_PROFILES to find profiles.

Verification

All the commands in this test are expected to complete successfully.

IC_xprofilehost.scr

Concept

IC_xprofilehost.scr tests local and remote hosts.

Description

This script finds a profile remotely and sets the KCMS host to a remote server. It tests the local host using the Internet name instead of the keyword local and sets the KCMS host to the local machine.

Verification

All the commands in this test are expected to complete successfully.

IC_xprofilesav.scr

Concept

IC_xprofilesav.scr saves an X Window System profile.

Description

This script attempts to save X Window System profiles in /etc/openwin/devdata without being root.

Verification

The test should fail with Xstatus 4011 (KCS_IO_WRITE), because it does not have write permissions.

IC_xprofilesavremote.scr

Concept

IC_xprofilesavremote.scr tests writing to a remote host.

Description

This script sets the DISPLAY environment variable to a KCMS remote host. Then it attempts to save an X Window System profile remotely.

Verification

The test should fail with XStatus 4302(KCS_X11_PROFILE_RO), because it does not have write permissions.

IC_xprofilesavroot.scr

Concept

IC_xprofilesavroot.scr saves an X Window System profile.


Note -

This script must be run as root.


Description

This script saves an X Window System profile in /etc/openwin/devdata/profiles.

Verification

All the commands in this test are expected to complete successfully.

IC_xwindow.scr

Concept

IC_xwindow.scr:

Description

This script demonstrates that the KCMS framework can access profiles locally and across the network. First it loads the default X Window System profile from the local host. Then it loads a Solaris profile from another host machine. Finally it frees the profiles from memory.


Note -

The kcms_server(1) daemon must be running on the remote most. If it is not running, type kcms_server in a command shell as root on the remote host.


Verification

All the commands are expected to complete successfully, provided the kcms_server(1) daemon is running on the current machine.

IC_xwindowerr.scr

Concept

IC_xwindowerr.scr captures errors and reports KcsStatus class extensions.

Description

This script tests Solaris file error cases. An invalid host name is requested in three LOAD: commands, and invalid profiles are requested from the valid local host in three other LOAD: commands.

Verification

All the LOAD: commands should fail because of an attempt to access an invalid host name or profile name.