We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fa77f3 commit a6ea49bCopy full SHA for a6ea49b
1 file changed
tests/ramdisk.rs
@@ -1,6 +1,8 @@
1
use std::path::Path;
2
3
use bootloader_test_runner::run_test_kernel_with_ramdisk;
4
+use tempfile::NamedTempFile;
5
+
6
static RAMDISK_PATH: &str = "tests/ramdisk.txt";
7
8
#[test]
@@ -26,3 +28,15 @@ fn memory_map() {
26
28
Some(Path::new(RAMDISK_PATH)),
27
29
);
30
}
31
32
+#[test]
33
+fn large_ramdisk() {
34
+ // Create a large file to act as the RAM disk.
35
+ let ramdisk = NamedTempFile::new().unwrap();
36
+ ramdisk.as_file().set_len(1024 * 1024 * 16).unwrap();
37
38
+ run_test_kernel_with_ramdisk(
39
+ env!("CARGO_BIN_FILE_TEST_KERNEL_RAMDISK_basic_boot"),
40
+ Some(ramdisk.as_ref()),
41
+ );
42
+}
0 commit comments