Fix integration test fail

pull/112/head
Andre Richter 3 years ago
parent b418651798
commit 86c041a41f
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -4,10 +4,8 @@ version = "0.12.0"
authors = ["Andre Richter <andre.o.richter@gmail.com>"]
edition = "2018"
# TODO: FIXME
# LTO seems to kill the console integration test (empty text section). Disable until a fix is found.
[profile.release]
lto = false
lto = true
[features]
default = []

@ -818,7 +818,7 @@ diff -uNr 11_exceptions_part1_groundwork/.cargo/config.toml 12_integrated_testin
diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo.toml
--- 11_exceptions_part1_groundwork/Cargo.toml
+++ 12_integrated_testing/Cargo.toml
@@ -1,30 +1,58 @@
@@ -1,6 +1,6 @@
[package]
name = "mingo"
-version = "0.11.0"
@ -826,13 +826,7 @@ diff -uNr 11_exceptions_part1_groundwork/Cargo.toml 12_integrated_testing/Cargo.
authors = ["Andre Richter <andre.o.richter@gmail.com>"]
edition = "2018"
+# TODO: FIXME
+# LTO seems to kill the console integration test (empty text section). Disable until a fix is found.
[profile.release]
-lto = true
+lto = false
[features]
@@ -11,20 +11,46 @@
default = []
bsp_rpi3 = ["register"]
bsp_rpi4 = ["register"]
@ -1823,7 +1817,7 @@ diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rb 12_integrate
diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rs 12_integrated_testing/tests/00_console_sanity.rs
--- 11_exceptions_part1_groundwork/tests/00_console_sanity.rs
+++ 12_integrated_testing/tests/00_console_sanity.rs
@@ -0,0 +1,35 @@
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: MIT OR Apache-2.0
+//
+// Copyright (c) 2019-2021 Andre Richter <andre.o.richter@gmail.com>
@ -1857,7 +1851,14 @@ diff -uNr 11_exceptions_part1_groundwork/tests/00_console_sanity.rs 12_integrate
+ print!("{}", console().chars_read());
+
+ // The QEMU process running this test will be closed by the I/O test harness.
+ cpu::wait_forever()
+ // cpu::wait_forever();
+
+ // For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
+ // when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
+ // being, the following lines are just a workaround to fix this compiler/linker weirdness.
+ use libkernel::time::interface::TimeManager;
+ libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
+ cpu::qemu_exit_success()
+}
diff -uNr 11_exceptions_part1_groundwork/tests/01_timer_sanity.rs 12_integrated_testing/tests/01_timer_sanity.rs

@ -31,5 +31,12 @@ unsafe fn kernel_init() -> ! {
print!("{}", console().chars_read());
// The QEMU process running this test will be closed by the I/O test harness.
cpu::wait_forever()
// cpu::wait_forever();
// For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
// when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
// being, the following lines are just a workaround to fix this compiler/linker weirdness.
use libkernel::time::interface::TimeManager;
libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
cpu::qemu_exit_success()
}

@ -749,7 +749,7 @@ Minipush 1.0
diff -uNr 12_integrated_testing/Cargo.toml 13_exceptions_part2_peripheral_IRQs/Cargo.toml
--- 12_integrated_testing/Cargo.toml
+++ 13_exceptions_part2_peripheral_IRQs/Cargo.toml
@@ -1,13 +1,11 @@
@@ -1,6 +1,6 @@
[package]
name = "mingo"
-version = "0.12.0"
@ -757,14 +757,6 @@ diff -uNr 12_integrated_testing/Cargo.toml 13_exceptions_part2_peripheral_IRQs/C
authors = ["Andre Richter <andre.o.richter@gmail.com>"]
edition = "2018"
-# TODO: FIXME
-# LTO seems to kill the console integration test (empty text section). Disable until a fix is found.
[profile.release]
-lto = false
+lto = true
[features]
default = []
diff -uNr 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs 13_exceptions_part2_peripheral_IRQs/src/_arch/aarch64/cpu/smp.rs
--- 12_integrated_testing/src/_arch/aarch64/cpu/smp.rs
@ -2724,6 +2716,24 @@ diff -uNr 12_integrated_testing/src/synchronization.rs 13_exceptions_part2_perip
+ }
}
diff -uNr 12_integrated_testing/tests/00_console_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs
--- 12_integrated_testing/tests/00_console_sanity.rs
+++ 13_exceptions_part2_peripheral_IRQs/tests/00_console_sanity.rs
@@ -31,12 +31,5 @@
print!("{}", console().chars_read());
// The QEMU process running this test will be closed by the I/O test harness.
- // cpu::wait_forever();
-
- // For some reason, in this test in this tutorial, rustc or the linker produces an empty binary
- // when wait_forever() is used. Calling qemu_exit_success() fixes this behavior. So for the time
- // being, the following lines are just a workaround to fix this compiler/linker weirdness.
- use libkernel::time::interface::TimeManager;
- libkernel::time::time_manager().spin_for(core::time::Duration::from_secs(3600));
- cpu::qemu_exit_success()
+ cpu::wait_forever()
}
diff -uNr 12_integrated_testing/tests/03_exception_irq_sanity.rs 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs
--- 12_integrated_testing/tests/03_exception_irq_sanity.rs
+++ 13_exceptions_part2_peripheral_IRQs/tests/03_exception_irq_sanity.rs

@ -190,6 +190,7 @@ class DevTool
def ready_for_publish_no_rust
clean
fmt
misspell
rubocop
copyright

Loading…
Cancel
Save