Change in vdsm[master]: tests: Replace magic number with constant

2016-05-18 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 7:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-05-16 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 6:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-05-15 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 5:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-05-15 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 4:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-05-15 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-03-20 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-03-20 Thread frolland
Freddy Rolland has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-03-19 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 1: Verified+1

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: Adam Litke 
Gerrit-Reviewer: Ala Hino 
Gerrit-Reviewer: Freddy Rolland 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-03-19 Thread nsoffer
Nir Soffer has uploaded a new change for review.

Change subject: tests: Replace magic number with constant
..

tests: Replace magic number with constant

Add BLOCK_SIZE constant and use it to replace sizes and offsets for
direct I/O tests.

Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Signed-off-by: Nir Soffer 
---
M tests/storage_directio_test.py
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/54954/1

diff --git a/tests/storage_directio_test.py b/tests/storage_directio_test.py
index 9098c15..559d1ba 100644
--- a/tests/storage_directio_test.py
+++ b/tests/storage_directio_test.py
@@ -26,6 +26,8 @@
 
 from vdsm.storage import directio
 
+BLOCK_SIZE = 512
+
 
 @expandPermutations
 class TestDirectFile(TestCaseBase):
@@ -33,13 +35,13 @@
 DATA = b"".join(c * 127 + b"\n"
 for c in (b"a", b"b", b"c", b"d", b"e", b"f", b"g", b"h"))
 
-@permutations([[0], [512], [1024], [1024 + 512]])
+@permutations([[i * BLOCK_SIZE] for i in range(4)])
 def test_read(self, size):
 with temporaryPath(data=self.DATA) as srcPath, \
 directio.DirectFile(srcPath, "r") as f:
 self.assertEquals(f.read(size), self.DATA[:size])
 
-@permutations([[512], [1024]])
+@permutations([[1 * BLOCK_SIZE], [2 * BLOCK_SIZE]])
 def test_seek_and_read(self, offset):
 with temporaryPath(data=self.DATA) as srcPath, \
 directio.DirectFile(srcPath, "r") as f:
@@ -56,8 +58,8 @@
 def test_small_writes(self):
 with temporaryPath() as srcPath, \
 directio.DirectFile(srcPath, "w") as f:
-f.write(self.DATA[:512])
-f.write(self.DATA[512:])
+f.write(self.DATA[:BLOCK_SIZE])
+f.write(self.DATA[BLOCK_SIZE:])
 
 with io.open(srcPath, "rb") as f:
 self.assertEquals(f.read(), self.DATA)
@@ -72,11 +74,11 @@
 def test_update_and_read(self):
 with temporaryPath() as srcPath, \
 directio.DirectFile(srcPath, "w") as f:
-f.write(self.DATA[:512])
+f.write(self.DATA[:BLOCK_SIZE])
 
 with directio.DirectFile(srcPath, "r+") as f:
-f.seek(512)
-f.write(self.DATA[512:])
+f.seek(BLOCK_SIZE)
+f.write(self.DATA[BLOCK_SIZE:])
 
 with io.open(srcPath, "rb") as f:
 self.assertEquals(f.read(), self.DATA)


-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: tests: Replace magic number with constant

2016-03-19 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: Replace magic number with constant
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])

-- 
To view, visit https://gerrit.ovirt.org/54954
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf89be2b776650ba189db9cca7bd1e2cfdd7b2a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches