1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-13 02:42:18 +02:00

tests: fix dirent d_type support verification

* init.cfg (require_dirent_d_type_): Don't use df -x
to exclude XFS, since this depends on a correct mtab
which is brittle and often not correct within chroots.
* tests/d_type-check: Check also the d_type of files,
which excludes XFS appropriately.  Specify all argument
and return types to avoid truncated pointers being passed,
which skipped the test due to crashes on x86_64 at least.
Simplify the C library lookup by reusing the interpreter's.

chroot issue reported at https://bugzilla.redhat.com/1263341
This commit is contained in:
Pádraig Brady
2015-11-06 16:31:22 +00:00
parent d820706d44
commit eafaa2e88f
2 changed files with 39 additions and 12 deletions

View File

@@ -488,12 +488,6 @@ 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"/tests/d_type-check \
|| skip_ requires d_type support
}