# HG changeset patch # User Maxim Dounin # Date 1329843501 0 # Node ID 606a4df6895201cac56d9e09405ef4b4b1616ebf # Parent d838248b643a176e79433bb7b8d42ea4b8d9f85f Tests: workaround for freebsd 8 in disable_symlinks tests. There are no O_SEARCH on FreeBSD yet, and we use O_EXEC|O_DIRECTORY instead. Unfortunately on FreeBSD 8 the O_DIRECTORY flag does nothing, and as a result openat(O_EXEC) fails with EACCESS while trying to open a file. Workaround is to make the file executable, thus allowing it to correctly fail with ENOTDIR on next call. diff --git a/http_disable_symlinks.t b/http_disable_symlinks.t --- a/http_disable_symlinks.t +++ b/http_disable_symlinks.t @@ -246,6 +246,12 @@ like(http_get('/complex/1/empty.html'), like(http_get('/complex/2/empty.html'), qr!200 OK!, 'complex root 2'); like(http_get('/complex/3/empty.html'), qr!200 OK!, 'complex root 3'); +# workaround for freebsd 8: we use O_EXEC instead of O_SEARCH (since there +# is no O_SEARCH), and O_DIRECTORY does nothing. setting the 'x' bit +# tests to pass as openat() will correctly fail with ENOTDIR + +chmod(0700, "$d/link"); + like(http_get('/link/tail'), qr!403 !, 'file with trailing /, on'); like(http_get('/link/tailowner'), qr!404 !, 'file with trailing /, owner'); like(http_get('/link/tailoff'), qr!404 !, 'file with trailing /, off');