0

我正在尝试修补和重建 e2fsprog。重新构建失败,因为测试用例在修补后开始失败。我刚刚添加了一条 printf 注释,所以不确定为什么这会导致测试用例失败。

我正在遵循的步骤。

a) make packages --> get source in work directory.
b) move mke2fs.c --> mke2ds.orig
c) add a printf comment in zap_sector
d) run 'make makepatch'
e) This will create patch in file directory. 
f) Run 'make clean patch' 
g) run 'make build' 

我收到以下错误:

bin/cp ./mke2fs.conf.in mke2fs.conf
Creating test_one script...
f_h_normal: Normal (signed) HTREE directory: ok
f_illitable_flexbg: illegal inode table with FLEX_BG: ok
r_expand_full: expand a totally full filesystem: ok
t_change_uuid_mounted: change uuid on a mounted pre-metadata-csum: ok
m_64bit_flexbg: mkfs

f_extent_oobounds: ok
f_lpffile: lost+found is not a directory: ok
t_quota_1on: enable quota using tune2fs: ok
m_no_opt: no filesystem extensions: failed
f_bad_bmap_csum: bad block/inode bitmap csum (metadata_csum): ok
j_corrupt_revoke_block: corrupt revoke block (csum v3): ok
f_file_acl_high: i_file_acl_high should be zero: ok
u_resize2fs_opt: e2undo with resize2fs -z: ok
u_mke2fs: e2undo with mke2fs: ok
f_miss_journal: Non-existent journal inode: ok
     255 tests succeeded              70 tests failed
Tests failed: d_dumpe2fs_group_only d_fallocate d_fallocate_bigalloc d_fallocate_blkmap d_punch d_punch_bigalloc f_create_symlinks f_opt_extent f_opt_extent_ext3 f_resize_inode j_ext_long_revoke_trans j_ext_long_trans j_long_revoke_trans j_long_revoke_trans_mcsum_32bit j_long_revoke_trans_mcsum_64bit j_long_trans j_long_trans_mcsum_32bit j_long_trans_mcsum_64bit j_short_revoke_trans j_short_revoke_trans_mcsum_64bit j_short_trans j_short_trans_64bit j_short_trans_mcsum_64bit j_short_trans_old_csum j_short_trans_open_recover j_short_trans_recover j_short_trans_recover_mcsum_64bit j_short_uncommitted_trans j_short_uncommitted_trans_mcsum_64bit m_64bit_flexbg m_bigjournal m_dasd_bs m_desc_size_128 m_extent_journal m_hugefile_slack m_large_file m_mcsum_extjournal m_meta_bg m_minrootdir m_mmp m_no_opt m_quota m_raid_opt m_root_owner m_rootdir m_std m_uninit r_32to64bit r_32to64bit_expand_full r_32to64bit_meta r_32to64bit_move_itable r_64to32bit r_64to32bit_meta r_expand_full r_fixup_lastbg r_fixup_lastbg_big r_move_itable r_resize_inode t_dangerous t_disable_mcsum t_disable_mcsum_noinitbg t_disable_mcsum_yesinitbg t_enable_mcsum t_enable_mcsum_ext3 t_enable_mcsum_initbg t_ext_jnl_fail t_iexpand_full t_iexpand_mcsum t_replay_and_set t_uninit_bg_rm 
gmake[2]: *** [test_post] Error 1
gmake[2]: Leaving directory `/data/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.4/tests'
==> /data/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.4/tests/d_dumpe2fs_group_only.failed <==
--- d_dumpe2fs_group_only/expect        2016-09-02 04:17:32.000000000 +0000
+++ d_dumpe2fs_group_only.log   2017-04-25 14:54:24.000000000 +0000
@@ -1,8 +1,10 @@
+satpal
 Creating filesystem with 1048576 4k blocks and 262144 inodes
 Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736

 Allocating group tables: done                            
+satpal
 Writing inode tables: done                            
 Creating journal (16384 blocks): done
 Writing superblocks and filesystem accounting information: done 




- t_replay_and_set/expect     2016-09-02 04:17:32.000000000 +0000
+++ t_replay_and_set.log        2017-04-26 11:50:30.000000000 +0000
@@ -1,9 +1,11 @@
 64-bit filesystem support is not enabled.  The larger fields afforded by this feature enable full-strength checksumming.  Pass -O 64bit to rectify.
+satpal
 Creating filesystem with 65536 4k blocks and 16384 inodes
 Superblock backups stored on blocks: 
        32768

 Allocating group tables: done                            
+satpal
 Writing inode tables: done                            
 Creating journal (4096 blocks): done
 Writing superblocks and filesystem accounting information: done

==> /data/usr/ports.old/sysutils/e2fsprogs/work/e2fsprogs-1.43.4/tests/t_uninit_bg_rm.failed <==
--- t_uninit_bg_rm/expect       2016-09-02 04:17:32.000000000 +0000
+++ t_uninit_bg_rm.log  2017-04-26 11:52:28.000000000 +0000
@@ -1,4 +1,6 @@
 mke2fs -q -t ext4 -F -o Linux -b 1024 test.img 1G
+satpal
+satpal
 tune2fs -f -O ^uninit_bg test.img

 fsck -yf -N test_filesys test.img
@@ -10,6 +12,8 @@
 test_filesys: 11/65536 files (0.0% non-contiguous), 35910/1048576 blocks

 mke2fs -q -t ext4 -O bigalloc -F -o Linux -b 1024 -C 8192 test.img 10G
+satpal
+satpal
 tune2fs -f -O ^uninit_bg test.img

 fsck -yf -N test_filesys test.img
*** Error code 1

Stop.
make[1]: stopped in /data/usr/ports.old/sysutils/e2fsprogs
*** Error code 1

Stop.
make: stopp

补丁内容:

--- misc/mke2fs.c.orig  2017-04-26 09:37:21 UTC
+++ misc/mke2fs.c
@@ -553,6 +553,8 @@ static void zap_sector(ext2_filsys fs, i
        int retval;
        unsigned int *magic;

+        printf("satpal\n");
+
        buf = malloc(512*nsect);
        if (!buf) {
                printf(_("Out of memory erasing sectors %d-%d\n"),
~

日志很大,所以我在我们有一些有用信息的地方截取了片段。如果需要,我可以放置完整的日志。

当我删除补丁并执行 make clean 并且 make package build 成功时。不知道为什么用简单的 printf 打补丁会导致观察到的行为。

4

0 回答 0