summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/locale-util.c2
-rw-r--r--test/test-functions13
2 files changed, 13 insertions, 2 deletions
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c
index cda6b2895d..eaad25e65b 100644
--- a/src/basic/locale-util.c
+++ b/src/basic/locale-util.c
@@ -153,6 +153,8 @@ static int add_locales_from_libdir (Set *locales) {
FOREACH_DIRENT(entry, dir, return -errno) {
char *z;
+ dirent_ensure_type(dir, entry);
+
if (entry->d_type != DT_DIR)
continue;
diff --git a/test/test-functions b/test/test-functions
index 29f647ece4..8bbcddab59 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -213,6 +213,9 @@ EOF
install_fsck() {
dracut_install /sbin/fsck*
dracut_install -o /bin/fsck*
+
+ # fskc.reiserfs calls reiserfsck. so, install it
+ dracut_install -o reiserfsck
}
install_dmevent() {
@@ -257,7 +260,13 @@ create_empty_image() {
,
EOF
- mkfs -t "$FSTYPE" -L systemd "${LOOPDEV}p1"
+ local _label="-L systemd"
+ # mkfs.reiserfs doesn't know -L. so, use --label instead
+ [[ "$FSTYPE" == "reiserfs" ]] && _label="--label systemd"
+ if ! mkfs -t "${FSTYPE}" ${_label} "${LOOPDEV}p1" -q; then
+ dfatal "Failed to mkfs -t ${FSTYPE}"
+ exit 1
+ fi
}
check_result_nspawn() {
@@ -351,7 +360,7 @@ install_config_files() {
echo systemd-testsuite > $initdir/etc/hostname
# fstab
cat >$initdir/etc/fstab <<EOF
-LABEL=systemd / ext3 rw 0 1
+LABEL=systemd / ${FSTYPE} rw 0 1
EOF
}