diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc
index 7846d3f7b68c1413e695bd62a55226369253bf96..711687b4f5cff924615d2bc3a49b161dd6bf27ad 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/84535.cc
@@ -20,6 +20,8 @@
 
 #include <thread>
 
+namespace __gnu_test
+{
 using std::is_constructible;
 using std::thread;
 
@@ -28,3 +30,4 @@ static_assert(!is_constructible<thread, thread, int>::value, "");
 static_assert(!is_constructible<thread, thread&, int>::value, "");
 static_assert(!is_constructible<thread, const thread&, int>::value, "");
 static_assert(!is_constructible<thread, const thread&&, int>::value, "");
+}
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc
index e0d588e51f94df60e3ad4fa147d538c51584dbbe..1ad2a76cb58fb71dda0fd0547beee86688b31eeb 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/lwg2097.cc
@@ -20,9 +20,12 @@
 
 #include <thread>
 
+namespace __gnu_test
+{
 using std::thread;
 using std::is_constructible;
 
 static_assert( !is_constructible<thread, thread&>::value, "" );
 static_assert( !is_constructible<thread, const thread&>::value, "" );
 static_assert( !is_constructible<thread, const thread>::value, "" );
+}