All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Butterworth <harry@hebutterworth.freeserve.co.uk>
To: Ewan Mellor <ewan@xensource.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] [XM-TEST] block device write verify test 2nd attempt
Date: Tue, 23 May 2006 13:35:35 +0100	[thread overview]
Message-ID: <1148387736.10003.26.camel@localhost.localdomain> (raw)
In-Reply-To: <20060523114019.GB16064@leeni.uk.xensource.com>

On Tue, 2006-05-23 at 12:40 +0100, Ewan Mellor wrote:
> On Tue, May 23, 2006 at 11:35:55AM +0100, Harry Butterworth wrote:
> 
> > The only difference from the last version of the patch is that the minor
> > version number in configure.ac is incremented.
> > 
> > >From the patch:
> > 
> > +# This test imports a ram disk device as a physical device into a domU.
> > +# The domU initialises the ram disk with data from /dev/urandom and
> > calculates
> > +# the md5 checksum of the data (using tee as it is written so as to
> > avoid
> > +# reading it back from the device which might potentially mask
> > problems).
> > +# The domU is stopped and the md5 checksum of the data on the device is
> > +# calculated by dom0.  The test succeeds if the checksums match,
> > indicating
> > +# that all the data written by domU was sucessfully committed to the
> > device.
> > +
> > 
> > This patch also enables tee and fancy head in busybox on the ramdisk.  I
> > have tested the patch with both `make existing' where the tests run but
> > the new test fails because the ramdisk is missing tee and fancy head and
> > `make` where the test passes successfully.
> 
> Why don't you use dd instead of head -c?

I tried using dd with a block size of 1 and a count of the right number
of bytes but the test was very slow.  I didn't want to assume a 512b
block size and I'm not very good at shell script so didn't manage to
work out how to do it better.

> Why don't you just fix the size of the datablock that you write to the
> ramdisk, instead of determining the current size of the ramdisk with cat
> /dev/hda1 | wc -c?

I wanted to test writing at the device limits.  Sometimes there are off
by one errors that mean you can't write the last sector of a block
device.

cat | wc -c was the most robust way I could think of for getting the
size.

> 
> Ewan.
> 

  reply	other threads:[~2006-05-23 12:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-23 10:35 [PATCH] [XM-TEST] block device write verify test 2nd attempt Harry Butterworth
2006-05-23 11:40 ` Ewan Mellor
2006-05-23 12:35   ` Harry Butterworth [this message]
2006-05-24 10:20     ` Ewan Mellor
2006-05-24 11:08       ` Harry Butterworth
2006-05-24 12:37         ` Ewan Mellor
2006-05-24 13:09           ` Harry Butterworth
2006-05-24 22:01             ` Ewan Mellor
2006-05-24  9:52 ` Harry Butterworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1148387736.10003.26.camel@localhost.localdomain \
    --to=harry@hebutterworth.freeserve.co.uk \
    --cc=ewan@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.