Skip to content

Commit 75e7c65

Browse files
georgesitonivwearyzen
authored andcommitted
test: Increase file size limit on test_install unit test
This change increases the file size limit on test install as it fails on some integration tests. Signed-off-by: George Siton <geosit@amazon.com>
1 parent a2de107 commit 75e7c65

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/jailer/src/resource_limits.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ mod tests {
192192
fn test_install() {
193193
// Setup the resource limits
194194
let mut rlimits = ResourceLimits::default();
195-
let new_limit = 100;
196-
rlimits.set_file_size(new_limit);
197-
rlimits.set_no_file(new_limit);
195+
let new_file_size_limit = 2097151;
196+
let new_no_file_limit = 100;
197+
rlimits.set_file_size(new_file_size_limit);
198+
rlimits.set_no_file(new_no_file_limit);
198199

199200
// Install the new limits to file size and
200201
// the number of file descriptors
@@ -207,8 +208,8 @@ mod tests {
207208
rlim_max: 0,
208209
};
209210
unsafe { libc::getrlimit(file_size_resource.into(), &mut file_size_limit) };
210-
assert_eq!(file_size_limit.rlim_cur, new_limit);
211-
assert_eq!(file_size_limit.rlim_max, new_limit);
211+
assert_eq!(file_size_limit.rlim_cur, new_file_size_limit);
212+
assert_eq!(file_size_limit.rlim_max, new_file_size_limit);
212213

213214
// Verify the new limit for the number of file descriptors
214215
let file_descriptor_resource = Resource::RlimitNoFile;
@@ -217,7 +218,7 @@ mod tests {
217218
rlim_max: 0,
218219
};
219220
unsafe { libc::getrlimit(file_descriptor_resource.into(), &mut file_descriptor_limit) };
220-
assert_eq!(file_descriptor_limit.rlim_cur, new_limit);
221-
assert_eq!(file_descriptor_limit.rlim_max, new_limit);
221+
assert_eq!(file_descriptor_limit.rlim_cur, new_no_file_limit);
222+
assert_eq!(file_descriptor_limit.rlim_max, new_no_file_limit);
222223
}
223224
}

0 commit comments

Comments
 (0)