lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <B4DC657E-8B7E-4F4E-8E1C-98BCABA9BC0C@dilger.ca>
Date:   Wed, 2 Jan 2019 11:26:17 -0700
From:   Andreas Dilger <adilger@...ger.ca>
To:     Artem Blagodarenko <artem.blagodarenko@...il.com>
Cc:     Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH v6 3/4] tests: add test for e2image -b option

On Jan 1, 2019, at 2:07 PM, Artem Blagodarenko <artem.blagodarenko@...il.com> wrote:
> 
> The test makes raw image from partition with broken super block
> and executes e2fsck.

It isn't really needed to store an image file for this test.  It would be
trivial to format a test filesystem in the test script and clobber the
superblock with "dd if=/dev/urandom of=$TMPFILE bs=1024 count=1 seek=1".

Not sure what Ted thinks about this.

Cheers, Andreas

> Signed-off-by: Artem Blagodarenko <c17828@...y.com>
> ---
> tests/i_zero_super/expect.1 |  22 ++++++++++++++++++++++
> tests/i_zero_super/image.gz | Bin 0 -> 13262 bytes
> tests/i_zero_super/script   |  11 +++++++++++
> 3 files changed, 33 insertions(+)
> 
> diff --git a/tests/i_zero_super/expect.1 b/tests/i_zero_super/expect.1
> new file mode 100644
> index 00000000..fda32b96
> --- /dev/null
> +++ b/tests/i_zero_super/expect.1
> @@ -0,0 +1,22 @@
> +Pass 1: Checking inodes, blocks, and sizes
> +Pass 2: Checking directory structure
> +Pass 3: Checking directory connectivity
> +Pass 4: Checking reference counts
> +Pass 5: Checking group summary information
> +Free blocks count wrong for group #0 (7987, counted=7982).
> +Fix? no
> +
> +Free blocks count wrong (11602, counted=11597).
> +Fix? no
> +
> +Free inodes count wrong for group #0 (1493, counted=1488).
> +Fix? no
> +
> +Free inodes count wrong (2997, counted=2992).
> +Fix? no
> +
> +
> +test_filesys: ********** WARNING: Filesystem still has errors **********
> +
> +test_filesys: 11/3008 files (0.0% non-contiguous), 398/12000 blocks
> +Exit status is 4
> diff --git a/tests/i_zero_super/image.gz b/tests/i_zero_super/image.gz
> new file mode 100644
> index 0000000000000000000000000000000000000000..eea9140194f4dd9ec9dc8bb7b9e2215b950587d2
> GIT binary patch
> literal 13262
> zcmeI&{WsHl902f@...#ASFE<IL%5VllFHLfbsepcr#yxVS=!QEX3V<Xij3TH)g@2m
> zDS0T_=4nglT7;E{xfz>0G_ld9Vc5R+bpL^V>zwZSynpzd^M0St`F!5z^~3w8H;SqT
> zqYs|hy;?=Ydxb*`Y=(_Uj;z^->s>9@...EDn{U+Cn|rW>b}kfCoqXW-K~s(F;j74#
> zhqt?LGco2DyY?LC#w8Uk#19^?CI2?lfagqx1)ifG8HH6hag-M>b#n;a0ZPl9H5uQ*
> zh;IX^QFd*|QbjWJu&O+~X7%S}AV@...OvP)CS>1lrK);rafz~F03E!AP48O_FHJ-S
> zg=;|Z6CYQNv-ZtIAsw=E5_ROA?i#k~veE+)ipFdv$#ixO-jpJlhBw`i@...U$ugXh
> zEMdbbDH0)^B6nzm#&w;gg^SRCFE9f3*C-V-jA$$~oJK~np*>kNW!_c@...+YHyNXN
> zp%GA9=BovWD%_K}kqu4M8l_Vdo`ZrjD`Rn~ny_y)f?E3F0+*`oZ`-HKopl65$&V?2
> z6t#B;?@...ZBA_RXBf6G+|DYp-XhkO$YO6^T9V`5bn#K^+MJ~w%?yMSFJ^6Sg0UPo
> zH18)>^zs;IYTrH~YA<7Mr$64hU|~C{vPc@...^i?V|<|Jn9+tquql)qba_d&&!IrM
> zN~Zac^0PwabLqMD!9ml85Ia=TGE1p+3h@...O9$xRb*SWAT&w23469Mvy?^fd1|g3
> z2OBk4fRetx=bz*1p{n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sDzshu_)m6AW|wjzkT
> zcBy>bZol}OTTD6WMU0ljJ&icy#4Kr$Hr@9)dvDXkMN4wZxwi50$>mD+G8Nh><%Z8z
> z-r_hsyIZ&rI57ThUe6tC!j|bV27G0o?8J#?hL{KkW#FoUb?d|b>Kwkeb>zx!KDuCK
> v`J3J9`63;-00e*l5C8%|00;m9AOHk_01yBI{~LklvK5${_ikI*<wn@...-lK
> 
> literal 0
> HcmV?d00001
> 
> diff --git a/tests/i_zero_super/script b/tests/i_zero_super/script
> new file mode 100644
> index 00000000..6b02d86d
> --- /dev/null
> +++ b/tests/i_zero_super/script
> @@ -0,0 +1,11 @@
> +if test -x $E2IMAGE_EXE; then
> +
> +ONE_PASS_ONLY=true
> +FSCK_OPT="-n -b 8193 -f"
> +PREP_CMD="$E2IMAGE_EXE -r -b 8193 -B 1024 $TMPFILE $TMPFILE.raw; \
> +	  mv $TMPFILE.raw $TMPFILE"
> +. $cmd_dir/run_e2fsck
> +
> +else
> +	echo "$test_name: $test_description: skipped"
> +fi
> --
> 2.14.3
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