# grab couple shares
# ask for exclusive
# convert to exclusive with piority.
# unlock

nodecount 3


test
	lock 0 0 sharedfun shared noflags nolvb
	lrpl 0 0 sharedfun shared cachable ok nolvb
end

test
	lock 1 0 sharedfun shared noflags nolvb
	lrpl 1 0 sharedfun shared cachable ok nolvb
end

test
	lock 2 0 sharedfun exclusive noflags nolvb
	drop 0 0 sharedfun exclusive
	drop 1 0 sharedfun exclusive
end

# with the piority flag, this should jump in front of node2's request.
test
	lock 1 0 sharedfun exclusive piority nolvb
	drop 0 0 sharedfun exclusive
end

test
	lock 0 0 sharedfun unlock noflags nolvb
	lrpl 0 0 sharedfun unlock noflags ok nolvb
	lrpl 1 0 sharedfun exclusive piority ok nolvb
	drop 1 0 sharedfun exclusive
end

test
	lock 1 0 sharedfun unlock noflags nolvb
	lrpl 1 0 sharedfun unlock noflags ok nolvb
	lrpl 2 0 sharedfun exclusive cachable ok nolvb
end

test
	lock 1 0 sharedfun unlock noflags nolvb
	lrpl 1 0 sharedfun unlock noflags ok nolvb
end

test
	lock 2 0 sharedfun unlock noflags nolvb
	lrpl 2 0 sharedfun unlock noflags ok nolvb
end
