mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	gh-116401: Fix blocking os.fwalk() and shutil.rmtree() on opening a named pipe (GH-116421)
This commit is contained in:
		
							parent
							
								
									8332e85b2f
								
							
						
					
					
						commit
						aa7bcf284f
					
				
					 6 changed files with 113 additions and 8 deletions
				
			
		|  | @ -344,6 +344,18 @@ def test_glob_non_directory(self): | |||
|         eq(self.rglob('nonexistent', '*'), []) | ||||
|         eq(self.rglob('nonexistent', '**'), []) | ||||
| 
 | ||||
|     @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') | ||||
|     @unittest.skipIf(sys.platform == "vxworks", | ||||
|                     "fifo requires special path on VxWorks") | ||||
|     def test_glob_named_pipe(self): | ||||
|         path = os.path.join(self.tempdir, 'mypipe') | ||||
|         os.mkfifo(path) | ||||
|         self.assertEqual(self.rglob('mypipe'), [path]) | ||||
|         self.assertEqual(self.rglob('mypipe*'), [path]) | ||||
|         self.assertEqual(self.rglob('mypipe', ''), []) | ||||
|         self.assertEqual(self.rglob('mypipe', 'sub'), []) | ||||
|         self.assertEqual(self.rglob('mypipe', '*'), []) | ||||
| 
 | ||||
|     def test_glob_many_open_files(self): | ||||
|         depth = 30 | ||||
|         base = os.path.join(self.tempdir, 'deep') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka