On Mar 22, 2013, at 3:53 AM,
farey...@googlemail.com wrote:
>
> I'm the developer - here's why I think its wrong.
>
> The test PROUT Register Simple does the following:
> - Registers a Key using Register and Ignore
> - Reads the Key
> - Tries to re-register a key 1 greater than the original key using Register.
Correct.
> This is expected to fail with a Reservation Conflict.
Here's where I believe you've found an error. I _should_ generate a RESERVATION
CONFLICT, but the test instead checks for INVALID OPERATION.
> It passes 0 as the Key, and the original key + 1 as the SA Key
Correct.
>
> I'm looking at section 5.6.6 of SPC3-r23. There is a table there for the REGISTER Service Action, which lists the parameters expected when the command is received on a registered I_T nexus.
That is Table 34 in Version 3 rev 23, by the way.
I am using SPC 4, rev 33, where this is section 5.9.7, Table 49. And the table
has evolved quite a bit. It has a new (second) column, which is the supplied
reservation key (RK).
> That states that the expected key is in the Reservation Key parameter, not the SA reservation Key. Setting RK = original key and SARK = new key changes the key. Setting RK to original key and SARK to 0 unregisters the original key. Setting Key not equal to original key results in a reservation conflict, which seems to be what the test is trying to check.
I am quite familiar with this table. Way too familiar, I'm afraid. :)
I'll describe what I've done based on the updated version of the spec, for
those that don't have a copy handy.
That table has two main sections, based on the first column:
either the command is received on a registered I_T nexus, or it is not. And,
for this test, it is received on a registered I_T nexus, i.e. the bottom half of
the table.
The part of the table we now have left is further divided into two halves, again,
this time based on the Reservation Key (rk) passed in from the registered
I_T Nexus. This is the part of the table that is not present in your version.
For this version of the spec, either we pass in a key that is equal to the existing reservation
key, or we do not. For my test case, it passes in zero for the reservation
key, which means it is not equal to the I_T nexus reservation key. Table
49 says this should return a RESERVATION CONFLICT.
This is precisely the case I am trying to test, i.e. trying to register a key other
than the key when I do not know the current key.
Actually, it shouldn't matter what the SARK is, which is the value we are passing
in for the test, since it should be ignored.
[For this test to be more robust, it could check that all sorts of values for SARK
cause the same result, i.e. the SARK is ignored. But it does not currently do
that. Feel free to add tests. This was supposed to be the "simple" test, which
is why it doesn't do much.]
But I think you truly found a problem: the Check Condition returned should be
RESERVATION CONFLICT, not INVALID OPERATION, as my test checks for.
To be honest, I think I was lazy when I wrote that test, and I just set up the test to pass
for the targets I was using, and I didn't read this table in the spec to make
sure the check condition was correct.
>
> So I still maintain this test has got the RK and the SARK the wrong way round.
>
I'll supply a patch that changes the expected check condition soon.
--
Lee Duncan
SUSE Labs