# PDU specifications, used by ../src/pdu-gadget to produce a
# binary PDU stream for QA
#
# PDU_DESCS test cases
#
# PM_TYPE_DOUBLE == 5
# PM_SEM_INSTANT == 3
# PM_TIME_SEC == 3
# PM_SPACE_MBYTE = 2
# Note: units are faked here, not real units for sampledso.double.bin
#

# credentials: len type from ncred cred[0]
? PDU_CREDS 42 1 0x01020000

# descs: len type from numdesc pmid type indom sem units ...
# OK
? PDU_DESCS 42 2 pmid(sampledso.double.bin) 5 indom(30.2) 3 units(1.-1.0.2.3.0) pmid(sampledso.double.one) 5 -1 3 0

# descs: len type from numdesc pmid type indom sem units ...
# BAD short PDU < min size
? PDU_DESCS 42 0

# descs: len type from numdesc pmid type indom sem units ...
# BAD long PDU
? PDU_DESCS 42 2 pmid(sampledso.double.bin) 5 indom(30.2) 3 units(1.-1.0.2.3.0) pmid(sampledso.double.one) 5 -1 3 0 0xdeadbeef

# descs: len type from numdesc pmid type indom sem units ...
# BAD short PDU (Desc) or numdescs too big (Desc2)
? PDU_DESCS 42 2 pmid(sampledso.double.bin) 5 indom(30.2) 3 units(1.-1.0.2.3.0) pmid(sampledso.double.one) 5 -1 3

# descs: len type from numdesc pmid type indom sem units ...
# BAD numdescs negative
? PDU_DESCS 42 -1 pmid(sampledso.double.bin) 5 indom(30.2) 3 units(1.-1.0.2.3.0) pmid(sampledso.double.one) 5 -1 3

# descs: len type from numdesc pmid type indom sem units ...
# BAD numdescs wrong
? PDU_DESCS 42 3 pmid(sampledso.double.bin) 5 indom(30.2) 3 units(1.-1.0.2.3.0) pmid(sampledso.double.one) 5 -1 3
