diff --git a/Include/pyport.h b/Include/pyport.h
index 3eac119bf8e..6a4df4bf75f 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -503,6 +503,7 @@ extern "C" {
  * Thread support is stubbed and any attempt to create a new thread fails.
  */
 #if (!defined(HAVE_PTHREAD_STUBS) && \
+     !defined(__wasi__) && \
       (!defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__)))
 #  define Py_CAN_START_THREADS 1
 #endif
diff --git a/Lib/test/test_file.py b/Lib/test/test_file.py
index 029c903e01a..2cdf353eebe 100644
--- a/Lib/test/test_file.py
+++ b/Lib/test/test_file.py
@@ -224,7 +224,7 @@ def testDefaultBufferSize(self):
         with self.open(TESTFN, 'rb') as f:
             data = f.read1()
             expected_size = max(min(blksize, 8192 * 1024), io.DEFAULT_BUFFER_SIZE)
-            self.assertEqual(len(data), expected_size)
+            self.assertTrue(len(data) <= expected_size)
 
     def testTruncateOnWindows(self):
         # SF bug <https://bugs.python.org/issue801631>
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index e2117b9588d..1a14c758c55 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -737,7 +737,7 @@ def test_thread_info(self):
         elif sys.platform == "emscripten":
             self.assertIn(info.name, {"pthread", "pthread-stubs"})
         elif sys.platform == "wasi":
-            self.assertEqual(info.name, "pthread-stubs")
+            self.assertIn(info.name, {"pthread", "pthread-stubs"})
 
     @unittest.skipUnless(support.is_emscripten, "only available on Emscripten")
     def test_emscripten_info(self):
