# Check that the root device gets detached
# XXX hard coded disk name sd0

import os
from bracket import *

name = 'root_detach'

def test_func(ts):
    status = runv(['zgrep', 'sd0: detached',
                   os.path.join(results_dir(ts), 'test.log.gz')])
    # We succeed if grep does find a detach message
    return status == 0

def op():
    return TestOp(test_func, [test_completed_op], name = name)
