libstdc++/70762 fix fallback implementation of nonexistent_path

Backport from mainline
2016-04-24  Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/70762
	* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
	static counter to return a different path on every call.

From-SVN: r236788
This commit is contained in:
Jonathan Wakely 2016-05-26 18:33:17 +01:00 committed by Jonathan Wakely
parent c54d8841d5
commit 5e652dbf9b
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,12 @@
2016-05-26 Jonathan Wakely <jwakely@redhat.com> 2016-05-26 Jonathan Wakely <jwakely@redhat.com>
Backport from mainline
2016-04-24 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/70762
* testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path): Use
static counter to return a different path on every call.
* testsuite/experimental/filesystem/path/native/string.cc: Add * testsuite/experimental/filesystem/path/native/string.cc: Add
dg-require-filesystem-ts directive. dg-require-filesystem-ts directive.

View File

@ -83,7 +83,9 @@ namespace __gnu_test
p = tmp; p = tmp;
#else #else
char buf[64]; char buf[64];
std::sprintf(buf, "test.%lu", (unsigned long)::getpid()); static int counter;
std::sprintf(buf, "filesystem-ts-test.%d.%lu", counter++,
(unsigned long) ::getpid());
p = buf; p = buf;
#endif #endif
return p; return p;