mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:12:44 +00:00 
			
		
		
		
	Tests/Kernel: Add missing mode parameter to open() calls in inode tests
This commit is contained in:
		
							parent
							
								
									1b4baaed56
								
							
						
					
					
						commit
						e58fe1cdd7
					
				
					 4 changed files with 4 additions and 4 deletions
				
			
		|  | @ -30,7 +30,7 @@ TEST_CASE(private_zero_length_inode_vmobject_sync) | ||||||
|         int rc = sigaction(SIGBUS, &new_action, nullptr); |         int rc = sigaction(SIGBUS, &new_action, nullptr); | ||||||
|         VERIFY(rc == 0); |         VERIFY(rc == 0); | ||||||
|     } |     } | ||||||
|     int fd = open("/tmp/private_msync_test", O_RDWR | O_CREAT); |     int fd = open("/tmp/private_msync_test", O_RDWR | O_CREAT, 0644); | ||||||
|     VERIFY(fd >= 0); |     VERIFY(fd >= 0); | ||||||
|     private_ptr = (u8*)mmap(nullptr, 0x1000, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, fd, 0); |     private_ptr = (u8*)mmap(nullptr, 0x1000, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, fd, 0); | ||||||
|     EXPECT(private_ptr != MAP_FAILED); |     EXPECT(private_ptr != MAP_FAILED); | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ TEST_CASE(shared_zero_length_inode_vmobject_sync) | ||||||
|         int rc = sigaction(SIGBUS, &new_action, nullptr); |         int rc = sigaction(SIGBUS, &new_action, nullptr); | ||||||
|         VERIFY(rc == 0); |         VERIFY(rc == 0); | ||||||
|     } |     } | ||||||
|     int fd = open("/tmp/shared_msync_test", O_RDWR | O_CREAT); |     int fd = open("/tmp/shared_msync_test", O_RDWR | O_CREAT, 0644); | ||||||
|     VERIFY(fd >= 0); |     VERIFY(fd >= 0); | ||||||
|     shared_ptr = (u8*)mmap(nullptr, 0x1000, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0); |     shared_ptr = (u8*)mmap(nullptr, 0x1000, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0); | ||||||
|     EXPECT(shared_ptr != MAP_FAILED); |     EXPECT(shared_ptr != MAP_FAILED); | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ TEST_CASE(private_non_empty_inode_vmobject_sync) | ||||||
|     } |     } | ||||||
|     u8 buf[0x1000]; |     u8 buf[0x1000]; | ||||||
|     memset(buf, 0, sizeof(buf)); |     memset(buf, 0, sizeof(buf)); | ||||||
|     int fd = open("/tmp/private_non_empty_msync_test", O_RDWR | O_CREAT); |     int fd = open("/tmp/private_non_empty_msync_test", O_RDWR | O_CREAT, 0644); | ||||||
|     VERIFY(fd >= 0); |     VERIFY(fd >= 0); | ||||||
|     auto rc = write(fd, buf, sizeof(buf)); |     auto rc = write(fd, buf, sizeof(buf)); | ||||||
|     VERIFY(rc == sizeof(buf)); |     VERIFY(rc == sizeof(buf)); | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ TEST_CASE(shared_non_empty_inode_vmobject_sync) | ||||||
|     } |     } | ||||||
|     u8 buf[0x1000]; |     u8 buf[0x1000]; | ||||||
|     memset(buf, 0, sizeof(buf)); |     memset(buf, 0, sizeof(buf)); | ||||||
|     int fd = open("/tmp/shared_non_empty_msync_test", O_RDWR | O_CREAT); |     int fd = open("/tmp/shared_non_empty_msync_test", O_RDWR | O_CREAT, 0644); | ||||||
|     VERIFY(fd >= 0); |     VERIFY(fd >= 0); | ||||||
|     auto rc = write(fd, buf, sizeof(buf)); |     auto rc = write(fd, buf, sizeof(buf)); | ||||||
|     VERIFY(rc == sizeof(buf)); |     VERIFY(rc == sizeof(buf)); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling