
 1) RPM file contains 4 sections
    TESTS:

	a) Simple package containing all 4 sections installs correctly
	b) Simple package missing 1st sections fails to install correctly
	c) Simple package missing 2nd sections fails to install correctly
	d) Simple package missing 3rd sections fails to install correctly
	e) Simple package missing 4th sections fails to install correctly

 2) RPM file section must be in order
    TESTS:

	a) Simple package containing all 4 sections installs correctly
	b) Simple package with 1st and 2nd section swapped fails to install correctly
	c) Simple package with 1st and 3rd section swapped fails to install correctly
	d) Simple package with 1st and 4th section swapped fails to install correctly
	e) Simple package with 2nd and 3rd section swapped fails to install correctly
	f) Simple package with 2nd and 4th section swapped fails to install correctly
	g) Simple package with 3rd and 4th section swapped fails to install correctly



Lead Section

 1) Lead section identifies file
    TESTS:

	a) Verify that the simple package when installed is identified by the
	   name in the Lead section.

 2) Lead section contains magic value of "\355\253\356\333"
    TESTS:

	a) Verify that the simple package with correct magic installs correctly
	b) Verify that the simple package with incorrect magic fails to install

 3) Lead section contains major number of 3
    TESTS:

	a) Verify that the simple package with correct major number installs correctly
	b) Verify that the simple package with incorrect major number fails to install

 4) Lead section contains minor number of 0
    TESTS:

	a) Verify that the simple package with correct minor number installs correctly
	b) Verify that the simple package with incorrect minor number fails to install

 5) Lead section contains type number of 0
    TESTS:

	a) Verify that the simple package with correct type number installs correctly
	b) Verify that the simple package with incorrect type number fails to install

 6) Lead section contains archnum as specified in the archLSB.
    TESTS:

	a) Verify that the simple package with correct archnum installs correctly
	b) Verify that the simple package with incorrect archnum fails to install

 7) Lead field name is NUL terminated
    TESTS:

	a) Verify that the simple package with correct name installs correctly
	b) Verify that the simple package with incorrect name fails to install

 8) Lead section contains osnum number of 0
    TESTS:

	a) Verify that the simple package with correct osnum installs correctly
	b) Verify that the simple package with incorrect osnum fails to install

 9) Lead section contains signature_type number of 5
    TESTS:

	a) Verify that the simple package with correct name installs correctly
	b) Verify that the simple package with incorrect name fails to install

10) Value of Lead reserved space is ignored
    TESTS:

	a) Verify that the simple package with random value in reserved field installs correctly



Header Record

13) Header Structure must contain at least 1 index record
    TESTS:

	a) Verify that the simple package with 1 or more indicies install correctly
	b) Verify that the simple package with 0 indicies fails to install

14) Header Structure must be aligned on 8 byte boundary
    TESTS:

	a) Verify that the simple package with correctly aligned Header install correctly
	b) Verify that the simple package with incorrectly aligned Header fails to install

15) Header Record contains magic value of "\216\255\350\001"
    TESTS:

	a) Verify that the simple package with correct magic installs correctly
	b) Verify that the simple package with incorrect magic fails to install

16) Header Record contains reserved value of "\000\000\000\000"
    TESTS:

	a) Verify that the simple package with correct reserved value installs correctly
	b) Verify that the simple package with incorrect reserved value fails to install


Index Record

17) Index Record must contain legal Tag value
    TESTS:

	a) Verify that the simple package with legal Tag values install correctly
	b) Verify that the simple package with illegal Tag values fails to install

18) Index Record must contain legal Type value
    TESTS:

	a) Verify that the simple package with legal type values install correctly
	b) Verify that the simple package with illegal type values fails to install

19) Index Record offset value must be between 0 and the value in hsize
    TESTS:

	a) Verify that the simple package with 0<offset<hsize install correctly
	b) Verify that the simple package with offset=0 fails to install
	c) Verify that the simple package with offset>0 fails to install

20) Verify all types listed in Table 16-3 (and implemented) can be installed

	a) Verify that a simple package containing each type installs correctly

21) Verify alignment of types listed in Table 16-3 (and implemented)

	a) Verify that a simple package containing each type correctly aligned installs correctly
	b) Verify that a simple package containing each type incorrectly aligned fails to install

