Modify the file path "conformance/interfaces/mlockall/3-7.c" to 
"/tmp/mlockall_3-7-XXXXXX".

Signed-off-by: Peng Haitao <[email protected]>
Signed-off-by: Tang Chen <[email protected]>
---
 .../conformance/interfaces/mlockall/3-7.c          |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c 
b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
index 93eb300..0ad6d8f 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
@@ -24,6 +24,7 @@ int main() {
        size_t page_size;
        int result, fd;
        void *foo;
+       char filename[] = "/tmp/mlockall_3-7-XXXXXX";
 
        page_size = sysconf(_SC_PAGESIZE);
        if (errno) {
@@ -31,11 +32,12 @@ int main() {
                return PTS_UNRESOLVED;
        }
 
-       fd = open("conformance/interfaces/mlockall/3-7.c", O_RDONLY);
+       fd = mkstemp(filename);
        if (fd == -1) {
                perror("An error occurs when calling open()");
                return PTS_UNRESOLVED;
        }
+       unlink(filename);
 
        foo = mmap(NULL, page_size, PROT_READ, MAP_SHARED, fd, 0);
                if (foo == MAP_FAILED) {
@@ -64,4 +66,4 @@ int main() {
        }
        perror("Unexpected error");
        return PTS_UNRESOLVED;
-}
\ No newline at end of file
+}
-- 
1.7.1

-- 
Best Regards,
Peng Haitao


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to