From: Colin Walters Date: Thu, 29 Jun 2023 06:11:09 +0000 (-0400) Subject: tests: Enable mtime test X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2^2~66^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8bba482bc8b40a0601f7997ecf00f020c1b09cca;p=ostree.git tests: Enable mtime test I think this just accidentally was never enabled. While looking at the code, add a sleep here to be resilient to filesystems with only second mtime granularity. --- diff --git a/tests/inst/src/insttestmain.rs b/tests/inst/src/insttestmain.rs index 92ca8e01..599dbef6 100644 --- a/tests/inst/src/insttestmain.rs +++ b/tests/inst/src/insttestmain.rs @@ -26,6 +26,7 @@ const TESTS: &[StaticTest] = &[ test!(sysroot::itest_tmpfiles), test!(repobin::itest_basic), test!(repobin::itest_nofifo), + test!(repobin::itest_mtime), test!(repobin::itest_extensions), test!(repobin::itest_pull_basicauth), ]; diff --git a/tests/inst/src/repobin.rs b/tests/inst/src/repobin.rs index 4048b76a..af2096f2 100644 --- a/tests/inst/src/repobin.rs +++ b/tests/inst/src/repobin.rs @@ -42,6 +42,7 @@ pub(crate) fn itest_mtime() -> Result<()> { " )?; let ts = Path::new("repo").metadata()?.modified().unwrap(); + std::thread::sleep(std::time::Duration::from_secs(1)); bash!(r#"ostree --repo=repo commit -b test -s "bump mtime" --tree=dir=tmproot >/dev/null"#)?; assert_ne!(ts, Path::new("repo").metadata()?.modified().unwrap()); Ok(())