In the direct test, we use a temporary file (/tmp/direct) along with a
hugetlbfs file to initiate direct I/O.  Since we don't want to step on another
program that may be using a file with the same name, we open /tmp/direct with
O_EXCL to ensure it doesn't already exist.  Unfortunately, we were forgetting
to unlink it again and the test would not run subsequently.  Fix it up.

Signed-off-by: Adam Litke <[EMAIL PROTECTED]>
---

 tests/direct.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/tests/direct.c b/tests/direct.c
index 353e857..f10f7d5 100644
--- a/tests/direct.c
+++ b/tests/direct.c
@@ -60,6 +60,7 @@ int main(int argc, char *argv[])
                else
                        CONFIG("Falied to open direct-IO file");
        }
+       unlink(TMPFILE);
 
        p = mmap(NULL, hpage_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
        if (p == MAP_FAILED)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to