22) RPM_STRING_ARRAY_TYPE must contain count number of NUL seperated strings.
    TESTS:

	a) Verify that the simple package with matching count/num strings install correctly
	b) Verify that the simple package with mismatched count/num strings fails to install

23) RPM_I18NSTRING_TYPE must always have a count if 1
    TESTS:

	a) Verify that the simple package with RPM_I18NSTRING_TYPE index count of 1 installs correctly
	b) Verify that the simple package with RPM_I18NSTRING_TYPE index count not 1 fails to install

24) RPM_I18NSTRING_TYPE index has the same number of entries as the count of the HDRTAG_HDRI18NTABLE index.
    TESTS:

	a) Verify that a simple package with RPM_I18NSTRING_TYPE strings matching the count of the HDRTAG_HDRI18NTABLE index installs correctly
	b) Verify that a simple package with RPM_I18NSTRING_TYPE strings not matching the count of the HDRTAG_HDRI18NTABLE index fails to install correctly



Header Private Tags

25) Header Private tag RPMTAG_HEADERSIGNATURES must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_HEADERSIGNATURES in the Signature Section installs correctly
	b) Verify that a simple package without RPMTAG_HEADERSIGNATURES installs correctly
	c) Verify that a simple package with RPMTAG_HEADERSIGNATURES in the Header Section fails to install correctly
	d) Verify that a simple package with RPMTAG_HEADERSIGNATURES of type other than BIN fails to install correctly
	e) Verify that a simple package with RPMTAG_HEADERSIGNATURES of count other than 16 fails to install correctly

26) Header Private tag RPMTAG_HEADERIMMUTABLE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_HEADERIMMUTABLE installs correctly
	b) Verify that a simple package without RPMTAG_HEADERIMMUTABLE installs correctly
	c) Verify that a simple package with RPMTAG_HEADERIMMUTABLE of type other than BIN fails to install correctly
	d) Verify that a simple package with RPMTAG_HEADERIMMUTABLE of count other than 16 fails to install correctly

27) Header Private tag RPMTAG_HEADERI18NTABLE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_HEADERI18NTABLE installs correctly
	b) Verify that a simple package without RPMTAG_HEADERI18NTABLE installs correctly
	c) Verify that a simple package with RPMTAG_HEADERI18NTABLE of type other than STRING_ARRAY fails to install correctly



Header Section

28) Header Section tag SIGTAG_SIGSIZE must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_SIGSIZE in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_SIGSIZE fails to install correctly
	c) Verify that a simple package with SIGTAG_SIGSIZE in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_SIGSIZE value not equal to the sizeof the Header and Payload sections fails to install correctly
	e) Verify that a simple package with SIGTAG_SIGSIZE of type other than INT32 fails to install correctly
	f) Verify that a simple package with SIGTAG_SIGSIZE of count other than 1 fails to install correctly

29) Header Section tag SIGTAG_PAYLOADSIZE must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_PAYLOADSIZE in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_PAYLOADSIZE installs correctly
	c) Verify that a simple package with SIGTAG_PAYLOADSIZE in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_PAYLOADSIZE value not equal to the sizeof the uncompressed Payload section fails to install correctly
	e) Verify that a simple package with SIGTAG_PAYLOADSIZE of type other than INT32 fails to install correctly
	f) Verify that a simple package with SIGTAG_PAYLOADSIZE of count other than 1 fails to install correctly

30) Header Section tag SIGTAG_MD5 must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_MD5 in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_MD5 fails to install correctly
	c) Verify that a simple package with SIGTAG_MD5 in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_MD5 value not equal to the 128-bit MD5 checksum of the combined Header and Archive Sections fails to install correctly
	e) Verify that a simple package with SIGTAG_MD5 of type other than BIN fails to install correctly
	f) Verify that a simple package with SIGTAG_MD5 of count other than 16 fails to install correctly

31) Header Section tag SIGTAG_SHA1HEADER must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_SHA1HEADER in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_SHA1HEADER installs correctly
	c) Verify that a simple package with SIGTAG_SHA1HEADER in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_SHA1HEADER value not equal to the SHA1 checksum of the Header Section fails to install correctly
	e) Verify that a simple package with SIGTAG_SHA1HEADER of type other than STRING fails to install correctly
	f) Verify that a simple package with SIGTAG_SHA1HEADER of count other than 1 fails to install correctly

