Add tests in lab8:swap_fifo.c
This commit is contained in:
		
							parent
							
								
									898573d0e2
								
							
						
					
					
						commit
						c2eeba8253
					
				@ -102,6 +102,13 @@ _fifo_check_swap(void) {
 | 
			
		||||
    cprintf("write Virt Page d in fifo_check_swap\n");
 | 
			
		||||
    *(unsigned char *)0x4000 = 0x0d;
 | 
			
		||||
    assert(pgfault_num==9);
 | 
			
		||||
    cprintf("write Virt Page e in fifo_check_swap\n");
 | 
			
		||||
    *(unsigned char *)0x5000 = 0x0e;
 | 
			
		||||
    assert(pgfault_num==10);
 | 
			
		||||
    cprintf("write Virt Page a in fifo_check_swap\n");
 | 
			
		||||
    assert(*(unsigned char *)0x1000 == 0x0a);
 | 
			
		||||
    *(unsigned char *)0x1000 = 0x0a;
 | 
			
		||||
    assert(pgfault_num==11);
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user