pytest: Use --lazy with umount
PATCH 1/1 pytest: Use --lazy with umount
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
test/py/tests/test_ut.py +2 -2
@@ -213,7 +213,7 @@ booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} str(exc)) finally: if mounted: - u_boot_utils.run_and_log(cons, 'sudo umount %s' % mnt) + u_boot_utils.run_and_log(cons, 'sudo umount --lazy %s' % mnt) if loop: u_boot_utils.run_and_log(cons, 'sudo losetup -d %s' % loop)
@@ -274,7 +274,7 @@ label Fedora-Workstation-armhfp-31-1.9 (5.3.7-301.fc31.armv7hl) str(exc)) finally: if mounted: - u_boot_utils.run_and_log(cons, 'sudo umount %s' % mnt) + u_boot_utils.run_and_log(cons, 'sudo umount --lazy %s' % mnt) if loop: u_boot_utils.run_and_log(cons, 'sudo losetup -d %s' % loop)
Signature · 1 line
2.34.1
Hi Tom,
Quoted 10 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
I wonder if these ever actually succeed later on, or do they remain mounted forever?
Regards,
SImon
Quoted 14 lines · Simon Glass
Hi Tom,
Quoted 10 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>I wonder if these ever actually succeed later on, or do they remain mounted forever?
They complete the unmount with this change done, yes.
Signature · 1 line
Tom
Hi Tom,
Quoted 16 lines · Tom Rini
Quoted 14 lines · Simon Glass
Hi Tom,
Quoted 10 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>I wonder if these ever actually succeed later on, or do they remain mounted forever?
They complete the unmount with this change done, yes.
That's great to hear. I wonder if we should try a 'sync' beforehand? So long as it is short it shouldn't matter, but if it dragged on for a minute or two it might conflict with another job. I don't have a good understanding of what is going on in the kernel.
Regards,
Simon
Quoted 24 lines · Simon Glass
Hi Tom,
Quoted 21 lines · Tom Rini
Quoted 18 lines · Simon Glass
Hi Tom,
Quoted 10 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Reviewed-by Simon Glass <[email protected]>I wonder if these ever actually succeed later on, or do they remain mounted forever?
Quoted 6 lines
Quoted 1 line
They complete the unmount with this change done, yes.
That's great to hear. I wonder if we should try a 'sync' beforehand? So long as it is short it shouldn't matter, but if it dragged on for a minute or two it might conflict with another job. I don't have a good understanding of what is going on in the kernel.
Based on a quick read of the man page, I think --lazy itself is just what we want here.
Signature · 1 line
Tom
Hi Tom,
Quoted 28 lines · Tom Rini
Quoted 26 lines · Simon Glass
Hi Tom,
Quoted 22 lines · Tom Rini
Quoted 14 lines · Simon Glass
Hi Tom,
Quoted 10 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>--- test/py/tests/test_ut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>I wonder if these ever actually succeed later on, or do they remain mounted forever?
They complete the unmount with this change done, yes.
Quoted 7 lines
Quoted 4 lines
That's great to hear. I wonder if we should try a 'sync' beforehand? So long as it is short it shouldn't matter, but if it dragged on for a minute or two it might conflict with another job. I don't have a good understanding of what is going on in the kernel.
Based on a quick read of the man page, I think --lazy itself is just what we want here.
OK good.
Regards,
Simon
Quoted 7 lines · Tom Rini
Sometimes when doing tests on real hardware we sometimes run in to the case where some of these mounts haven't been fully flushed. Using the --lazy option with umount will allow us to continue while letting the OS handle flushing the data out still.
Signed-off-by Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom