; Erase gap test 12. ; ; Test 12: Check invalid trailing record length across gap. ; ; Operations: ; - write 2500 byte record 000000 ; - write 2324 byte record "AA" ; - write 256 byte record "BB" ; - rewind ; - write 32 byte record "CC" ; - write gap ; ; Record "CC" overwrites record 000000, leaving 2464 bytes of zeros, followed ; by 000000's trailing length marker of 2500. The gap scan finds 616 tape marks ; and a valid leading length marker of 2500. However, the trailing length ; marker, which falls outside of the gap but within the file, is "BBBB" and ; does not match, so the tape is considered to be invalid, and the rest of the ; scan is skipped. The nominal 4800-byte gap overwrites the tape marks, the ; trailing length marker, and record "AA" exactly, leaving record "BB" ; untouched. ; ; Correct tape: ; Processing tape file 1 ; Obj 1, position 0, erase gap, length = 4800 (0x12C0) ; Obj 2, position 4800, record 1, length = 32 (0x20) ; Obj 3, position 4840, erase gap, length = 4800 (0x12C0) ; Obj 4, position 9640, record 2, length = 256 (0x100) ; End of physical tape attach -n msc0 gap-test-12.tape go until '@' ; reply '10 SEL0\r' go until '@' ; reply '20 SD ZE 1250\r' go until '@' ; reply '25 WR\r' go until '@' ; reply '30 SD AA 1162\r' go until '@' ; reply '35 WR\r' go until '@' ; reply '40 SD BB 128\r' go until '@' ; reply '45 WR\r' go until '@' ; reply '50 REW\r' go until '@' ; reply '51 GOSB 3000\r' go until '@' ; reply '60 SD CC 16\r' go until '@' ; reply '65 WR\r' go until '@' ; reply '70 GAP\r' go until '@' ; reply '1000 STOP\r' go until '@' ; reply '2000 SFC 2000\r' go until '@' ; reply '2010 RTN\r' go until '@' ; reply '3000 SFC 3000\r' go until '@' ; reply '3010 SC 3010 100100\r' go until '@' ; reply '3020 RTN\r' go until '@' ; reply 'GO\r' go until '@' ; reply 'BYE\r' go detach msc0 ! mtdump gap-test-12.tape > gap-test-12.log