From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JaxCt-0006of-BG for garchives@archives.gentoo.org; Sun, 16 Mar 2008 18:03:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C52CE0395; Sun, 16 Mar 2008 18:03:37 +0000 (UTC) Received: from thenybble.de (lvps87-230-95-74.dedicated.hosteurope.de [87.230.95.74]) by pigeon.gentoo.org (Postfix) with ESMTP id 459BBE0395 for ; Sun, 16 Mar 2008 18:03:37 +0000 (UTC) Received: from mnch-4d04ed37.pool.mediaways.net ([77.4.237.55] helo=localhost) by thenybble.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1JaxCp-0003A7-R3 for gentoo-user@lists.gentoo.org; Sun, 16 Mar 2008 19:03:36 +0100 Date: Sun, 16 Mar 2008 19:03:11 +0100 From: Jan Seeger To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: jffs2 on gentoo Message-ID: <20080316180311.GA5265@venus> References: <20080314135242.2070d995@pascal.spore.ath.cx> <21D3AB88-C36A-4BF1-8FB2-C2F40C3992B5@stellar.eclipse.co.uk> <20080316083804.GA12745@venus> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <20080316083804.GA12745@venus> User-Agent: Mutt/1.5.16 (2007-06-09) X-Archives-Salt: ebd71865-01c9-4095-85b2-6c75bbcf27df X-Archives-Hash: 94661495b38b99259118a803eeea3e03 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable As a followup, I have actually written said script (in perl), and would wel= come any improvement comments. File size of the test file shouldn't matter, since without wear leveling, the same cells should get written over and over agai= n. Only thing I need to do now is run it for a long time... Unfortunately, I n= eed linux for that since we need to mount the drive sync. And I have no live CD= in the house... Ts. What have I come to? Anyway, here's the script:=20 use strict; use warnings;=20 use Digest::MD5; use Getopt::Std; use File::Basename; use File::Spec; use File::Copy; my %opts; getopts("d:i:",\%opts); if (! $opts{d} || ! $opts{i}) { die <<"EOF" -d: Mountpoint of drive to be tested. Should be mounted with "sync" mount o= ption. -i: Input file. Will be copied to mountpoint to test integrity. Leave running for a long time to "test" your USB stick. EOF } my $counter =3D 0; my $originaldigest; my $outfilename =3D File::Spec->catfile($opts{d},(fileparse($opts{i}))[0]); my $digester =3D Digest::MD5->new(); open my $handle,"<$opts{i}"; binmode($handle); $digester->addfile($handle); close($handle); $originaldigest =3D $digester->digest(); while (1) { print "Running test $counter.\n"; copy($opts{i},$outfilename); open my $outhandle,"<$outfilename"; binmode($outhandle); $digester->addfile($outhandle); if ($digester->digest() ne $originaldigest) { die "Failed write at read $counter.\n"; } close($outhandle); unlink($outfilename); $counter++; } --=20 thenybble.de/blog/ -- four bits at a time --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFH3WDfMmLQdC6jvocRAoC9AJ9C7KkRy7CqOr6CAtiPrMLQrH7M9ACeIxhb iSLI7HWAXu4yEMfhdWZXXIU= =BlIN -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j-- -- gentoo-user@lists.gentoo.org mailing list