Bug 22733 - Temp file layout tests fail on Linux
Summary: Temp file layout tests fail on Linux
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-08 01:56 PST by Dean McNamee
Modified: 2008-12-11 16:09 PST (History)
0 users

See Also:


Attachments
Patch to always append / after the temp directory. (3.83 KB, patch)
2008-12-08 01:58 PST, Dean McNamee
darin: review-
Details | Formatted Diff | Diff
Now with a changelog. (4.79 KB, patch)
2008-12-08 10:48 PST, Dean McNamee
no flags Details | Formatted Diff | Diff
Now with a changelog. (4.77 KB, patch)
2008-12-08 10:49 PST, Dean McNamee
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean McNamee 2008-12-08 01:56:49 PST
LayoutTests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-invalidation-by-header.html
LayoutTests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache-timeout.html
LayoutTests/http/tests/xmlhttprequest/access-control-basic-allow-preflight-cache.html

For example, these tests fail due to a platform difference in their use of the builtin PHP sys_get_temp_dir.  See the comments at:

http://us.php.net/sys_get_temp_dir

"""This function does not always add trailing slash. This behaviour is inconsistent across systems, so you have keep an eye on it."""

When running layout tests on Linux, sys_get_temp_dir does not return a trailing slash.  We can see an example of the failure via strace:

[pid 13932] open("/tmppreflightCacheTimeout.txt", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = -1 EACCES (Permission denied)

The solution is just to always append a trailing slash, on some platforms this might result in /tmp//blah, but that shouldn't be a problem.
Comment 1 Dean McNamee 2008-12-08 01:58:19 PST
Created attachment 25838 [details]
Patch to always append / after the temp directory.
Comment 2 Dean McNamee 2008-12-08 03:02:12 PST
I realized I forgot a ChangeLog, if the patch looks ok I'll add one.
Comment 3 Darin Adler 2008-12-08 10:26:27 PST
Comment on attachment 25838 [details]
Patch to always append / after the temp directory.

Seems like a fine change. But this patch lacks a ChangeLog entry. That makes extra work for the committer. So please submit a new patch with the ChangeLog entry.
Comment 4 Dean McNamee 2008-12-08 10:48:39 PST
Created attachment 25844 [details]
Now with a changelog.
Comment 5 Dean McNamee 2008-12-08 10:49:53 PST
Created attachment 25845 [details]
Now with a changelog.
Comment 6 Dean McNamee 2008-12-08 12:24:03 PST
Thanks for the review.  I don't have commit access, so it would be great for someone to commit it for me.
Comment 7 Holger Freyther 2008-12-11 16:09:32 PST
Landed in r39202.