Add mikecat's argp test
This commit is contained in:
		
							parent
							
								
									2a675089b1
								
							
						
					
					
						commit
						907f23a5bb
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		
							
								
								
									
										14
									
								
								usertests.c
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								usertests.c
									
										
									
									
									
								
							|  | @ -1724,6 +1724,19 @@ uio() | |||
|   printf(1, "uio test done\n"); | ||||
| } | ||||
| 
 | ||||
| void argptest() | ||||
| { | ||||
|   int fd; | ||||
|   fd = open("init", O_RDONLY); | ||||
|   if (fd < 0) { | ||||
|     printf(2, "open failed\n"); | ||||
|     exit(); | ||||
|   } | ||||
|   read(fd, sbrk(0) - 1, -1); | ||||
|   close(fd); | ||||
|   printf(1, "arg test passed\n"); | ||||
| } | ||||
| 
 | ||||
| unsigned long randstate = 1; | ||||
| unsigned int | ||||
| rand() | ||||
|  | @ -1743,6 +1756,7 @@ main(int argc, char *argv[]) | |||
|   } | ||||
|   close(open("usertests.ran", O_CREATE)); | ||||
| 
 | ||||
|   argptest(); | ||||
|   createdelete(); | ||||
|   linkunlink(); | ||||
|   concreate(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Frans Kaashoek
						Frans Kaashoek