Whamcloud - gitweb
LU-10443 test: Handle file lifecycle correctly 54/31254/2
authorPatrick Farrell <paf@cray.com>
Fri, 9 Feb 2018 15:00:13 +0000 (09:00 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 22 Feb 2018 05:40:54 +0000 (05:40 +0000)
commite528677e1630093362394ae36d725c321d0da4f2
tree0d113b6b1263fb5fab5b9b1409342daa53ce78d0
parent3ed62e0d1c12ccba3e8b1700d333fb55b76e3566
LU-10443 test: Handle file lifecycle correctly

The current lockahead_test.c removes the test file on exit,
which will destroy the locks which sanity.sh counts to
verify correct operation.  This usually works because
sanity.sh wins the race with the object destroy command
from the MDS to the OSS.

Change lockahead_test.c to remove the test file on entry,
and to use $tfile rather than its own file, so it is
automatically cleaned up by sanity.

Change-Id: I3cd1fdb7f33da167ca21476a7b3cbe5f57fd5782
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: https://review.whamcloud.com/31254
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/lockahead_test.c
lustre/tests/sanity.sh