On Wed, Sep 14, 2011 at 02:47:08PM -0600, Andreas Dilger wrote: > One thing I noticed with this check_field() macro is that it doesn't > actually detect the case if the size of a field is changed. This hit > me when I was making a cleanup to the large journal patch which renamed > s_jnl_blocks[15] to s_jnl_size_lo and s_jnl_blocks[16] to s_jnl_size_hi > for clarity. The tst_super_size test passed just fine, but the e2fsck > test scripts failed in weird and wonderful ways. > > A better solution might be to explicitly pass the expected field size > instead of getting both the size and offset from the structure itself. > Since these structures change very rarely it isn't much maintenance, > but it would be lousy if code was released that had some incorrect > field offset because someone increased or decreased an earlier field > without thinking enough, and those fields weren't used in normal tests. > > I can submit a patch if you are interested. Good point. Yes, I agree it would be worth while to do this. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html