aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-26 09:41:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-26 09:41:25 +0000
commit4f409fa9676f1864914e27670fee7980eabeeea2 (patch)
treec6477dafa260d683819091852548a949fd5d9e7c
parent3f85010b680fa12c91b1f22817ddc2701a699fcf (diff)
downloadpaludis-4f409fa9676f1864914e27670fee7980eabeeea2.tar.gz
paludis-4f409fa9676f1864914e27670fee7980eabeeea2.tar.xz
Work around potential filesystem screwiness that could cause a test to fail
-rw-r--r--paludis/util/fs_entry_TEST.cc4
-rwxr-xr-xpaludis/util/fs_entry_TEST_setup.sh5
2 files changed, 6 insertions, 3 deletions
diff --git a/paludis/util/fs_entry_TEST.cc b/paludis/util/fs_entry_TEST.cc
index 21717c3..881e107 100644
--- a/paludis/util/fs_entry_TEST.cc
+++ b/paludis/util/fs_entry_TEST.cc
@@ -186,11 +186,13 @@ namespace test_cases
FSEntry a("fs_entry_TEST_dir");
FSEntry b("fs_entry_TEST_dir/no_perms");
FSEntry c("fs_entry_TEST_dir/no_such_file");
+ FSEntry d("fs_entry_TEST_dir/dir_a/dir_in_a");
TEST_CHECK(a.ctime() <= std::time(NULL));
- TEST_CHECK((a.mtime() >= a.ctime()) && (a.mtime() <= std::time(NULL)));
TEST_CHECK(b.ctime() <= std::time(NULL));
TEST_CHECK((b.mtime() >= b.ctime()) && (b.mtime() <= std::time(NULL)));
+ TEST_CHECK(d.ctime() <= std::time(NULL));
+ TEST_CHECK((d.mtime() >= d.ctime()) && (d.mtime() <= std::time(NULL)));
TEST_CHECK_THROWS(c.ctime(), FSError);
TEST_CHECK_THROWS(c.mtime(), FSError);
diff --git a/paludis/util/fs_entry_TEST_setup.sh b/paludis/util/fs_entry_TEST_setup.sh
index 7d7796b..7d9e1e2 100755
--- a/paludis/util/fs_entry_TEST_setup.sh
+++ b/paludis/util/fs_entry_TEST_setup.sh
@@ -10,8 +10,9 @@ touch dir_a/file_in_a || exit 6
touch all_perms || exit 7
chmod 777 all_perms || exit 8
touch no_perms || exit 9
-sleep 1
-echo > no_perms
chmod 000 no_perms || exit 10
+
+mkdir dir_a/dir_in_a
+
echo -n '0123456789' > ten_bytes || exit 11
ln -s dir_a/file_in_a symlink_to_file_in_a || exit 12