tests: use mke2fs and debugfs from the build tree

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
This commit is contained in:
Lukas Czerner 2018-04-04 14:27:40 +02:00
parent bdd9381799
commit 4087d22142
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,41 @@
tests: use mke2fs and debugfs from the build tree
The tests f_bigalloc_badinode and f_bigalloc_orphan_list were not
using the version of mke2fs and debugfs from the build tree, and if
mke2fs and debugfs are not in the user's PATH, these tests would fail.
Fix this.
Reported-by: Somchai Smythe <buraphalinuxserver@xxxxxxxxx>
Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
--
diff --git a/tests/f_bigalloc_badinode/script b/tests/f_bigalloc_badinode/script
index 9113e9c..e58910f 100644
--- a/tests/f_bigalloc_badinode/script
+++ b/tests/f_bigalloc_badinode/script
@@ -6,8 +6,8 @@ TEST_DATA="$test_name.tmp"
dd if=$TEST_BITS of=$TEST_DATA bs=4k count=2 seek=1> /dev/null 2>&1
touch $TMPFILE
-mke2fs -Fq -t ext4 -O bigalloc -C 16384 $TMPFILE 1M > /dev/null 2>&1
-debugfs -w $TMPFILE << EOF > /dev/null 2>&1
+$MKE2FS -Fq -t ext4 -O bigalloc -C 16384 $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
write $TEST_DATA testfile
set_inode_field testfile i_mode 0120000
quit
diff --git a/tests/f_bigalloc_orphan_list/script b/tests/f_bigalloc_orphan_list/script
index 1508bf1..af9d753 100644
--- a/tests/f_bigalloc_orphan_list/script
+++ b/tests/f_bigalloc_orphan_list/script
@@ -6,8 +6,8 @@ TEST_DATA="$test_name.tmp"
dd if=$TEST_BITS of=$TEST_DATA bs=28k count=1 > /dev/null 2>&1
touch $TMPFILE
-mke2fs -Fq -t ext4 -O bigalloc $TMPFILE 1M > /dev/null 2>&1
-debugfs -w $TMPFILE << EOF > /dev/null 2>&1
+$MKE2FS -Fq -t ext4 -O bigalloc $TMPFILE 1M > /dev/null 2>&1
+$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
write $TEST_DATA testfile
set_inode_field testfile links_count 0
set_inode_field testfile bmap[0] 0

View File

@ -11,6 +11,7 @@ Source1: ext2_types-wrapper.h
Source2: e2fsck.conf
Patch1: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
Patch2: e2fsprogs-1.44.1-tests_use_mke2fs_and_debugfs_from_the_build_tree.patch
Url: http://e2fsprogs.sourceforge.net/
Requires: e2fsprogs-libs%{?_isa} = %{version}-%{release}
@ -150,6 +151,8 @@ It was originally inspired by the Multics SubSystem library.
# mildly unsafe but 'til I get something better, avoid full fsck
# after an selinux install...
%patch1 -p1 -b .featurecheck
# tests: use mke2fs and debugfs from the build tree
%patch2 -p1
%build
@ -331,6 +334,7 @@ exit 0
%changelog
* Mon Apr 04 2018 Lukas Czerner <lczerner@redhat.com> 1.44.1-1
- New upstream release
- tests: use mke2fs and debugfs from the build tree
* Mon Mar 12 2018 Lukas Czerner <lczerner@redhat.com> 1.44.0-2
- e2fsck: fix endianness problem when reading htree nodes