test/cyclic: try to avoid spurious test failures due to cyclic callbacks
Looking at failed pipelines on https://dev.azure.com/u-boot/u-boot/_build , it is easy to find lots of examples that have failed spuriously for the same reason: The "cyclic function ... took too long" message being printed in the middle of some console output, causing the 'expect' machinery to fail to find the expected output. This mostly happens on QEMU and/or sandbox, i.e. cases where U-Boot isn't really the only thing running on the CPU, so random host scheduling can cause several millisecond delays, and if that just happens to interrupt the U-boot code while one of those cyclic callbacks are running, that message will be printed. This is one attempt at trying to avoid those spurious and annoying failures: Add a "backdoor" that allows bumping the threshold, and in the test framework, make sure that every time we boot we set that threshold to a high enough value that should eliminate 99% of those warnings. I chose an env-var-with-callback instead of, say, teaching the 'cyclic' command something new. The latter is not always enabled, so it would be more complicated to hook up; setting an env var that is not used for anything is, to quote Douglas Adams, mostly harmless. I made it "hidden" so as not to mess up any existing "print the whole evnironment test", and also to sort-of emphasize that this isn't really meant to be an official interface. Signed-off-by:Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Loading
Please register or sign in to comment