llvm/libcxx
Ryan Prichard b4722cc4c9 [libc++][test] Fix infinite loop when mkstemp fails
mkstemp is guaranteed to make at least TMP_MAX attempts to create the
random file, and if it can't, it fails with EEXIST. get_temp_file_name
shouldn't call mkstemp again if it fails with anything other than
EEXIST. A single mkstemp call seems sufficient.

On Android, I've seen mkstemp fail with:
 - EROFS (because cwd wasn't set to a writable filesystem)
 - EACCES (because cwd pointed to a dir owned by root, but the test
   program was running as the shell user instead)

Previously, get_temp_file_name would run forever in these situations.

See D4962 and "llvm-svn: 229035"

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D130214
2022-07-22 16:20:47 -07:00
..
benchmarks [libc++] Implements Unicode grapheme clustering 2022-07-20 18:38:32 +02:00
cmake [libc++] Drop the legacy debug mode symbols by default 2022-07-19 17:16:06 -04:00
docs [libc++][ranges] Implement ranges::shuffle. 2022-07-22 09:59:13 -07:00
include [libc++][ranges] Implement ranges::shuffle. 2022-07-22 09:59:13 -07:00
lib [libc++][NFC] Add commit SHA for ABI change 2022-07-19 17:16:53 -04:00
src [libc++] Treat incomplete features just like other experimental features 2022-07-19 10:50:20 -04:00
test [libc++][test] Fix infinite loop when mkstemp fails 2022-07-22 16:20:47 -07:00
utils [libc++] Take advantage of -fexperimental-library in libc++ 2022-07-22 08:33:39 -04:00
.clang-format [libcxx] Remove extraneous '---' lines in .clang-format files 2022-06-15 01:34:37 -07:00
.clang-tidy [libc++] Make parameter names consistent and enforce the naming style using readability-identifier-naming 2022-07-08 18:17:47 +02:00
.gitignore
appveyor-reqs-install.cmd
appveyor.yml [libc++] Re-apply "Always build c++experimental.a"" 2022-07-19 10:44:19 -04:00
CMakeLists.txt [libc++] Drop the legacy debug mode symbols by default 2022-07-19 17:16:06 -04:00
CREDITS.TXT
LICENSE.TXT
TODO.TXT