-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ext2: add support to various inode sizes #92
Conversation
Hi, nice change. Would it be possible to add a single test file and truncate it, to not make the Git repo too big? |
It would also be more interesting if the test file contained actual data, rather than being a just newlt created FS. |
I could not find a way to do it. To verify a content of a file, I added the following check to my test case:
However, what I got is
Though I can see the field: Is "/group[0]/inode[11]block[0]" is an acceptable field specifier? |
2b51125
to
77db865
Compare
I truncated the input files as small as possible.
I found I made a mistake when generating the input files. |
77db865
to
4ecb704
Compare
Yes please. If the code works with 2-3 inode sizes, it should be enough to validate the implementation in tests. We don't write a full kernel driver, it's ok :-) |
4ecb704
to
1779118
Compare
the script used for generating test inputs: declare -A sizes=( [1024,1024]=$((130048 + 1024)) [2048,512]=$(( 45056 + 2048)) [4096,128]=$(( 53248 + 4096)) ) adjust_size() { local f=$1 local bsize=$2 local isize=$3 truncate --size=${sizes[$bsize,$isize]} $f } makeimg() { local bsize=$1 local isize=$2 local f=tests/files/bsize-${bsize}-isize-${isize}.ext2 dd if=/dev/zero of=$f bs=${bsize} count=128 mkfs.ext2 -I ${isize} -b ${bsize} $f sudo mount $f __tmp__ echo hello | sudo dd if=/dev/stdin of=__tmp__/source (cd __tmp__/; sudo ln -s source target) sudo umount __tmp__ adjust_size $f $bsize $isize } mkdir -p __tmp__ makeimg 1024 1024 makeimg 2048 512 makeimg 4096 128 rmdir __tmp__ Signed-off-by: Masatake YAMATO <yamato@redhat.com>
1779118
to
7bc5592
Compare
I reduced the number of test files to three. |
Merged, thank you! |
the script used for generating test inputs: