Martin Polednik has uploaded a new change for review.
Change subject: osinfo: remove kernel compile time
......................................................................
osinfo: remove kernel compile time
The field is not user within newer engines and shouldn't be depended
upon as the code itself is not safe for all kernels.
Change-Id: Iacc9b0fe5446abd5405db6efff6b7f9f16468bc9
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M lib/vdsm/osinfo.py
1 file changed, 2 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/65059/1
diff --git a/lib/vdsm/osinfo.py b/lib/vdsm/osinfo.py
index 3c6ab3b..1e6cdaa 100644
--- a/lib/vdsm/osinfo.py
+++ b/lib/vdsm/osinfo.py
@@ -23,7 +23,6 @@
import glob
import linecache
import logging
-import time
import os
from vdsm import utils
@@ -186,14 +185,8 @@
except ValueError:
logging.error('kernel release not found', exc_info=True)
ver, rel = '0', '0'
- try:
- t = ret[3].split()[2:]
- del t[4] # Delete timezone
- t = time.mktime(time.strptime(' '.join(t)))
- except ValueError:
- logging.error('kernel build time not found', exc_info=True)
- t = '0'
- return dict(version=ver, release=rel, buildtime=t)
+
+ return dict(version=ver, release=rel)
pkgs = {'kernel': kernelDict()}
--
To view, visit https://gerrit.ovirt.org/65059
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacc9b0fe5446abd5405db6efff6b7f9f16468bc9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
gerrit-hooks has posted comments on this change.
Change subject: tests: Add tests for poll and wait failures
......................................................................
Patch Set 9:
* Update Tracker::IGNORE, not relevant for branch: master
* Check Bug-Url::IGNORE, not relevant for branch: master
* Check Public Bug::WARN, no public bug url found
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
--
To view, visit https://gerrit.ovirt.org/65294
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8674c9c3c2118041c74213cd8ce0d383086d6cbf
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
Nir Soffer has uploaded a new change for review.
Change subject: tests: Add test for terminating a terminated process
......................................................................
tests: Add test for terminating a terminated process
In this case we should find that the process has terminated and waited,
and do not invoke kill().
Change-Id: Ic0f06c28857664cc49beb938f33ac3c9d07ca3b6
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/utilsTests.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/65328/1
diff --git a/tests/utilsTests.py b/tests/utilsTests.py
index 27a84e7..8c7ae61 100644
--- a/tests/utilsTests.py
+++ b/tests/utilsTests.py
@@ -111,6 +111,18 @@
pass
self.assertEqual(self.proc.returncode, -signal.SIGTERM)
+ def test_process_terminated(self):
+ self.proc.terminate()
+ self.proc.wait()
+
+ def fail():
+ raise RuntimeError("Attempt to kill a terminated process")
+
+ self.proc.kill = fail
+ with utils.terminating(self.proc):
+ pass
+ self.assertEqual(self.proc.returncode, -signal.SIGTERM)
+
def test_kill_failure(self):
class FakeKillError(Exception):
pass
--
To view, visit https://gerrit.ovirt.org/65328
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0f06c28857664cc49beb938f33ac3c9d07ca3b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Nir Soffer has posted comments on this change.
Change subject: tests: Add tests for poll and wait failures
......................................................................
Patch Set 8:
(2 comments)
https://gerrit.ovirt.org/#/c/65294/8/tests/utilsTests.py
File tests/utilsTests.py:
Line 132: self.check_failure()
Line 133:
Line 134: def test_kill_failure(self):
Line 135: def fail():
Line 136: raise ExpectedFailure("Fake kill failure")
> Now we have it 3 times.
3 test, 3 fail texts, please suggest a simple and more clear code.
Line 137:
Line 138: self.proc.kill = fail
Line 139: self.check_failure()
Line 140:
Line 154: self.assertEqual(type(e.exception.error), ExpectedFailure)
Line 155:
Line 156: # Note: We cannot check return code since AsyncProc.returncode is a
Line 157: # property calling poll(). The return code here may be None or -9,
Line 158: # depeending on timing.
> Wouldn't be better to wait to be sure that timing is correct instead of rem
There is no way to test this with AsyncProc, check how it imlements returncode.
Line 159:
Line 160:
Line 161: class ExpectedFailure(Exception):
Line 162: pass
--
To view, visit https://gerrit.ovirt.org/65294
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8674c9c3c2118041c74213cd8ce0d383086d6cbf
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
Piotr Kliczewski has posted comments on this change.
Change subject: tests: Add tests for poll and wait failures
......................................................................
Patch Set 8: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/65294/8/tests/utilsTests.py
File tests/utilsTests.py:
PS8, Line 135: def fail():
: raise ExpectedFailure("Fake kill failure")
Now we have it 3 times.
PS8, Line 158: timing
Wouldn't be better to wait to be sure that timing is correct instead of removing it?
--
To view, visit https://gerrit.ovirt.org/65294
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8674c9c3c2118041c74213cd8ce0d383086d6cbf
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
gerrit-hooks has posted comments on this change.
Change subject: hsm:Use sd compat instead of qemu conf compat.
......................................................................
Patch Set 10:
* 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-4.0'])
--
To view, visit https://gerrit.ovirt.org/64951
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4b19a99e5d9a73c011bf6d8079e3855298561b9
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
gerrit-hooks has posted comments on this change.
Change subject: tests: Add tests for poll and wait failures
......................................................................
Patch Set 8:
* 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-4.0'])
--
To view, visit https://gerrit.ovirt.org/65294
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8674c9c3c2118041c74213cd8ce0d383086d6cbf
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No