[PATCH v1] Testing HDIO_GETGEO Output Mismatch Error
archsbran at gmail.com
Sat Mar 28 20:52:47 UTC 2020
On Sat, 28 Mar 2020 at 20:55, Eugene Syromiatnikov <esyr at redhat.com> wrote:
> On Fri, Mar 27, 2020 at 05:10:22PM +0530, Bran S wrote:
> > The output that is written into `tests/hdio_getgeo-success.dir/out` is
> > what we want right ?
> "out" file contains the (filtered) strace output, "exp" contains the expected
> output (judging by the way your test is written).
> > How can I correct the expected output in `tests/hdio_getgeo-success.dir/out` ?
> It's up to the test author to figure out what is to be corrected if the
> strace's output doesn't meet the expected one; it can be both ways
> (it's one of the reasons to write the tests: to check whether the
> tested program behaves the expected way, and tests are an embodiment
> of these expectations).
And is this mismatch bound to happen in a success injection test?
I ask so because the output in EXP is written by the actually running
strace and the output into OUT is written according to the decoder,
Please clarify this a little bit on how these two (EXP and OUT) are
getting different outputs. The `grep -v` line writes output into OUT.
I am not clear on how that works.
And what needs to be corrected ? Is there some problem with the test
code or the hdio.c decoder code ?
More information about the Strace-devel