Hi Heinrich, On Sat, 25 Jan 2020 at 03:45, Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > On 1/25/20 12:43 AM, Tom Rini wrote: > > On Sun, Jan 12, 2020 at 05:33:39PM +0100, Heinrich Schuchardt wrote: > > > >> Provide a unit test checking that CTRL-V can be used to add control > >> characters to the line buffer. > >> > >> Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> > > > > I don't know why but this test, run when built with clang fails. A log > > is here: https://gitlab.denx.de/u-boot/u-boot/-/jobs/50540 but I saw it > > on Travis and Azure as well. > > > > Hello Tom, hello Simon > > when I clang U-Boot branch bisect-failure with in the Gitlab Docker > image and run > > ./u-boot -d arch/sandbox/dts/test.dtb > ut dm usb_keyb > > the test runs fine. > > When I run > > valgrind ./u-boot -d arch/sandbox/dts/test.dtb > usb start > ut dm usb_keyb > > I see more than 100 use-after-free errors. > > dm_test_destroy() calling uclass_destroy() seems to be the culprit. > > @Simon: > Why would we destroy any uclass in `ut dm` that was in use before > executing the command?
This is because the tests might require them to be in their initial state. In general running a unit test along with other code is not safe. I wonder if the situation has improved with the move to SDL2, but I'm not sure. [..] Regards, Simon