mirror of
https://github.com/iustin/mt-st.git
synced 2025-12-23 05:45:13 +00:00
Add a few more stinit parsing tests
This commit is contained in:
6
tests/data/bad-definition.data
Normal file
6
tests/data/bad-definition.data
Normal file
@@ -0,0 +1,6 @@
|
||||
# A non-compressing DAT (DDS-1)
|
||||
# The manufacturer, model, and revision strings can be obtained,
|
||||
# from the file /proc/scsi/scsi (cat /proc/scsi/scsi).
|
||||
manufacturer=XYZ model = "UVW1" {
|
||||
mode1 blocksize=
|
||||
}
|
||||
4
tests/data/incomplete-block.data
Normal file
4
tests/data/incomplete-block.data
Normal file
@@ -0,0 +1,4 @@
|
||||
# A non-compressing DAT (DDS-1)
|
||||
# The manufacturer, model, and revision strings can be obtained,
|
||||
# from the file /proc/scsi/scsi (cat /proc/scsi/scsi).
|
||||
manufacturer=XYZ model = "UVW1" {
|
||||
7
tests/data/large-units.data
Normal file
7
tests/data/large-units.data
Normal file
@@ -0,0 +1,7 @@
|
||||
# A non-compressing DAT (DDS-1)
|
||||
# The manufacturer, model, and revision strings can be obtained,
|
||||
# from the file /proc/scsi/scsi (cat /proc/scsi/scsi).
|
||||
manufacturer=XYZ model = "UVW1" {
|
||||
scsi2logical=1 can-bsr can-partitions auto-lock
|
||||
mode1 blocksize=1k
|
||||
mode2 blocksize=1M }
|
||||
@@ -12,3 +12,19 @@
|
||||
>>> /No errors found./
|
||||
>>>2 /Mode 1 definition: scsi2logical=1 can-bsr=1 auto-lock=0 two-fms=0 drive-buffering=1 buffer-writes read-ahead=1 async-writes=1 can-partitions=0 fast-eom=1 blocksize=0 sili=1 timeout=900 long-timeout=14400 density=0x44 compression=0/
|
||||
>>>= 0
|
||||
|
||||
# Check units
|
||||
./stinit -v -v -p -f tests/data/large-units.data
|
||||
>>> /No errors found./
|
||||
>>>2 /blocksize=1(k|M)/
|
||||
>>>= 0
|
||||
|
||||
# Incomplete block
|
||||
./stinit -p -v -f tests/data/incomplete-block.data
|
||||
>>>2 /End of definition block not found for/
|
||||
>>>= 1
|
||||
|
||||
# Wrong definition
|
||||
./stinit -p -v -f tests/data/bad-definition.data
|
||||
>>>2 /Warning: errors in definition for/
|
||||
>>>= 1
|
||||
|
||||
Reference in New Issue
Block a user