[sampling_test] print errno when mkstemp fails
I see rare occasional failures there, which look very odd. Typically both sampling and sampling_debug tests fail at about the same time. So hopefully we can diagnose them sometime.
This commit is contained in:
parent
9d58d03fa4
commit
0f8cb8416e
|
@ -163,6 +163,9 @@ struct TempFile {
|
|||
CHECK_EQ(it, path_template.get() + len);
|
||||
|
||||
int fd = mkstemp(path_template.get());
|
||||
if (fd < 0) {
|
||||
perror("mkstemp");
|
||||
}
|
||||
CHECK_GE(fd, 0);
|
||||
|
||||
return TempFile{fdopen(fd, "r+"), std::string(path_template.get(), len-1)};
|
||||
|
|
Loading…
Reference in New Issue