syscalls: Accept ENOENT in the 'swapoff' test.
Fixes <http://bugs.gnu.org/18690>. Reported by Philip Woods <elzairthesorcerer@gmail.com>. * tests/syscalls.scm ("swapoff, EINVAL/EPERM"): Rename to... ("swapoff, ENOENT/EINVAL/EPERM"): ... this. Add ENOENT to the list of possible return values.
This commit is contained in:
		
							parent
							
								
									d53e8ba6b5
								
							
						
					
					
						commit
						2793c0fb26
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -52,13 +52,13 @@
 | 
				
			||||||
    (lambda args
 | 
					    (lambda args
 | 
				
			||||||
      (memv (system-error-errno args) (list EPERM ENOENT)))))
 | 
					      (memv (system-error-errno args) (list EPERM ENOENT)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(test-assert "swapoff, EINVAL/EPERM"
 | 
					(test-assert "swapoff, ENOENT/EINVAL/EPERM"
 | 
				
			||||||
  (catch 'system-error
 | 
					  (catch 'system-error
 | 
				
			||||||
    (lambda ()
 | 
					    (lambda ()
 | 
				
			||||||
      (swapoff "/does-not-exist")
 | 
					      (swapoff "/does-not-exist")
 | 
				
			||||||
      #f)
 | 
					      #f)
 | 
				
			||||||
    (lambda args
 | 
					    (lambda args
 | 
				
			||||||
      (memv (system-error-errno args) (list EPERM EINVAL)))))
 | 
					      (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(test-assert "all-network-interfaces"
 | 
					(test-assert "all-network-interfaces"
 | 
				
			||||||
  (match (all-network-interfaces)
 | 
					  (match (all-network-interfaces)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue