coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tests: skip ls/stat-free-color on XFS, rather than always failin


From: Jim Meyering
Subject: [PATCH] tests: skip ls/stat-free-color on XFS, rather than always failing
Date: Fri, 23 Mar 2012 19:03:13 +0100

FYI, without the following patch, the ls/stat-free-color test would always
fail when run on an XFS file system.  That happened because the
d_type-check script would mistakenly report that XFS has d_type support,
when in fact it does not, and thus the stat syscall count in that
ls-testing script would be something like 7 instead of 1 or 2.

With this change, all tests pass on Fedora 16, using each
of the file system types: xfs, ext3, ext4, btrfs.  Each FS was
loop-mounted with the backing file residing on a tmpfs file system.

Interesting numbers (no averaging/min, etc.):

  Running ./configure consistently took 44.03 seconds,
  independent of FS type (+/- .01s)

  Build time had negligible variance:
  (on two or 3 prior iterations, btrfs came out slightly ahead)
    btrfs:TIME: 9.35 cmd=make -j20
    ext3: TIME: 9.26 cmd=make -j20
    ext4: TIME: 9.21 cmd=make -j20
    xfs:  TIME: 9.39 cmd=make -j20

  Test duration had more variability:
    btrfs:TIME: 42.06 cmd=make -j20 check
    ext3: TIME: 44.92 cmd=make -j20 check
    ext4: TIME: 36.39 cmd=make -j20 check
    xfs:  TIME: 39.19 cmd=make -j20 check


>From 488172c499dd8edf84f44cbab3de5d6f75dd722e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 23 Mar 2012 18:39:11 +0100
Subject: [PATCH] tests: skip ls/stat-free-color on XFS, rather than always
 failing

* tests/init.cfg (require_dirent_d_type_): Manually skip when
"." is an xfs file system.
---
 tests/init.cfg |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/init.cfg b/tests/init.cfg
index fda82bc..17713d9 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -362,6 +362,12 @@ require_dirent_d_type_()
   python < /dev/null \
     || skip_ python missing: assuming no d_type support

+  # Manually exclude xfs, since the test would mistakenly report
+  # that it has d_type support: d_type == DT_DIR for "." and "..",
+  # but DT_UNKNOWN for all other types.
+  df -x xfs . > /dev/null 2>&1 \
+    || skip_ requires d_type support
+
   python $abs_srcdir/d_type-check \
     || skip_ requires d_type support
 }
--
1.7.10.rc1.23.g16a10



reply via email to

[Prev in Thread] Current Thread [Next in Thread]