Skip to content

Commit 29a58d7

Browse files
committed
Next attempt at integration test fix
1 parent 5fec597 commit 29a58d7

File tree

7 files changed

+36
-26
lines changed

7 files changed

+36
-26
lines changed

12_integrated_testing/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,8 +1853,8 @@ diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rs 12_integrate
18531853
+ // The QEMU process running this test will be closed by the I/O test harness.
18541854
+ // cpu::wait_forever();
18551855
+
1856-
+ // For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
1857-
+ // when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
1856+
+ // For some reason, in this test, rustc or the linker produces an empty binary when
1857+
+ // wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
18581858
+ // being, the following lines are just a workaround to fix this compiler/linker weirdness.
18591859
+ use libkernel::time::interface::TimeManager;
18601860
+ libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));

12_integrated_testing/tests/00_console_sanity.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ unsafe fn kernel_init() -> ! {
3333
// The QEMU process running this test will be closed by the I/O test harness.
3434
// cpu::wait_forever();
3535

36-
// For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
37-
// when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
36+
// For some reason, in this test, rustc or the linker produces an empty binary when
37+
// wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
3838
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
3939
use libkernel::time::interface::TimeManager;
4040
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));

13_exceptions_part2_peripheral_IRQs/README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,24 +2716,6 @@ diff -uNr 12_integrated_testing/src/synchronization.rs 13_exceptions_part2_perip
27162716
+ }
27172717
}
27182718

2719-
diff -uNr 12_integrated_testing/tests/00_console_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs
2720-
--- 12_integrated_testing/tests/00_console_sanity.rs
2721-
+++ 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs
2722-
@@ -31,12 +31,5 @@
2723-
print!("{}", console().chars_read());
2724-
2725-
// The QEMU process running this test will be closed by the I/O test harness.
2726-
- // cpu::wait_forever();
2727-
-
2728-
- // For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
2729-
- // when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
2730-
- // being, the following lines are just a workaround to fix this compiler/linker weirdness.
2731-
- use libkernel::time::interface::TimeManager;
2732-
- libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
2733-
- cpu::qemu_exit_success()
2734-
+ cpu::wait_forever()
2735-
}
2736-
27372719
diff -uNr 12_integrated_testing/tests/03_exception_irq_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs
27382720
--- 12_integrated_testing/tests/03_exception_irq_sanity.rs
27392721
+++ 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs

13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ unsafe fn kernel_init() -> ! {
3131
print!("{}", console().chars_read());
3232

3333
// The QEMU process running this test will be closed by the I/O test harness.
34-
cpu::wait_forever()
34+
// cpu::wait_forever();
35+
36+
// For some reason, in this test, rustc or the linker produces an empty binary when
37+
// wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
38+
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
39+
use libkernel::time::interface::TimeManager;
40+
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
41+
cpu::qemu_exit_success()
3542
}

14_virtual_mem_part2_mmio_remap/tests/00_console_sanity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ unsafe fn kernel_init() -> ! {
3131
print!("{}", console().chars_read());
3232

3333
// The QEMU process running this test will be closed by the I/O test harness.
34-
cpu::wait_forever()
34+
// cpu::wait_forever();
35+
36+
// For some reason, in this test, rustc or the linker produces an empty binary when
37+
// wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
38+
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
39+
use libkernel::time::interface::TimeManager;
40+
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
41+
cpu::qemu_exit_success()
3542
}

15_virtual_mem_part3_precomputed_tables/tests/00_console_sanity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ unsafe fn kernel_init() -> ! {
3131
print!("{}", console().chars_read());
3232

3333
// The QEMU process running this test will be closed by the I/O test harness.
34-
cpu::wait_forever()
34+
// cpu::wait_forever();
35+
36+
// For some reason, in this test, rustc or the linker produces an empty binary when
37+
// wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
38+
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
39+
use libkernel::time::interface::TimeManager;
40+
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
41+
cpu::qemu_exit_success()
3542
}

16_virtual_mem_part4_higher_half_kernel/tests/00_console_sanity.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ unsafe fn kernel_init() -> ! {
3131
print!("{}", console().chars_read());
3232

3333
// The QEMU process running this test will be closed by the I/O test harness.
34-
cpu::wait_forever()
34+
// cpu::wait_forever();
35+
36+
// For some reason, in this test, rustc or the linker produces an empty binary when
37+
// wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
38+
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
39+
use libkernel::time::interface::TimeManager;
40+
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
41+
cpu::qemu_exit_success()
3542
}

0 commit comments

Comments
 (0)