Missing test in owner_modify: lock-proppatch
Javier Godoy
rjgodoy at fich.unl.edu.ar
Sat Feb 6 11:28:14 EST 2010
If a resource is locked and PROPPATCH is submitted with the right lock token,
the request should not fail
(given that the property is writable, and PROPPATCH is functional, which was
already tested in "props").
However, the owner_modify tests do only a PUT against a locked resource.
Compare this with notowner_modify that tests several other methods.
Suppose that the server does not recognize the submitted lock tocken for the
PROPPATCH method, but it does for PUT.
Since the owner of the lock should be able to PROPPATCH the locked resource,
owner_modify should fail if the server reject the request as LOCKED.
The modification proposed below makes owner_modify fail in this situation,
where litmus-0.12.1 does not report a failure:
11. owner_modify.......... FAIL (PROPPATCH on `/dav/litmus/lockme': 423
Locked)
26. owner_modify.......... FAIL (PROPPATCH on `/dav/litmus/lockme': 423
Locked)
33. owner_modify.......... FAIL (PROPPATCH on
`/dav/litmus/lockcoll/lockme.txt': 423 Locked)
It also pass if the server accepts the request, because the lock token
matches.
Patch: (in locks.c)
static int owner_modify(void)
{
PRECOND(gotlock);
ONV(ne_put(i_session, res, i_foo_fd),
("PUT on locked resource failed: %s", ne_get_error(i_session)));
//modified [[
char *tmp;
ne_propname pname = { "http://webdav.org/neon/litmus/", "random" };
ne_proppatch_operation pops[] = {
{ NULL, ne_propset, "foobar" },
{ NULL }
};
pops[0].name = &pname;
ONMREQ("PROPPATCH", res, ne_proppatch(i_session, res, pops));
// ]] modified
return OK;
}
Best Regards
Javier
More information about the litmus
mailing list