From d15523134130808c95c283d561d83f5fa7264ac5 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Sep 2012 16:53:02 +0200 Subject: [PATCH] test-tool: 0171 is using different 0-block semantics than other tests 0171 is expecting a 0-block unmap at end-of-volume (i.e. start block one beyond what READ CAPACITY returns) to pass, while every other 0blocks test is expecting that address to be invalid. --- test-tool/0171_unmap_zero.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test-tool/0171_unmap_zero.c b/test-tool/0171_unmap_zero.c index 3662970..45b3e3e 100644 --- a/test-tool/0171_unmap_zero.c +++ b/test-tool/0171_unmap_zero.c @@ -112,12 +112,12 @@ int T0171_unmap_zero(const char *initiator, const char *url, int data_loss, int printf("[OK]\n"); - /* unmap no blocks at the last 0 - 255 blocks at the end of the LUN */ + /* unmap no blocks at the last 1 - 256 blocks at the end of the LUN */ printf("Unmapping last 1-256 blocks ... "); for (i=0; i<=255; i++) { struct unmap_list list[1]; - list[0].lba = num_blocks + 1 - i; + list[0].lba = num_blocks - i; list[0].num = 0; task = iscsi_unmap_sync(iscsi, lun, 0, 0, &list[0], 1); if (task == NULL) { @@ -137,9 +137,9 @@ int T0171_unmap_zero(const char *initiator, const char *url, int data_loss, int } printf("[OK]\n"); - /* unmap no blocks 1-256 blocks beyond the end of the LUN */ - printf("Unmapping no blocks but 1-256 blocks beyong end of LUN... "); - for (i=1; i<=256; i++) { + /* unmap no blocks 0-255 blocks beyond the end of the LUN */ + printf("Unmapping no blocks but 0-255 blocks beyong end of LUN... "); + for (i=0; i<=255; i++) { struct unmap_list list[1]; list[0].lba = num_blocks + 1 + i;