Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 890240 Details for
Bug 1091718
[hwcert-client-1.7] memory test fail to complete
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
0001-Bug-1091718-Rewrite-runProcesses-method-for-memory-t.patch (text/plain), 3.46 KB, created by
Guangze Bai
on 2014-04-27 14:55:51 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Guangze Bai
Created:
2014-04-27 14:55:51 UTC
Size:
3.46 KB
patch
obsolete
>From 4e18f46c4973b203ff83e4121eec070d1b9cec76 Mon Sep 17 00:00:00 2001 >From: Guangze Bai <gbai@redhat.com> >Date: Sun, 27 Apr 2014 22:51:03 +0800 >Subject: [PATCH] Bug 1091718 - Rewrite 'runProcesses' method for memory test > >Signed-off-by: Guangze Bai <gbai@redhat.com> >--- > tests/memory/memory.py | 59 ++++++++++++++++++++---------------------------- > 1 file changed, 25 insertions(+), 34 deletions(-) > >diff --git a/tests/memory/memory.py b/tests/memory/memory.py >index 3dcb201..5be6790 100644 >--- a/tests/memory/memory.py >+++ b/tests/memory/memory.py >@@ -15,13 +15,7 @@ > # Author: Greg Nichols > # > import os >-import tempfile >-import string >-import signal > import sys >-import re >-import time >- > > from hwcert.tags import Constants, DeviceClass, TestTag > from hwcert.test import Test >@@ -161,39 +155,36 @@ class MemoryTest(Test): > return (result == 0) > > def runProcesses(self, number, command): >- processes = 0; >- passed = True >- process = [] > if self.mode == Constants.self: > command = "echo 'Self Test Mode - would have run %s'" % command >- for i in range(number): >- processCommand = Command(command) >- processCommand.start() >- process.append(processCommand) >- print "Started: process %u pid %u: %s" % (i, process[i].getPID(), command) >- sys.stdout.flush() >- waiting = True >- while waiting: >- waiting = False >- for i in range(number): >- if process[i]: >- found = True >- line = process[i].readline() >- if line and len(line) > 1: >- print "process %u pid %u: %s" % (i, process[i].getPID(), line) >- sys.stdout.flush() >- returnValue = process[i].poll() >- if returnValue == 0 or returnValue == -1: >- waiting = True >- else: >- if returnValue > 0: >- print "Error: process %u pid %u returned %u" % (i, process[i].getPID(), returnValue) >- passed = False >- print "process %u pid %u returned success" % (i, process[i].getPID()) >- process[i] = None >+ passed = True >+ fmt = '%-10s %8u %-50s' >+ print '%-10s %-8s %-50s' % ('ALIAS', 'PID', 'MESSAGE') >+ print '%-10s %-8s %-50s' % ('=' * 10, '=' * 8, '=' * 50) >+ processes = [Command(command) for i in range(number)] >+ for p in processes: >+ p.alias = 'Process_%u' % processes.index(p) >+ p.start() >+ print fmt % (p.alias, p.getPID(), '[Started] ' + command) > sys.stdout.flush() >+ while len(processes): >+ for p in processes: >+ log = p.readline().strip() >+ if log and len(log) > 0: >+ print fmt % (p.alias, p.getPID(), '[Log] ' + log) >+ sys.stdout.flush() >+ rc = p.poll() >+ if rc is None or rc == -1: >+ continue >+ if rc > 0: >+ passed = False >+ print fmt % (p.alias, p.getPID(), '[Exited] %u' % rc) >+ sys.stdout.flush() >+ processes.remove(p) >+ > return passed > >+ > def runCommand(self, command): > if self.mode == Constants.self: > print "Self Test Mode, not running command" >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1091718
: 890240