'Smoke test
Module independent basic tests'

def smoke_test(self):

    pwd = self.mk_cgroup()
    ps = self.test('smoke')
    if (ps is None):
        raise error.TestError("cg.smoke_test:    Couldn't    create    process")
    if (ps.poll() is not None):
        raise error.TestError('cg.smoke_test:    Process    died    unexpectidly')
    if self.is_root_cgroup(ps.pid):
        raise error.TestError('cg.smoke_test:    Process    is    not    a    root    member')
    self.set_cgroup(ps.pid, pwd)
    try:
        self.rm_cgroup(pwd)
    except error.TestError:
        pass
    else:
        raise error.TestError('cg.smoke_test:    Unexpected    successful    deletion    of    the    used    cgroup')
    self.set_root_cgroup(ps.pid)
    self.rm_cgroup(pwd)
    ps.stdin.write('\n')
    time.sleep(2)
    if (ps.poll() is None):
        raise error.TestError('cg.smoke_test:    Process    is    not    finished')
