Exemplo n.º 1
0
def testStaleClientid(t, env):
    """LOCK with a bad clientid should return NFS4ERR_STALE_CLIENTID

    FLAGS: lock all
    DEPEND: MKFILE
    CODE: LOCK10
    """
    c = env.c1
    c.init_connection()
    fh, stateid = c.create_confirm(t.code)
    orig_clientid = c.clientid
    try:
        c.clientid = get_invalid_clientid()
        res = c.lock_file(t.code, fh, stateid, 0, 25)
        check(res, NFS4ERR_STALE_CLIENTID, "LOCK with a bad clientid")
    finally:
        c.clientid = orig_clientid
Exemplo n.º 2
0
def testStaleClientid(t, env):
    """LOCK with a bad clientid should return NFS4ERR_STALE_CLIENTID

    FLAGS: lockt all
    DEPEND: MKFILE
    CODE: LKT9
    """
    c = env.c1
    c.init_connection()
    fh, stateid = c.create_confirm(t.code)
    orig_clientid = c.clientid
    try:
        c.clientid = get_invalid_clientid()
        res = c.lock_test(fh)
        check(res, NFS4ERR_STALE_CLIENTID, "LOCKT with a bad clientid")
    finally:
        c.clientid = orig_clientid