On Mon, 10 Aug 2026 18:34:22 +0900
"Masami Hiramatsu (Google)" [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+
+# Check if BOOT1_MARKER is in boot_map/trace (indicates second boot)
+if grep -q "BOOT1_MARKER" "$TRACEDIR/instances/boot_map/trace" 2>/dev/null; then
Sashiko commented:
Could this test logic lead to an infinite reboot loop if the primary trace
instance is cleared?
Yes, but the test framework will stop because timeout monitors it.
If the boot_map instance is cleared on boot (for example, if boot events were
enabled to start a fresh trace), the marker would be missing from boot_map on
the second boot.
This can happen if KASLR changes the address.
The script would assume it is the first boot, write the marker, and reboot
repeatedly until the QEMU timeout is reached.
Should this check use the backup instance instead
(e.g., "$TRACEDIR/instances/backup/trace") to detect the second boot?
No, since the backup instance is always be allocated.
OK, so let's give bigger alignment option so that in most case it will not
change the address.
Thank you,
--
Masami Hiramatsu (Google) [off-list ref]