RESOLVED FIXED Bug 22733
Temp file layout tests fail on Linux
https://bugs.webkit.org/show_bug.cgi?id=22733
Summary Temp file layout tests fail on Linux
Dean McNamee
Reported 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.
Attachments
Patch to always append / after the temp directory. (3.83 KB, patch)
2008-12-08 01:58 PST, Dean McNamee
darin: review-
Now with a changelog. (4.79 KB, patch)
2008-12-08 10:48 PST, Dean McNamee
no flags
Now with a changelog. (4.77 KB, patch)
2008-12-08 10:49 PST, Dean McNamee
darin: review+
Dean McNamee
Comment 1 2008-12-08 01:58:19 PST
Created attachment 25838 [details] Patch to always append / after the temp directory.
Dean McNamee
Comment 2 2008-12-08 03:02:12 PST
I realized I forgot a ChangeLog, if the patch looks ok I'll add one.
Darin Adler
Comment 3 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.
Dean McNamee
Comment 4 2008-12-08 10:48:39 PST
Created attachment 25844 [details] Now with a changelog.
Dean McNamee
Comment 5 2008-12-08 10:49:53 PST
Created attachment 25845 [details] Now with a changelog.
Dean McNamee
Comment 6 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.
Holger Freyther
Comment 7 2008-12-11 16:09:32 PST
Landed in r39202.
Note You need to log in before you can comment on or make changes to this bug.