2N/A#ident "%Z%%M% %I% %E% SMI" mwc
2N/A
2N/ACDDL HEADER START
2N/A
2N/AThe contents of this file are subject to the terms of the
2N/ACommon Development and Distribution License, Version 1.0 only
2N/A(the "License"). You may not use this file except in compliance
2N/Awith the License.
2N/A
2N/AYou can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/Aor http://www.opensolaris.org/os/licensing.
2N/ASee the License for the specific language governing permissions
2N/Aand limitations under the License.
2N/A
2N/AWhen distributing Covered Code, include this CDDL HEADER in each
2N/Afile and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/AIf applicable, add the following below this CDDL HEADER, with the
2N/Afields enclosed by brackets "[]" replaced with your own identifying
2N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
2N/A
2N/ACDDL HEADER END
2N/A
2N/A Enterprise: Private Layer Test Specification
2N/A ============================================
2N/A
2N/AABSTRACT
2N/A
2N/A This document describes two test specifications intended to be
2N/Aused in the development of test suite(s) designed to validate the private
2N/Alayer API described in Section 2.1 of the Enterprise DHCP Service
2N/AArchitecture Specification (ARCH) [1]. The first specification outlines
2N/Atesting requirements for the DHCP default file API (ARCH, section 2.1.1)
2N/A[1]. The second specification outlines the testing requirements for the
2N/Adhcptab and dhcp network container API (ARCH, section 2.1.2) [1]. Each
2N/Aspecification contains a basic sanity test specification, designed to
2N/Averify that the API works as designed when fed data in the correct form.
2N/AEach specification also contains a full test specification, which
2N/Acompliments the basic sanity test by providing cases which test the
2N/Astability and MT-safeness of the API.
2N/A
2N/ATEST APPLICATION
2N/A
2N/A Test suite(s) written to these specifications should be run on
2N/Aan instance of each reference platform on each build of the ON
2N/Aconsolidation. See "Enterprise Reference Platforms" [2] for more
2N/Ainformation.
2N/A
2N/A1.0 DHCP default file API Test Specification
2N/A
2N/A1.1 ABSTRACT
2N/A
2N/A This test specification is divided into two subspecifications
2N/Aoutlining the testing requirements for validating the default file API
2N/Adescribed in Section 2.1.1 of ARCH [1]. The first specification describes
2N/Aa basic sanity test, which describes the testing requirements to verify
2N/Athat the API works as designed when fed data in the correct form. The
2N/Asecond specification describes a full test, which complements the basic
2N/Asanity test by defining test requirements which test the error checking
2N/Abehavior and MT-safeness of the API.
2N/A
2N/A1.2 TEST APPLICATION
2N/A
2N/A Test suite(s) written to this specification should be run on the
2N/Areference platform of each of the supported architectures (sparcv8,
2N/Asparcv9, IA32, IA64) for each build of the ON consolidation. See
2N/A"Enterprise Reference Platforms" [2].
2N/A
2N/A1.3 TEST PREPARATION
2N/A
2N/A Prior to running a test suite, install SUNWdhcsr and SUNWdhcsu
2N/Aon the testing platform. No external setup is required for this test
2N/Asuite. Remove any existing default file, /etc/default/dhcp.
2N/A
2N/A1.4 BASIC SANITY TEST
2N/A
2N/A Description
2N/A
2N/A This test validates the basic operation of the default
2N/A file API function calls when presented with valid input.
2N/A
2N/A Test Data
2N/A
2N/A RESOURCE=files
2N/A PATH=/var/dhcp_test
2N/A RUN_MODE=server
2N/A VERBOSE=TRUE
2N/A RELAY_HOPS=8
2N/A INTERFACES=hme0,le0,qfe3
2N/A ETHERS_COMPAT=FALSE
2N/A ICMP_VERIFY=TRUE
2N/A OFFER_CACHE_TIMEOUT=11
2N/A RESCAN_INTERVAL=61
2N/A LOGGING_FACILITY=6
2N/A BOOTP_COMPAT=FALSE
2N/A
2N/A Case #1 write_dhcp_defaults:
2N/A
2N/A Use function to write the test data, using file mode of
2N/A 0646. Confirm that data written matches test data. Confirm that
2N/A default file created has 0646 file mode and the function
2N/A returns 0.
2N/A
2N/A Case #2 read_dhcp_defaults:
2N/A
2N/A Create default file containing test data. Read data
2N/A using the function. Confirm data contained with dhcp_defaults_t
2N/A matches test data and the function returns 0.
2N/A
2N/A Case #3 delete_dhcp_defaults:
2N/A
2N/A Remove the default file using the function. Confirm
2N/A that default file has been removed and the function returns 0.
2N/A
2N/A Case #4 query_dhcp_defaults:
2N/A
2N/A Call function, cycling through each test data key.
2N/A Confirm that key is found, and that data returned is correct
2N/A and the function returns 0.
2N/A
2N/A Case #5: free_dhcp_defaults:
2N/A
2N/A Using the dhcp_defaults_t built containing the test
2N/A data, confirm that the function returns 0.
2N/A
2N/A1.5 FULL TEST
2N/A
2N/A Description
2N/A
2N/A This test verifies that the default file API function
2N/A calls respond correctly when presented with incorrect data. It
2N/A also validates the MT-safeness of the API.
2N/A
2N/A Test Data
2N/A
2N/A RESOURCE=files
2N/A PATH=/var/dhcp_test
2N/A RUN_MODE=server
2N/A VERBOSE=TRUE
2N/A RELAY_HOPS=8
2N/A INTERFACES=hme0,le0,qfe3
2N/A ETHERS_COMPAT=FALSE
2N/A ICMP_VERIFY=TRUE
2N/A OFFER_CACHE_TIMEOUT=11
2N/A RESCAN_INTERVAL=61
2N/A LOGGING_FACILITY=6
2N/A BOOTP_COMPAT=FALSE
2N/A
2N/A Case #1 all API function calls:
2N/A
2N/A Call each of the API functions with invalid argument(s).
2N/A For functions that take more than one argument, call those
2N/A functions once for each argument, providing invalid data for
2N/A each argument in turn. Confirm that functions return -1 and set
2N/A errno to EINVAL.
2N/A
2N/A Case #2 existing lock file:
2N/A
2N/A Create /etc/default/.dhcp_defaults_lock. Confirm that
2N/A read_dhcp_defaults and write_dhcp_defaults return -1 and set
2N/A errno to EAGAIN.
2N/A
2N/A Case #2 read_dhcp_defaults:
2N/A
2N/A Condition Expected Result
2N/A ========= ===============
2N/A
2N/A No default file. Confirm that the function
2N/A returns -1 and sets errno
2N/A to ENOENT.
2N/A
2N/A Default file w/ Confirm that the function
2N/A mode set to 000. returns -1 and sets errno
2N/A to EACCESS.
2N/A
2N/A Case #3 delete_dhcp_defaults:
2N/A
2N/A Condition Expected Result
2N/A ========= ===============
2N/A
2N/A No default file. Confirm that the function
2N/A returns -1 and sets errno
2N/A to ENOENT.
2N/A
2N/A Default file w/ Confirm that the function
2N/A mode set to 000. returns -1 and sets errno
2N/A to EACCESS.
2N/A
2N/A Case #3 write_dhcp_defaults:
2N/A
2N/A Condition Expected Result
2N/A ========= ===============
2N/A
2N/A Default file w/ Confirm that the function
2N/A mode set to 000. returns -1 and sets errno
2N/A to EACCESS.
2N/A
2N/A Case #4 Multi-access stress:
2N/A
2N/A Preparation:
2N/A
2N/A Generate TUNABLE versions of the default file
2N/A containing unique combinations of defaults (no
2N/A line within the TUNABLE files are the same). The
2N/A default file will be written/accessed using UFS.
2N/A
2N/A Tunable default values:
2N/A
2N/A TUNABLE value: 5
2N/A INTERATE value: 100
2N/A
2N/A A single multi-threaded test program can be
2N/A written which can be used in the following 3 cases.
2N/A It will write/read a unique version of the default
2N/A file. It will retry a default file operation if EAGAIN
2N/A is returned.
2N/A
2N/A 4.1. Multiple processes
2N/A
2N/A Run TUNABLE instances of the test program which
2N/A writes / reads a different version of the TUNABLE
2N/A default file possibilities for a tunable (INTERATE)
2N/A number of iterations at once. Once the instances of
2N/A the test program have completed their interations,
2N/A verify that the file consists of exactly one of the
2N/A TUNABLE possible versions of the default file.
2N/A
2N/A 4.2. Multiple threads, single process
2N/A
2N/A Run a single instance of the test program which
2N/A creates a tunable number of threads (TUNABLE) each of
2N/A which will write and read one of the unique default file
2N/A combinations for a tunable (INTERATE) number of
2N/A interations. Verify that after the program completes,
2N/A exactly one of the TUNABLE possible versions of the
2N/A default files exists.
2N/A
2N/A 4.3. Multiple threads, multiple processes, NFS in use
2N/A
2N/A Run multiple versions of the test program, each
2N/A using multiple threads, some versions of the test
2N/A program accessing the default directory using NFS,
2N/A others using UFS. Verify after the test programs
2N/A complete that exactly one of the TUNABLE possible
2N/A versions of the default file exists.
2N/A
2N/A Caution: ensure that the number of threads *
2N/A number of processes does not exceed the number of unique
2N/A possible default files.
2N/A
2N/A 4.4. Variation of 4.1-4.3:
2N/A
2N/A Generate another process which periodically
2N/A snags the default file lock file, and verifies that the
2N/A current version of the default file matches one of the
2N/A unique default file versions.
2N/A
2N/A2.0 dhcptab and dhcp network container API Test Specification
2N/A
2N/A2.1 ABSTRACT
2N/A
2N/A This test specification is divided into two subspecifications
2N/Aoutlining the testing requirements for validating the dhcptab and dhcp
2N/Anetwork container API described in Section 2.1.2 of ARCH [1]. The first
2N/Aspecification describes a basic sanity test, which describes the testing
2N/Arequirements to verify that the API works as designed when fed data in
2N/Athe correct form with the correct preconditions present. The second
2N/Aspecification describes a full test, which complements the basic sanity
2N/Atest by defining test requirements which test the error checking
2N/Abehavior and MT-safeness of the API.
2N/A
2N/A2.2 TEST APPLICATION
2N/A
2N/A Test suite(s) written to this specification should be run on the
2N/Areference platform of each of the supported architectures (sparcv8,
2N/Asparcv9, IA32, IA64) for each build of the ON consolidation. See
2N/A"Enterprise Reference Platforms" [2].
2N/A
2N/A2.3 TEST PREPARATION
2N/A
2N/A Prior to running a test suite, install SUNWdhcsr and SUNWdhcsu
2N/Aon the testing platform. Select a public module SUNWdhc{df,db,dn} and
2N/Ainstall it. Configure any data service providing service to the public
2N/Amodule. Set the RESOURCE and PATH default file parameters as required by
2N/Athe public module. Note that if the underlying public module's
2N/Aenvironment is appropriately configured, the results of testing the API
2N/Ashould be the same for any other appropriately configured public module.
2N/AThe public module status can be verified by running the basic sanity
2N/Atest for the specific public module. The tester should record the
2N/Apublic module environment used during the test.
2N/A
2N/A2.4 BASIC SANITY TEST
2N/A
2N/A Description
2N/A
2N/A This test validates the basic operation of the dhcptab
2N/A and dhcp network container API function calls when presented with
2N/A valid input.
2N/A
2N/A Test Data
2N/A
2N/A Item Description Application
2N/A ==== =========== ===========
2N/A <network address> IP address of *_dn
2N/A network. Ensure
2N/A that appropriate
2N/A subnet mask is
2N/A available in
2N/A netmasks(4).
2N/A Candidate networks
2N/A have to have at
2N/A least 3000 hosts.
2N/A
2N/A dt records As follows: *_dt
2N/A
2N/A SrootOpt s Vendor=SUNW.Ultra-1 SUNW.i86pc,1,ASCII,1,0
2N/A SrootIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,2,IP,1,1
2N/A SrootNM s Vendor=SUNW.Ultra-1 SUNW.i86pc,3,ASCII,1,0
2N/A SrootPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,4,ASCII,1,0
2N/A SswapIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,5,IP,1,1
2N/A SswapPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,6,ASCII,1,0
2N/A SbootFIL s Vendor=SUNW.Ultra-1 SUNW.i86pc,7,ASCII,1,0
2N/A Stz s Vendor=SUNW.Ultra-1 SUNW.i86pc,8,ASCII,1,0
2N/A SbootRS s Vendor=SUNW.Ultra-1 SUNW.i86pc,9,NUMBER,2,1
2N/A SinstIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,10,IP,1,1
2N/A SinstNM s Vendor=SUNW.Ultra-1 SUNW.i86pc,11,ASCII,1,0
2N/A SinstPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,12,ASCII,1,0
2N/A SsysidCF s Vendor=SUNW.Ultra-1 SUNW.i86pc,13,ASCII,1,0
2N/A SjumpsCF s Vendor=SUNW.Ultra-1 SUNW.i86pc,14,ASCII,1,0
2N/A Sterm s Vendor=SUNW.Ultra-1 SUNW.i86pc,15,ASCII,1,0
2N/A Locale m :UTCoffst=-18000:
2N/A Solaris m :SrootIP4=129.148.174.27:SrootNM="atlantic": \
2N/A :SinstIP4=129.148.174.27:SinstNM="atlantic": \
2N/A :Sterm="xterm":BootSrvA=129.148.174.27:
2N/A sparc m \
2N/A:SrootPTH="/export/s28/solaris1of2.s28s_wos/latest/Solaris_8/Tools/Boot": \
2N/A :SinstPTH="/export/s28/solaris1of2.s28s_wos/latest":
2N/A sun4u m :Include=Solaris:Include=sparc:
2N/A i86pc m :Include=Solaris:SbootFIL="/platform/i86pc/kernel/unix": \
2N/A :SinstPTH="/export/s28/solaris1of2.s28x_wos/latest": \
2N/A:SrootPTH="/export/s28/solaris1of2.s28x_wos/latest/Solaris_8/Tools/Boot":
2N/A SUNW.i86pc m :Include=i86pc:
2N/A SUNW.Ultra-1 m :SbootFIL="/platform/sun4u/kernel/sparcv9/unix": \
2N/A :Include=sun4u:
2N/A <network address> m :Subnet=255.255.0.0:Router=172.21.0.2: \
2N/A :Broadcst=172.21.255.255:
2N/A atlantic m :Include=Locale:Timeserv=129.148.174.27:LeaseTim=3600: \
2N/A :LeaseNeg:Hostname:DNSdmain="snt.east.sun.com": \
2N/A :DNSserv=172.21.0.1:
2N/A 010800207E8A02 m :Impress=172.22.255.27:
2N/A
2N/A
2N/A <network address> Dhcp network container. *_dn
2N/A
2N/A dn records ~3000, as follows: *_dn
2N/A
2N/A 00 00 <network address>+6 172.21.0.2 0 atlantic
2N/A .
2N/A .
2N/A .
2N/A 00 00 <network address>+3006 172.21.0.2 0 atlantic
2N/A
2N/A
2N/A
2N/A Case #1 dhcpsvc_errmsg:
2N/A
2N/A Use function in a loop to display all messages
2N/A associated with the error codes in Figure 2 of ARCH [1]. Verify
2N/A that messages are displayed correctly.
2N/A
2N/A Case #2 enumerate_dd:
2N/A
2N/A Verify that this function properly enumerates the public
2N/A modules present on the machine under test in
2N/A /usr/lib/inet/dhcp/svc. Free memory (count entries in modules).
2N/A
2N/A Case #3 status_dd:
2N/A
2N/A Verify that the selected data store service is correctly
2N/A configured.
2N/A
2N/A Case #4 capability_dd:
2N/A
2N/A Verify that this function returns the correct
2N/A capabilities for the public module currently configured for use.
2N/A Note: Some public modules may not support this function, which
2N/A will cause this function to return DSVC_UNSUPPORTED.
2N/A
2N/A Case #5 open_dd:
2N/A
2N/A Using DSVC_CREATE | DSVC_READ | DSVC_WRITE, create a
2N/A dhcptab container and a dhcp network container (called
2N/A <network address>). Preserve the handles returned for later
2N/A use in the following test cases.
2N/A
2N/A Case #6 list_dd:
2N/A
2N/A Verify that this function properly returns the currently
2N/A available DHCP containers (Case #5) in the data service hosting
2N/A the public module. Only those containers created in Case #5
2N/A should exist. Free memory (count entries in listppp).
2N/A
2N/A Case #7 add_dd_entry:
2N/A
2N/A Using the handles returned in Case #5, add the test
2N/A data records to the dhcptab and dhcp network containers.
2N/A
2N/A Case #8 lookup_dd:
2N/A
2N/A 8.1. Verify case #7.
2N/A
2N/A Using a "count" of -1 and a "query" value set
2N/A using DSVC_QINIT (Figure 5 of ARCH[1]), verify that the
2N/A contents of the dhcptab container and <network address>
2N/A container match the test data. "records" should equal
2N/A the number of records for each container. Note that the
2N/A order of the records returned may not be the same as
2N/A the order in which they were added in case #7.
2N/A
2N/A 8.2 Verify dhcptab container type.
2N/A
2N/A 8.2.1. Look for all records with a DT_QTYPE
2N/A value of "s". Verify that only the "s" type
2N/A records are returned.
2N/A
2N/A 8.2.2. Look for all records with DT_QTYPE value
2N/A of "m". Verify that only the "m" type records
2N/A are returned.
2N/A
2N/A 8.2.3. Look for DT_QKEY of "atlantic". Verify
2N/A that only the macro "atlantic" is returned.
2N/A
2N/A 8.2.4. Look for DT_QKEY of i86pc and not a
2N/A DT_QTYPE of "m". Verify that only the macro
2N/A "i86pc" is returned.
2N/A
2N/A 8.3 Verify dhcp network container type.
2N/A
2N/A 8.2.1. Look for all records with a DN_QCIP
2N/A of <network address>+100. Verify that only
2N/A one record (with a cip of
2N/A <network address>+100) is returned.
2N/A
2N/A 8.2.2. Look for all records with DN_QMACRO
2N/A value of "atlantic". Verify that all records
2N/A are returned ("records" == 3000). Note that
2N/A records returned may be in a different order
2N/A than they were added as part of case #7.
2N/A
2N/A Case #9 modify_dd_entry:
2N/A
2N/A 9.1 Modify dhcptab container records
2N/A
2N/A 9.1.1 Using lookup_dd to find the record with a
2N/A DT_QKEY of "Sterm", change the name of the
2N/A record from "Sterm" to "sTERM". Use lookup_dd to
2N/A verify that the original record has been
2N/A renamed.
2N/A
2N/A 9.1.2 Using lookup_dd to find the record with a
2N/A DT_QKEY of "Solaris", change the value portion
2N/A of the record to be:
2N/A
2N/A :SrootIP4=129.148.174.27:SrootNM="atlantic": \
2N/A :SinstIP4=129.148.174.27:SinstNM="atlantic": \
2N/A :sTERM="sun-cmd":BootSrvA=129.148.174.27:
2N/A
2N/A Using lookup_dd, reexecute the lookup and verify
2N/A that the value portion of the record has been
2N/A modified correctly.
2N/A
2N/A 9.2 Modify dhcp network container records
2N/A
2N/A 9.2.1 Using lookup_dd to find the record with a
2N/A DN_QCIP of <network address>+10, change the
2N/A lease field to 1/1/2000 and the flags field to
2N/A MANUAL. Use lookup_dd to verify that the
2N/A original record has been changed.
2N/A
2N/A 9.2.2 Using lookup_dd to find the record with a
2N/A DN_QFLAGS of MANUAL. Change the dn_cid field
2N/A to 01080020FFFFFF, dn_flags field to
2N/A MANUAL+AUTOMATIC, dn_sip field to 172.23.0.77,
2N/A dn_lease field to -1, dn_macro field to "happy",
2N/A and the dn_comment field to "This is a test".
2N/A Use lookup_dd to verify that the original record
2N/A has been changed.
2N/A
2N/A
2N/A Case #10 delete_dd_entry:
2N/A
2N/A 10.1 Delete dhcptab container record
2N/A
2N/A Using lookup_dd to find the record with a
2N/A DT_QKEY of SUNW.Ultra-1, delete this record. Verify
2N/A using lookup_dd that this record can no longer be found.
2N/A
2N/A 10.2 Delete dhcp network container record
2N/A
2N/A Using lookup_dd to find the record with a
2N/A DN_QCIP of <network address>+101, delete this record.
2N/A Verify using lookup_dd that this record can no longer be
2N/A found.
2N/A
2N/A Case #11 close_dd:
2N/A
2N/A 11.1 Close the open instance of the dhcptab container.
2N/A Verify that close_dd returns DSVC_SUCCESS.
2N/A
2N/A 11.2 Close the open instance of the dhcp network
2N/A container <network address>. Verify that close_dd
2N/A returns DSVC_SUCCESS.
2N/A
2N/A Case #12 remove_dd:
2N/A
2N/A 12.1 Remove the dhcptab container. Verify that it no
2N/A longer exists using list_dd.
2N/A
2N/A 12.2 Remove the dhcp network container <network
2N/A address>. Verify that it no longer exists using list_dd.
2N/A
2N/A2.5 FULL TEST
2N/A
2N/A Description
2N/A
2N/A This test verifies that the dhcptab and dhcp network
2N/A container API function calls respond correctly when presented with
2N/A incorrect data. It also validates the MT-safeness of the API.
2N/A The test suite should allow any number of concurrent threads or
2N/A test suite processes to be invoked.
2N/A
2N/A Test Data
2N/A
2N/A Item Description Application
2N/A ==== =========== ===========
2N/A <network address> IP address of *_dn
2N/A network. Ensure
2N/A that appropriate
2N/A subnet mask is
2N/A available in
2N/A netmasks(4).
2N/A Candidate networks
2N/A have to have at
2N/A least 3000 hosts.
2N/A
2N/A dt records As follows: *_dt
2N/A
2N/A SrootOpt s Vendor=SUNW.Ultra-1 SUNW.i86pc,1,ASCII,1,0
2N/A SrootIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,2,IP,1,1
2N/A SrootNM s Vendor=SUNW.Ultra-1 SUNW.i86pc,3,ASCII,1,0
2N/A SrootPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,4,ASCII,1,0
2N/A SswapIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,5,IP,1,1
2N/A SswapPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,6,ASCII,1,0
2N/A SbootFIL s Vendor=SUNW.Ultra-1 SUNW.i86pc,7,ASCII,1,0
2N/A Stz s Vendor=SUNW.Ultra-1 SUNW.i86pc,8,ASCII,1,0
2N/A SbootRS s Vendor=SUNW.Ultra-1 SUNW.i86pc,9,NUMBER,2,1
2N/A SinstIP4 s Vendor=SUNW.Ultra-1 SUNW.i86pc,10,IP,1,1
2N/A SinstNM s Vendor=SUNW.Ultra-1 SUNW.i86pc,11,ASCII,1,0
2N/A SinstPTH s Vendor=SUNW.Ultra-1 SUNW.i86pc,12,ASCII,1,0
2N/A SsysidCF s Vendor=SUNW.Ultra-1 SUNW.i86pc,13,ASCII,1,0
2N/A SjumpsCF s Vendor=SUNW.Ultra-1 SUNW.i86pc,14,ASCII,1,0
2N/A Sterm s Vendor=SUNW.Ultra-1 SUNW.i86pc,15,ASCII,1,0
2N/A Locale m :UTCoffst=-18000:
2N/A Solaris m :SrootIP4=129.148.174.27:SrootNM="atlantic": \
2N/A :SinstIP4=129.148.174.27:SinstNM="atlantic": \
2N/A :Sterm="xterm":BootSrvA=129.148.174.27:
2N/A sparc m \
2N/A:SrootPTH="/export/s28/solaris1of2.s28s_wos/latest/Solaris_8/Tools/Boot": \
2N/A :SinstPTH="/export/s28/solaris1of2.s28s_wos/latest":
2N/A sun4u m :Include=Solaris:Include=sparc:
2N/A i86pc m :Include=Solaris:SbootFIL="/platform/i86pc/kernel/unix": \
2N/A :SinstPTH="/export/s28/solaris1of2.s28x_wos/latest": \
2N/A:SrootPTH="/export/s28/solaris1of2.s28x_wos/latest/Solaris_8/Tools/Boot":
2N/A SUNW.i86pc m :Include=i86pc:
2N/A SUNW.Ultra-1 m :SbootFIL="/platform/sun4u/kernel/sparcv9/unix": \
2N/A :Include=sun4u:
2N/A <network address> m :Subnet=255.255.0.0:Router=172.21.0.2: \
2N/A :Broadcst=172.21.255.255:
2N/A atlantic m :Include=Locale:Timeserv=129.148.174.27:LeaseTim=3600: \
2N/A :LeaseNeg:Hostname:DNSdmain="snt.east.sun.com": \
2N/A :DNSserv=172.21.0.1:
2N/A 010800207E8A02 m :Impress=172.22.255.27:
2N/A
2N/A
2N/A <network address> Dhcp network container. *_dn
2N/A
2N/A dn records ~3000, as follows: *_dn
2N/A
2N/A 00 00 <network address>+6 172.21.0.2 0 atlantic
2N/A .
2N/A .
2N/A .
2N/A 00 00 <network address>+3006 172.21.0.2 0 atlantic
2N/A
2N/A
2N/A
2N/A Case #1 all API function calls:
2N/A
2N/A 1.1 Invalid arguments
2N/A
2N/A Call each of the API functions with invalid
2N/A argument(s). For functions that take more than one
2N/A argument, call those functions once for each argument,
2N/A providing invalid data for each argument in turn.
2N/A Confirm that functions return DSVC_INVAL for all cases
2N/A but dhcpsvc_errmsg. This function should return a
2N/A string of "unknown".
2N/A
2N/A 1.2 No public modules (N/A for dhcpsvc_errmsg)
2N/A
2N/A Call each of the API functions. Verify that
2N/A DSVC_ENOENT is returned.
2N/A
2N/A 1.3 Permission (N/A for dhcpsvc_errmsg)
2N/A
2N/A Change the permission of the public module to be
2N/A unreadable by any user (000). Verify that DSVC_ACCESS
2N/A is returned. Restore permission of public module.
2N/A
2N/A Case #2 status_dd:
2N/A
2N/A 2.1 Supporting data service not configured.
2N/A
2N/A Verify that DSVC_SUCCESS is *not* returned.
2N/A Some public modules may not return the same error message
2N/A in this case. All should fail.
2N/A
2N/A 2.2 Configured data service, but unavailable.
2N/A
2N/A Using a data service-specific method of making
2N/A the data service temporarily unavailable, call the
2N/A function. DSVC_BUSY or DSVC_INTERNAL (different depending
2N/A on implementation) is returned.
2N/A
2N/A 2.3 Configured data service, available.
2N/A
2N/A Verify that DSVC_SUCCESS is returned.
2N/A
2N/A Case #3 open_dd:
2N/A
2N/A Perform the following subcases once each for the dhcptab
2N/A container and dhcp network container described in the test
2N/A data.
2N/A
2N/A 3.1 No container
2N/A
2N/A Call function with DSVC_READ | DSVC_WRITE.
2N/A Verify that DSVC_NOENT is returned.
2N/A
2N/A 3.2 Basic
2N/A
2N/A Using DSVC_CREATE | DSVC_READ | DSVC_WRITE,
2N/A create a dhcptab container and a dhcp network container
2N/A (called <network address>).
2N/A
2N/A 3.3 NON_BLOCK
2N/A
2N/A Call function with DSVC_READ | DSVC_WRITE |
2N/A DSVC_NONBLOCK. Depending on whether the public module
2N/A supports it (see module doc), the function should return
2N/A either DSVC_SUCCESS or DSVC_UNSUPPORTED.
2N/A
2N/A 3.4 Container exists
2N/A
2N/A Using DSVC_CREATE | DSVC_READ | DSVC_WRITE,
2N/A verify that the function returns DSVC_EXISTS.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #4 list_dd:
2N/A
2N/A 4.1 No containers
2N/A
2N/A Verify that list_dd returns DSVC_NOENT.
2N/A
2N/A Case #5 add_dd_entry:
2N/A
2N/A Create and load containers as per Case #5 and Case
2N/A #7 of the Basic Sanity Test.
2N/A
2N/A 5.1 Record exists
2N/A
2N/A Attempt to add a test data record for the
2N/A dhcptab container and dhcp network container
2N/A respectively. Verify that DSVC_EXISTS is returned.
2N/A
2N/A 5.2 Busy
2N/A
2N/A Close containers with close_dd. Reopen with
2N/A DSVC_NONBLOCK specified. If success is returned, using a
2N/A data service specific technique for making the service
2N/A busy, attempt to add an additional record to each of the
2N/A two containers. Verify that DSVC_BUSY is returned.
2N/A Remove the busy condition, and reattempt the add. Verify
2N/A that DSVC_SUCCESS is returned. close_dd the containers.
2N/A
2N/A 5.3 Read only
2N/A
2N/A Reopen the containers with DSVC_READ access
2N/A only. If success is returned, attempt to add a new
2N/A record to each container. Verify that DSVC_ACCESS is
2N/A returned. close_dd the containers.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #5 lookup_dd:
2N/A
2N/A Create and load containers as per Case #5 and Case #7 of
2N/A the Basic Sanity Test.
2N/A
2N/A 5.1. Record does not exist.
2N/A
2N/A Produce dhcptab container and dhcp network
2N/A container queries that would not be satisfied by the
2N/A test data. Verify that DSVC_SUCCESS is returned, and
2N/A "records" is 0.
2N/A
2N/A 5.2 Busy
2N/A
2N/A Close containers with close_dd. Reopen with
2N/A DSVC_NONBLOCK specified. If DSVC_SUCCESS is returned,
2N/A using a data service specific technique for making
2N/A the service busy, attempt to perform a valid lookup of
2N/A records in each of the two containers. Verify that DSVC_BUSY
2N/A is returned. Remove the busy condition, and reattempt
2N/A the lookups. Verify that DSVC_SUCCESS is returned, and
2N/A that data returned is valid. close_dd the containers.
2N/A
2N/A 5.3 Write only
2N/A
2N/A Reopen the containers with DSVC_WRITE access
2N/A only. If success is returned, attempt to perform
2N/A lookup_dd's using any syntactically legal query for each
2N/A container type. Verify that DSVC_ACCESS is returned.
2N/A close_dd the containers.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #6 modify_dd_entry:
2N/A
2N/A Create and load containers as per Case #5 and Case #7 of
2N/A the Basic Sanity Test.
2N/A
2N/A 6.1 Unknown record
2N/A
2N/A Fabricate dn_rec_t / dt_rec_t instances known not
2N/A to exist in the respective containers. Attempt to modify
2N/A the records. Verify that DSVC_NOENT is returned.
2N/A
2N/A 6.2 Update Collision #1
2N/A
2N/A Use lookup_dd to find valid dhcptab and dhcp
2N/A network container records (one each). Change the
2N/A signature on the resultant dt_rec_t / dn_rec_t. Attempt
2N/A to modify records. Verify that DSVC_COLLISION is returned.
2N/A
2N/A 6.3 Update Collision #2
2N/A
2N/A Use lookup_dd to find valid dhcptab and dhcp
2N/A network container records (one each). Attempt to rename
2N/A the records to names which already exist (dt_key +
2N/A dt_type, dn_cip). Verify that DSVC_EXISTS is returned.
2N/A
2N/A 6.4 Busy
2N/A
2N/A Close containers with close_dd. Reopen with
2N/A DSVC_NONBLOCK specified. If DSVC_SUCCESS is returned,
2N/A acquire valid dhcptab and dhcp network container
2N/A records using lookup_dd. Using a data service specific
2N/A technique for making the service busy, attempt to
2N/A modify the value (non-key fields) of the records. Verify
2N/A that DSVC_BUSY is returned. Remove the busy condition,
2N/A and reattempt the modifies. Verify that DSVC_SUCCESS
2N/A is returned. Reacquire the records. Verify that the
2N/A contents have been suitably updated. close_dd the
2N/A containers.
2N/A
2N/A 6.5 Read only
2N/A
2N/A Reopen the containers with DSVC_READ access
2N/A only. If success is returned, locate valid container
2N/A records using the appropriate queries to lookup_dd.
2N/A Modify the contents of a copy of the dt_rec_t /
2N/A dn_rec_t. Attempt to modify the record in the containers.
2N/A Verify that DSVC_ACCESS is returned. close_dd the
2N/A containers.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #7 free_dd:
2N/A
2N/A This function should be used to release the results of
2N/A lookup_dd calls. Its operation must be validated by running this
2N/A test suite under bcheck with -memuse, and ensuring that no free
2N/A blocks remain after exit. Note that the test suite must be
2N/A written with care to make this case useful (free any allocated
2N/A memory before exit).
2N/A
2N/A Case #8 delete_dd_entry:
2N/A
2N/A Create and load containers as per Case #5 and Case #7 of
2N/A the Basic Sanity Test.
2N/A
2N/A 8.1 Unknown record
2N/A
2N/A Fabricate dn_rec_t / dt_rec_t instances known not
2N/A to exist in the respective containers. Attempt to delete
2N/A the records. Verify that DSVC_NOENT is returned.
2N/A
2N/A 8.2 Busy
2N/A
2N/A Close containers with close_dd. Reopen with
2N/A DSVC_NONBLOCK specified. If DSVC_SUCCESS is returned,
2N/A acquire valid dhcptab and dhcp network container
2N/A records using lookup_dd. Using a data service specific
2N/A technique for making the service busy, attempt to
2N/A delete the records. Verify that DSVC_BUSY is returned.
2N/A Remove the busy condition, and reattempt the deletes.
2N/A Verify that DSVC_SUCCESS is returned. Attempt to
2N/A reacquire the records. Verify that the records have been
2N/A deleted. close_dd the containers.
2N/A
2N/A 8.3 Read only
2N/A
2N/A Reopen the containers with DSVC_READ access
2N/A only. If success is returned, locate valid container
2N/A records using the appropriate queries to lookup_dd.
2N/A Attempt to delete the records in the containers.
2N/A Verify that DSVC_ACCESS is returned. close_dd the
2N/A containers.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #9 close_dd:
2N/A
2N/A 9.1 Busy
2N/A
2N/A Create containers as per Case #5 of the Basic
2N/A Sanity Test, with the exception that DSVC_NONBLOCK is
2N/A specified. If DSVC_SUCCESS is returned, using a data
2N/A service specific technique for making the service busy,
2N/A attempt to close the containers using the handles
2N/A returned by open_dd. Verify that DSVC_BUSY is returned.
2N/A Remove the busy condition, and reattempt the close_dd.
2N/A Verify that DSVC_SUCCESS is returned.
2N/A
2N/A Cleanup: Remove the containers using remove_dd.
2N/A
2N/A Case #10 remove_dd:
2N/A
2N/A Create containers as per Case #5 of the Basic Sanity Test.
2N/A
2N/A 10.1 Unknown container
2N/A
2N/A Attempt to remove a non-existent dhcp network
2N/A container. Verify that DSVC_NOENT is returned.
2N/A
2N/A 10.2 Busy
2N/A
2N/A Close containers with close_dd. Reopen with
2N/A DSVC_NONBLOCK specified. If DSVC_SUCCESS is returned,
2N/A using a data service specific technique for making the
2N/A service busy, attempt to remove the containers. Verify
2N/A that DSVC_BUSY is returned. Remove the busy condition,
2N/A close_dd the containers, and reattempt the removes.
2N/A Verify that DSVC_SUCCESS is returned. Verify using
2N/A list_dd that the containers have been removed.
2N/A
2N/A Case #11 Multi-access stress
2N/A
2N/A The service provider layer modules underneath
2N/A the private layer are not required to manage reference
2N/A counts for open instances. So while individual private
2N/A layer handles are considered to be MT-safe (and parallel
2N/A access to data containers is suitably protected), an
2N/A application using the private layer API must synchronize
2N/A close and/or container remove operations among threads
2N/A such that no threads hold handles to a container after
2N/A the handle has been closed or the container has been
2N/A removed.
2N/A
2N/A This case assumes a test which is
2N/A multi-threaded, and can run the following test using
2N/A from 1 to THREADS threads. The test can also be run in
2N/A multiple concurrent processes.
2N/A
2N/A The goal of this test is to ensure that the API
2N/A is MT-safe with respect to the containers and the
2N/A records contained within those containers. This goal is
2N/A accomplished by verifying that the end result of the
2N/A test is consistent.
2N/A
2N/A Tunable default values:
2N/A
2N/A PROCESSES: 20
2N/A THREADS: 20
2N/A
2N/A 11.1 The dhcptab container test
2N/A
2N/A 11.1.1 open_dd
2N/A
2N/A Create a dhcptab using DSVC_CREATE |
2N/A DSVC_READ | DSVC_WRITE. If DSVC_EXISTS is
2N/A returned, retry the open attempt w/o the
2N/A DSVC_CREATE flag. Log that this event occurred.
2N/A Handle will be used for balance of test. If any
2N/A other error occurs, terminate the test as
2N/A failed.
2N/A
2N/A 11.1.2 add_dd_entry
2N/A
2N/A Add the test data records to the dhcptab
2N/A container. If DSVC_EXISTS is returned, skip that
2N/A record, and continue attempting to add the other
2N/A records. Log that this event occurred. If any
2N/A other error occurs, terminate the test as
2N/A failed.
2N/A
2N/A 11.1.3 lookup_dd
2N/A
2N/A Using DT_QKEY of "atlantic" and DT_QTYPE
2N/A of "m", find the atlantic record. Compare its
2N/A value against the test data. If it has
2N/A changed, then output a message to this affect.
2N/A If any error occurs, terminate the test as failed.
2N/A
2N/A 11.1.4 modify_dd_entry
2N/A
2N/A Using the results of 11.1.3, change the
2N/A record as follows. If it is no different from
2N/A the test data, change the value to:
2N/A
2N/A :Timeserv=129.148.174.28:LeaseTim=86400: \
2N/A :Hostname:DNSdmain="east.sun.com":DNSserv=172.23.3.3:
2N/A
2N/A If it doesn't match the test data
2N/A value, change the LeaseTim by incrementing it by
2N/A one. Attempt to update the record. If it fails
2N/A with DSVC_COLLISION, retry 11.1.3 and 11.1.4 for
2N/A three attempts. Log message if modify was
2N/A unsuccessful. If any other error occurs,
2N/A terminate the test as failed.
2N/A
2N/A 11.1.5 delete_dd_entry
2N/A
2N/A Use lookup_dd to find a DT_QKEY of
2N/A "SjumpsCF" and a DT_QTYPE of "s". If it does
2N/A not exist, log a message. If it does exist,
2N/A attempt to delete it. If DSVC_NOENT is returned,
2N/A log a message.
2N/A
2N/A 11.1.6 close_dd
2N/A
2N/A Use close_dd to close the open handle.
2N/A If DSVC_NOENT is returned, log a message.
2N/A
2N/A 11.1.7 epilogue
2N/A
2N/A Compare the resultant dhcptab container
2N/A to the test data. The only differences should be
2N/A a changed value of the atlantic macro as
2N/A expected from 11.1.4 and the SjumpsCF symbol
2N/A should be removed. Any other inconsistency means
2N/A the test has failed.
2N/A
2N/A Clean up: Remove the dhcptab container.
2N/A
2N/A 11.2 The dhcp network container test
2N/A
2N/A 11.2.1 open_dd
2N/A
2N/A Create a <network address> dhcp network
2N/A container using DSVC_CREATE | DSVC_READ | DSVC_WRITE.
2N/A If DSVC_EXISTS is returned, retry the open
2N/A attempt w/o the DSVC_CREATE flag. Log that this
2N/A event occurred. Handle will be used for balance
2N/A of test. If any other error occurs, terminate
2N/A the test as failed.
2N/A
2N/A 11.2.2 add_dd_entry
2N/A
2N/A Add the test data records to the dhcp
2N/A network container. If DSVC_EXISTS is
2N/A returned, skip that record, and continue
2N/A attempting to add the other records. Log that
2N/A this event occurred. If any other error occurs,
2N/A terminate the test as failed.
2N/A
2N/A 11.2.3 lookup_dd
2N/A
2N/A Find the DN_QCIP of <network address>+102
2N/A record. Compare its value against the test data.
2N/A If it has changed, then output a message to this
2N/A affect. If any error occurs, terminate the test
2N/A as failed.
2N/A
2N/A 11.2.4 modify_dd_entry
2N/A
2N/A Using the results of 11.2.3, change the
2N/A record as follows. If it is no different from
2N/A the test data, change the value to:
2N/A
2N/A01DEADBEEF 03 <network address>+102 172.23.3.3 941619403 Solaris
2N/A
2N/A If it doesn't match the test data
2N/A value, change dn_lease by incrementing it by
2N/A one. Attempt to update the record. If it fails
2N/A with DSVC_COLLISION, retry 11.2.3 and 11.2.4 for
2N/A three attempts. Log message if modify was
2N/A unsuccessful. If any other error occurs,
2N/A terminate the test as failed.
2N/A
2N/A 11.2.5 delete_dd_entry
2N/A
2N/A Use lookup_dd to find a DN_QCIP of
2N/A <network address>+1001. If it does not exist,
2N/A log a message. If it does exist, attempt to
2N/A delete it. If DSVC_NOENT is returned, log a
2N/A message.
2N/A
2N/A 11.2.6 close_dd
2N/A
2N/A Use close_dd to close the open handle.
2N/A If DSVC_NOENT is returned, log a message.
2N/A
2N/A 11.2.7 epilogue
2N/A
2N/A The <network address> dhcp network
2N/A container should be consistent at the end of
2N/A a test run. The only differences should be a
2N/A changed value of the <network address>+102
2N/A record with the value as per 11.2.4 and the
2N/A lease time potentially incremented, as well as
2N/A the <network address>+1001 record missing.
2N/A Any other inconsistency means the test has
2N/A failed.
2N/A
2N/A Cleanup: remove <network address> dhcp network
2N/A container.
2N/A
2N/A 11.3 Multi-process run
2N/A
2N/A Run 11.1 and 11.2 in PROCESSES separate
2N/A processes.
2N/A
2N/A 11.4 Multi-threaded run, single process
2N/A
2N/A Run 11.1 and 11.2 in THREADS separate threads
2N/A within a single process.
2N/A
2N/A 11.5 Multi-process, Multi-threaded run
2N/A
2N/A Run 11.1 and 11.2 in PROCESSES separate
2N/A processes each spawning THREADS separate threads.
2N/A
2N/AREFERENCES
2N/A
2N/A [1] "Enterprise DHCP Service Architecture Specification", mwc,
2N/A 6/25/1999.
2N/A
2N/A [2] "Enterprise Reference Hardware Platforms", mwc, 10/23/1999.