32) Header Section tag SIGTAG_PGP must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_PGP in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_PGP installs correctly
	c) Verify that a simple package with SIGTAG_PGP in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_PGP value not equal to the RSA signature of the combined Header and Payload Section fails to install correctly
	e) Verify that a simple package with SIGTAG_PGP of type other than BIN fails to install correctly
	f) Verify that a simple package with SIGTAG_PGP of count other than 1 fails to install correctly

33) Header Section tag SIGTAG_GPG must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_GPG in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_GPG installs correctly
	c) Verify that a simple package with SIGTAG_GPG in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_GPG value not equal to the DSA signature of the combined Header and Payload Section fails to install correctly
	e) Verify that a simple package with SIGTAG_GPG of type other than BIN fails to install correctly
	f) Verify that a simple package with SIGTAG_GPG of count other than 1 fails to install correctly

34) Header Section tag SIGTAG_DSAHEADER must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_DSAHEADER in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_DSAHEADER installs correctly
	c) Verify that a simple package with SIGTAG_DSAHEADER in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_DSAHEADER value not equal to the DSA signature of the Header Section fails to install correctly
	e) Verify that a simple package with SIGTAG_DSAHEADER of type other than BIN fails to install correctly
	f) Verify that a simple package with SIGTAG_DSAHEADER of count other than 1 fails to install correctly

32) Header Section tag SIGTAG_RSAHEADER must be supported
    TESTS:

	a) Verify that a simple package with SIGTAG_RSAHEADER in the Signature Section installs correctly
	b) Verify that a simple package without SIGTAG_RSAHEADER installs correctly
	c) Verify that a simple package with SIGTAG_RSAHEADER in the Header Section fails to install correctly
	d) Verify that a simple package with SIGTAG_RSAHEADER value not equal to the RSA signature of the Header Section fails to install correctly
	e) Verify that a simple package with SIGTAG_RSAHEADER of type other than BIN fails to install correctly
	f) Verify that a simple package with SIGTAG_RSAHEADER of count other than 1 fails to install correctly

33) Header Section tag RPMTAG_NAME must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_NAME in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_NAME fails to install
	c) Verify that a simple package with RPMTAG_NAME in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_NAME matches the name displayed by the installation tool
	e) Verify that a simple package with RPMTAG_NAME of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_NAME of count other than 1 fails to install correctly

34) Header Section tag RPMTAG_VERSION must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_VERSION in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_VERSION fails to install
	c) Verify that a simple package with RPMTAG_VERSION in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_VERSION matches the version displayed by the installation tool
	e) Verify that a simple package with RPMTAG_VERSION of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_VERSION of count other than 1 fails to install correctly

35) Header Section tag RPMTAG_RELEASE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_RELEASE in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_RELEASE fails to install
	c) Verify that a simple package with RPMTAG_RELEASE in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_RELEASE matches the release displayed by the installation tool
	e) Verify that a simple package with RPMTAG_RELEASE of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_RELEASE of count other than 1 fails to install correctly

36) Header Section tag RPMTAG_SUMMARY must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_SUMMARY in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_SUMMARY fails to install
	c) Verify that a simple package with RPMTAG_SUMMARY in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_SUMMARY matches the summary displayed by the installation tool
	e) Verify that a simple package with RPMTAG_SUMMARY of type other than I18NSTRING fails to install correctly
	f) Verify that a simple package with RPMTAG_SUMMARY of count other than 1 fails to install correctly

37) Header Section tag RPMTAG_DESCRIPTION must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_DESCRIPTION in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_DESCRIPTION fails to install
	c) Verify that a simple package with RPMTAG_DESCRIPTION in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_DESCRIPTION matches the description displayed by the installation tool
	e) Verify that a simple package with RPMTAG_DESCRIPTION of type other than I18NSTRING fails to install correctly
	f) Verify that a simple package with RPMTAG_DESCRIPTION of count other than 1 fails to install correctly

38) Header Section tag RPMTAG_SIZE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_SIZE in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_SIZE fails to install
	c) Verify that a simple package with RPMTAG_SIZE in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_SIZE is equal to the sum of the sizes of the regular files in the Payload archive.
	e) Verify that a simple package with RPMTAG_SIZE of type other than INT32 fails to install correctly
	f) Verify that a simple package with RPMTAG_SIZE of count other than 1 fails to install correctly

