From b56b4c22d5ac3b453aafd25c927a17244219c88f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Jun 2010 13:46:18 +0000 Subject: [PATCH] * Test whether clients release their locks when they reboot. svn path=/nixos/branches/boot-order/; revision=22199 --- tests/nfs.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/nfs.nix b/tests/nfs.nix index 367a5bf3ab3..4a0ffe9a0d6 100644 --- a/tests/nfs.nix +++ b/tests/nfs.nix @@ -58,6 +58,12 @@ in $client1->succeed("flock -x /data/lock -c 'touch locked; sleep 100000' &"); $client1->waitForFile("locked"); $client2->fail("flock -n -s /data/lock true"); + + # Test whether client 2 obtains the lock if we reset client 1. + $client2->succeed("flock -s /data/lock -c 'echo acquired; touch locked' >&2 &"); + $client1->crash; + $client1->start; + $client2->waitForFile("locked"); ''; }