• Han-Wen Nienhuys's avatar
    nodefs: add TestInterrupt · 75418482
    Han-Wen Nienhuys authored
    This causes an INTERRUPT to happen, which is useful to see in
    practice.
    
    When adding a sleep to the READ operation, this yields the following
    trace:
    
     rx 28: OPEN i2 {O_RDONLY,0x8000} 
     tx 28:     OK, {Fh 1 }
     rx 30: READ i2 {Fh 1 [0 +4096)  L 0 RDONLY,0x8000} 
     killing subprocess
     rx 32: FLUSH i2 {Fh 1} 
     tx 32:     OK
     rx 33: INTERRUPT i0 {ix 32} 
     tx 33:     OK
     tx 30:     OK,  1024b data "********"...
     rx 34: RELEASE i2 {Fh 1 0x8000  L0} 
     tx 34:     OK
    
    
    ie. rather than canceling the READ, a FLUSH is issued which is then
    INTERRUPTed.
    75418482
interrupt_test.go 2.52 KB