39) Header Section tag RPMTAG_LICENSE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_LICENSE in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_LICENSE fails to install
	c) Verify that a simple package with RPMTAG_LICENSE in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_LICENSE matches the description displayed by the installation tool
	e) Verify that a simple package with RPMTAG_LICENSE of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_LICENSE of count other than 1 fails to install correctly

40) Header Section tag RPMTAG_GROUP must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_GROUP in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_GROUP fails to install
	c) Verify that a simple package with RPMTAG_GROUP in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_GROUP matches the group displayed by the installation tool
	e) Verify that a simple package with RPMTAG_GROUP of type other than I18NSTRING fails to install correctly
	f) Verify that a simple package with RPMTAG_GROUP of count other than 1 fails to install correctly

41) Header Section tag RPMTAG_OS must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_OS in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_OS fails to install
	c) Verify that a simple package with RPMTAG_OS in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_OS matches the OS displayed by the installation tool
	e) Verify that a simple package with RPMTAG_OS of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_OS of count other than 1 fails to install correctly

42) Header Section tag RPMTAG_ARCH must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_ARCH in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_ARCH fails to install
	c) Verify that a simple package with RPMTAG_ARCH in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_ARCH matches the architecture displayed by the installation tool
	e) Verify that a simple package with RPMTAG_ARCH of type other than STRING fails to install correctly
	f) Verify that a simple package with RPMTAG_ARCH of count other than 1 fails to install correctly

43) Header Section tag RPMTAG_SOURCERPM must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_SOURCERPM in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_SOURCERPM installs correctly
	c) Verify that a simple package with RPMTAG_SOURCERPM in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_SOURCERPM of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_SOURCERPM of count other than 1 fails to install correctly

44) Header Section tag RPMTAG_ARCHIVESIZE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_ARCHIVESIZE in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_ARCHIVESIZE installs correctly
	c) Verify that a simple package with RPMTAG_ARCHIVESIZE in the Signature Section fails to install correctly
	d) Verify that the value specified by RPMTAG_ARCHIVESIZE is equal to the size of the uncompresses Payload archive
	e) Verify that a simple package with RPMTAG_ARCHIVESIZE of type other than INT32 fails to install correctly
	f) Verify that a simple package with RPMTAG_ARCHIVESIZE of count other than 1 fails to install correctly

45) Header Section tag RPMTAG_RPMVERSION must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_RPMVERSION in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_RPMVERSION installs correctly
	c) Verify that a simple package with RPMTAG_RPMVERSION in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_RPMVERSION of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_RPMVERSION of count other than 1 fails to install correctly

46) Header Section tag RPMTAG_COOKIE must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_COOKIE in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_COOKIE installs correctly
	c) Verify that a simple package with RPMTAG_COOKIE in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_COOKIE of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_COOKIE of count other than 1 fails to install correctly

47) Header Section tag RPMTAG_PAYLOADFORMAT must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_PAYLOADFORMAT in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_PAYLOADFORMAT fails to install
	c) Verify that a simple package with RPMTAG_PAYLOADFORMAT in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_PAYLOADFORMAT of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_PAYLOADFORMAT of count other than 1 fails to install correctly

48) Header Section tag RPMTAG_PAYLOADCOMPRESSOR must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_PAYLOADCOMPRESSOR in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_PAYLOADCOMPRESSOR fails to install
	c) Verify that a simple package with RPMTAG_PAYLOADCOMPRESSOR in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_PAYLOADCOMPRESSOR of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_PAYLOADCOMPRESSOR of count other than 1 fails to install correctly

49) Header Section tag RPMTAG_PAYLOADFLAGS must be supported
    TESTS:

	a) Verify that a simple package with RPMTAG_PAYLOADFLAGS in the Header Section installs correctly
	b) Verify that a simple package without RPMTAG_PAYLOADFLAGS fails to install
	c) Verify that a simple package with RPMTAG_PAYLOADFLAGS in the Signature Section fails to install correctly
	d) Verify that a simple package with RPMTAG_PAYLOADFLAGS of type other than STRING fails to install correctly
	e) Verify that a simple package with RPMTAG_PAYLOADFLAGS of count other than 1 fails to install correctly


