All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
@ 2006-06-16 18:49 Harry Butterworth
  2006-06-16 20:06 ` David F Barrera
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Harry Butterworth @ 2006-06-16 18:49 UTC (permalink / raw)
  To: xen-devel, dfbp, aliguori

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

Lots of xm-test tests are failing with console timeouts on some machines
at the moment.  I reproduced the problem and found it was due to some
probing activity in the boot process of the -xen kernel.  The behaviour
of the current xm-test code is to assume that the boot process has
finished after performing three one-second waits for input---when the
probing activity introduces more than three one-second delays the test
suite breaks.

The patch below changes the test suite to wait for the command prompt
before attempting to submit a command.  The timeout is increased from 3
seconds to 3 minutes but the wait exits early when the prompt is found
so the test suite doesn't take any longer to run.

DO NOT APPLY.  This patch is FOR REVIEW ONLY at this stage since my
python skills are pretty lame and it really needs to get some testing
from people who have actually been experiencing problems.  For me,
xm-test works the same on my machine with and without this patch.

Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>

[-- Attachment #2: console-timeout.patch --]
[-- Type: text/x-patch, Size: 3576 bytes --]

diff -r ee3d10828937 -r 2dcc3cc7118e tools/xm-test/lib/XmTestLib/Console.py
--- a/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 13:43:54 2006
+++ b/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 18:28:52 2006
@@ -82,9 +82,6 @@
 
         tty.setraw(self.consoleFd, termios.TCSANOW)
 
-        self.__chewall(self.consoleFd)
-
-
     def __addToHistory(self, line):
         self.historyBuffer.append(line)
         self.historyLines += 1
@@ -120,34 +117,47 @@
         output"""
         self.PROMPT = prompt
 
-
-    def __chewall(self, fd):
+    def __getprompt(self, fd):
         timeout = 0
-        bytes   = 0
-        
-        while timeout < 3:
-            i, o, e = select.select([fd], [], [], 1)
-            if fd in i:
-                try:
-                    foo = os.read(fd, 1)
-                    if self.debugMe:
-                        sys.stdout.write(foo)
-                    bytes += 1
-                except Exception, exn:
-                    raise ConsoleError(str(exn))
-
-            else:
-                timeout += 1
-
-            if self.limit and bytes >= self.limit:
+        bytes = 0
+        while timeout < 180:
+            # eat anything while total bytes less than limit else raise RUNAWAY
+            while (not self.limit) or (bytes < self.limit):
+                i, o, e = select.select([fd], [], [], 1)
+                if fd in i:
+                    try:
+                        foo = os.read(fd, 1)
+                        if self.debugMe:
+                            sys.stdout.write(foo)
+                        bytes += 1
+                    except Exception, exn:
+                        raise ConsoleError(str(exn))
+                else:
+                    break
+            else:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
                                    % self.limit, RUNAWAY)
-
-        if self.debugMe:
-            print "Ignored %i bytes of miscellaneous console output" % bytes
-        
-        return bytes
-
+            # press enter
+            os.write(self.consoleFd, "\n")
+            # look for prompt
+            for prompt_char in "\r\n" + self.PROMPT:
+                i, o, e = select.select([fd], [], [], 1)
+                if fd in i:
+                    try:
+                        foo = os.read(fd, 1)
+                        if self.debugMe:
+                            sys.stdout.write(foo)
+                        if foo != prompt_char:
+                            break
+                    except Exception, exn:
+                        raise ConsoleError(str(exn))
+                else:
+                    timeout += 1
+                    break
+            else:
+                break
+        else:
+            raise ConsoleError("Timed out waiting for console prompt")
 
     def __runCmd(self, command, saveHistory=True):
         output = ""
@@ -155,7 +165,7 @@
         lines  = 0
         bytes  = 0
 
-        self.__chewall(self.consoleFd)
+        self.__getprompt(self.consoleFd)
 
         if verbose:
             print "[%s] Sending `%s'" % (self.domain, command)
@@ -176,7 +186,7 @@
                         "Failed to read from console (fd=%i): %s" %
                         (self.consoleFd, exn))
             else:
-                raise ConsoleError("Timed out waiting for console")
+                raise ConsoleError("Timed out waiting for console command")
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
  2006-06-16 18:49 [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt Harry Butterworth
@ 2006-06-16 20:06 ` David F Barrera
  2006-06-18 23:02   ` Harry Butterworth
  2006-06-16 20:35 ` David F Barrera
  2006-06-19 16:17 ` David F Barrera
  2 siblings, 1 reply; 6+ messages in thread
From: David F Barrera @ 2006-06-16 20:06 UTC (permalink / raw)
  To: Harry Butterworth; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 5259 bytes --]

Harry,

I tested your patch on two machines--lots of failures, not sure related 
to your changes. Attached are the logs.


Harry Butterworth wrote:
> Lots of xm-test tests are failing with console timeouts on some machines
> at the moment.  I reproduced the problem and found it was due to some
> probing activity in the boot process of the -xen kernel.  The behaviour
> of the current xm-test code is to assume that the boot process has
> finished after performing three one-second waits for input---when the
> probing activity introduces more than three one-second delays the test
> suite breaks.
>
> The patch below changes the test suite to wait for the command prompt
> before attempting to submit a command.  The timeout is increased from 3
> seconds to 3 minutes but the wait exits early when the prompt is found
> so the test suite doesn't take any longer to run.
>
> DO NOT APPLY.  This patch is FOR REVIEW ONLY at this stage since my
> python skills are pretty lame and it really needs to get some testing
> from people who have actually been experiencing problems.  For me,
> xm-test works the same on my machine with and without this patch.
>
> Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>
>   
> ------------------------------------------------------------------------
>
> diff -r ee3d10828937 -r 2dcc3cc7118e tools/xm-test/lib/XmTestLib/Console.py
> --- a/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 13:43:54 2006
> +++ b/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 18:28:52 2006
> @@ -82,9 +82,6 @@
>  
>          tty.setraw(self.consoleFd, termios.TCSANOW)
>  
> -        self.__chewall(self.consoleFd)
> -
> -
>      def __addToHistory(self, line):
>          self.historyBuffer.append(line)
>          self.historyLines += 1
> @@ -120,34 +117,47 @@
>          output"""
>          self.PROMPT = prompt
>  
> -
> -    def __chewall(self, fd):
> +    def __getprompt(self, fd):
>          timeout = 0
> -        bytes   = 0
> -        
> -        while timeout < 3:
> -            i, o, e = select.select([fd], [], [], 1)
> -            if fd in i:
> -                try:
> -                    foo = os.read(fd, 1)
> -                    if self.debugMe:
> -                        sys.stdout.write(foo)
> -                    bytes += 1
> -                except Exception, exn:
> -                    raise ConsoleError(str(exn))
> -
> -            else:
> -                timeout += 1
> -
> -            if self.limit and bytes >= self.limit:
> +        bytes = 0
> +        while timeout < 180:
> +            # eat anything while total bytes less than limit else raise RUNAWAY
> +            while (not self.limit) or (bytes < self.limit):
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        bytes += 1
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    break
> +            else:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>                                     % self.limit, RUNAWAY)
> -
> -        if self.debugMe:
> -            print "Ignored %i bytes of miscellaneous console output" % bytes
> -        
> -        return bytes
> -
> +            # press enter
> +            os.write(self.consoleFd, "\n")
> +            # look for prompt
> +            for prompt_char in "\r\n" + self.PROMPT:
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        if foo != prompt_char:
> +                            break
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    timeout += 1
> +                    break
> +            else:
> +                break
> +        else:
> +            raise ConsoleError("Timed out waiting for console prompt")
>  
>      def __runCmd(self, command, saveHistory=True):
>          output = ""
> @@ -155,7 +165,7 @@
>          lines  = 0
>          bytes  = 0
>  
> -        self.__chewall(self.consoleFd)
> +        self.__getprompt(self.consoleFd)
>  
>          if verbose:
>              print "[%s] Sending `%s'" % (self.domain, command)
> @@ -176,7 +186,7 @@
>                          "Failed to read from console (fd=%i): %s" %
>                          (self.consoleFd, exn))
>              else:
> -                raise ConsoleError("Timed out waiting for console")
> +                raise ConsoleError("Timed out waiting for console command")
>  
>              if self.limit and bytes >= self.limit:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>   


-- 

Regards,

David F Barrera
Linux Technology Center
Systems and Technology Group, IBM

"The wisest men follow their own direction. "
	
                          Euripides


[-- Attachment #2: xm-test.logs.tgz --]
[-- Type: application/octet-stream, Size: 222831 bytes --]

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
  2006-06-16 18:49 [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt Harry Butterworth
  2006-06-16 20:06 ` David F Barrera
@ 2006-06-16 20:35 ` David F Barrera
  2006-06-19 16:17 ` David F Barrera
  2 siblings, 0 replies; 6+ messages in thread
From: David F Barrera @ 2006-06-16 20:35 UTC (permalink / raw)
  To: Harry Butterworth; +Cc: xen-devel

Harry,

I tested your patch. I would like you to look at the logs as there are 
lots of failures. Please contact me and I will tell you where to get the 
logs (I tried sending them, but the file is probably too big).



Harry Butterworth wrote:
> Lots of xm-test tests are failing with console timeouts on some machines
> at the moment.  I reproduced the problem and found it was due to some
> probing activity in the boot process of the -xen kernel.  The behaviour
> of the current xm-test code is to assume that the boot process has
> finished after performing three one-second waits for input---when the
> probing activity introduces more than three one-second delays the test
> suite breaks.
>
> The patch below changes the test suite to wait for the command prompt
> before attempting to submit a command.  The timeout is increased from 3
> seconds to 3 minutes but the wait exits early when the prompt is found
> so the test suite doesn't take any longer to run.
>
> DO NOT APPLY.  This patch is FOR REVIEW ONLY at this stage since my
> python skills are pretty lame and it really needs to get some testing
> from people who have actually been experiencing problems.  For me,
> xm-test works the same on my machine with and without this patch.
>
> Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>
>   
> ------------------------------------------------------------------------
>
> diff -r ee3d10828937 -r 2dcc3cc7118e tools/xm-test/lib/XmTestLib/Console.py
> --- a/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 13:43:54 2006
> +++ b/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 18:28:52 2006
> @@ -82,9 +82,6 @@
>  
>          tty.setraw(self.consoleFd, termios.TCSANOW)
>  
> -        self.__chewall(self.consoleFd)
> -
> -
>      def __addToHistory(self, line):
>          self.historyBuffer.append(line)
>          self.historyLines += 1
> @@ -120,34 +117,47 @@
>          output"""
>          self.PROMPT = prompt
>  
> -
> -    def __chewall(self, fd):
> +    def __getprompt(self, fd):
>          timeout = 0
> -        bytes   = 0
> -        
> -        while timeout < 3:
> -            i, o, e = select.select([fd], [], [], 1)
> -            if fd in i:
> -                try:
> -                    foo = os.read(fd, 1)
> -                    if self.debugMe:
> -                        sys.stdout.write(foo)
> -                    bytes += 1
> -                except Exception, exn:
> -                    raise ConsoleError(str(exn))
> -
> -            else:
> -                timeout += 1
> -
> -            if self.limit and bytes >= self.limit:
> +        bytes = 0
> +        while timeout < 180:
> +            # eat anything while total bytes less than limit else raise RUNAWAY
> +            while (not self.limit) or (bytes < self.limit):
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        bytes += 1
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    break
> +            else:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>                                     % self.limit, RUNAWAY)
> -
> -        if self.debugMe:
> -            print "Ignored %i bytes of miscellaneous console output" % bytes
> -        
> -        return bytes
> -
> +            # press enter
> +            os.write(self.consoleFd, "\n")
> +            # look for prompt
> +            for prompt_char in "\r\n" + self.PROMPT:
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        if foo != prompt_char:
> +                            break
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    timeout += 1
> +                    break
> +            else:
> +                break
> +        else:
> +            raise ConsoleError("Timed out waiting for console prompt")
>  
>      def __runCmd(self, command, saveHistory=True):
>          output = ""
> @@ -155,7 +165,7 @@
>          lines  = 0
>          bytes  = 0
>  
> -        self.__chewall(self.consoleFd)
> +        self.__getprompt(self.consoleFd)
>  
>          if verbose:
>              print "[%s] Sending `%s'" % (self.domain, command)
> @@ -176,7 +186,7 @@
>                          "Failed to read from console (fd=%i): %s" %
>                          (self.consoleFd, exn))
>              else:
> -                raise ConsoleError("Timed out waiting for console")
> +                raise ConsoleError("Timed out waiting for console command")
>  
>              if self.limit and bytes >= self.limit:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>   


-- 

Regards,

David F Barrera
Linux Technology Center
Systems and Technology Group, IBM

"The wisest men follow their own direction. "
	
                          Euripides

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
  2006-06-16 20:06 ` David F Barrera
@ 2006-06-18 23:02   ` Harry Butterworth
  0 siblings, 0 replies; 6+ messages in thread
From: Harry Butterworth @ 2006-06-18 23:02 UTC (permalink / raw)
  To: David F Barrera; +Cc: xen-devel

On Fri, 2006-06-16 at 15:06 -0500, David F Barrera wrote:
> Harry,
> 
> I tested your patch on two machines--lots of failures, not sure related 
> to your changes. Attached are the logs.

Quite a lot of the failures are from Thursday which was before I wrote
the patch so I think there is a good chance that those are not related.
Of the remainder, I there is one instance of a "timed out waiting for
console prompt" which is the new timeout in my patch but this is for the
memset_random test which fails for me for a different reason so the
timeout is probably correct in this case.

The remainder seem to be completely unrelated.  So, I think my patch is
probably good and the rest of your problems are probably just more
issues in the xm-test code or possibly real bugs.

Harry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
  2006-06-16 18:49 [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt Harry Butterworth
  2006-06-16 20:06 ` David F Barrera
  2006-06-16 20:35 ` David F Barrera
@ 2006-06-19 16:17 ` David F Barrera
  2 siblings, 0 replies; 6+ messages in thread
From: David F Barrera @ 2006-06-19 16:17 UTC (permalink / raw)
  To: Harry Butterworth; +Cc: xen-devel

[-- Attachment #1: Type: text/plain, Size: 5680 bytes --]

Harry,

I tested your patch against the same code base as with the xm-test ran 
without your patch. The results look much better. Attached are the 
xm-test reports from both runs, with and without your patch, on two 
machines, one a SLES 9 based x335, and the other a RHEL 4 based HS20 
Blade running a 32-bit OS.


Harry Butterworth wrote:
> Lots of xm-test tests are failing with console timeouts on some machines
> at the moment.  I reproduced the problem and found it was due to some
> probing activity in the boot process of the -xen kernel.  The behaviour
> of the current xm-test code is to assume that the boot process has
> finished after performing three one-second waits for input---when the
> probing activity introduces more than three one-second delays the test
> suite breaks.
>
> The patch below changes the test suite to wait for the command prompt
> before attempting to submit a command.  The timeout is increased from 3
> seconds to 3 minutes but the wait exits early when the prompt is found
> so the test suite doesn't take any longer to run.
>
> DO NOT APPLY.  This patch is FOR REVIEW ONLY at this stage since my
> python skills are pretty lame and it really needs to get some testing
> from people who have actually been experiencing problems.  For me,
> xm-test works the same on my machine with and without this patch.
>
> Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>
>   
> ------------------------------------------------------------------------
>
> diff -r ee3d10828937 -r 2dcc3cc7118e tools/xm-test/lib/XmTestLib/Console.py
> --- a/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 13:43:54 2006
> +++ b/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 18:28:52 2006
> @@ -82,9 +82,6 @@
>  
>          tty.setraw(self.consoleFd, termios.TCSANOW)
>  
> -        self.__chewall(self.consoleFd)
> -
> -
>      def __addToHistory(self, line):
>          self.historyBuffer.append(line)
>          self.historyLines += 1
> @@ -120,34 +117,47 @@
>          output"""
>          self.PROMPT = prompt
>  
> -
> -    def __chewall(self, fd):
> +    def __getprompt(self, fd):
>          timeout = 0
> -        bytes   = 0
> -        
> -        while timeout < 3:
> -            i, o, e = select.select([fd], [], [], 1)
> -            if fd in i:
> -                try:
> -                    foo = os.read(fd, 1)
> -                    if self.debugMe:
> -                        sys.stdout.write(foo)
> -                    bytes += 1
> -                except Exception, exn:
> -                    raise ConsoleError(str(exn))
> -
> -            else:
> -                timeout += 1
> -
> -            if self.limit and bytes >= self.limit:
> +        bytes = 0
> +        while timeout < 180:
> +            # eat anything while total bytes less than limit else raise RUNAWAY
> +            while (not self.limit) or (bytes < self.limit):
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        bytes += 1
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    break
> +            else:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>                                     % self.limit, RUNAWAY)
> -
> -        if self.debugMe:
> -            print "Ignored %i bytes of miscellaneous console output" % bytes
> -        
> -        return bytes
> -
> +            # press enter
> +            os.write(self.consoleFd, "\n")
> +            # look for prompt
> +            for prompt_char in "\r\n" + self.PROMPT:
> +                i, o, e = select.select([fd], [], [], 1)
> +                if fd in i:
> +                    try:
> +                        foo = os.read(fd, 1)
> +                        if self.debugMe:
> +                            sys.stdout.write(foo)
> +                        if foo != prompt_char:
> +                            break
> +                    except Exception, exn:
> +                        raise ConsoleError(str(exn))
> +                else:
> +                    timeout += 1
> +                    break
> +            else:
> +                break
> +        else:
> +            raise ConsoleError("Timed out waiting for console prompt")
>  
>      def __runCmd(self, command, saveHistory=True):
>          output = ""
> @@ -155,7 +165,7 @@
>          lines  = 0
>          bytes  = 0
>  
> -        self.__chewall(self.consoleFd)
> +        self.__getprompt(self.consoleFd)
>  
>          if verbose:
>              print "[%s] Sending `%s'" % (self.domain, command)
> @@ -176,7 +186,7 @@
>                          "Failed to read from console (fd=%i): %s" %
>                          (self.consoleFd, exn))
>              else:
> -                raise ConsoleError("Timed out waiting for console")
> +                raise ConsoleError("Timed out waiting for console command")
>  
>              if self.limit and bytes >= self.limit:
>                  raise ConsoleError("Console run-away (exceeded %i bytes)"
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>   


-- 

Regards,

David F Barrera
Linux Technology Center
Systems and Technology Group, IBM

"The wisest men follow their own direction. "
	
                          Euripides


[-- Attachment #2: hs20.rhel4-x86_32_harry.report --]
[-- Type: text/plain, Size: 1589 bytes --]

Xm-test execution summary:
  PASS:  99
  FAIL:  18
  XPASS: 0
  XFAIL: 3


Details:

 FAIL: 01_block_attach_device_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 02_block_attach_file_device_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 04_block_attach_device_repeatedly_pos 
	 Device is not actually attached to domU

 FAIL: 05_block_attach_and_dettach_device_repeatedly_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 09_block_attach_and_dettach_device_check_data_pos 
	 xm block-attach returned invalid 256 != 0

 FAIL: 12_block_attach_shared_domU 
	 Unable to start domain

 FAIL: 01_block-destroy_btblock_pos 
	 Unable to create domain

 FAIL: 02_block-destroy_rtblock_pos 
	 xm block-attach returned invalid 256 != 0

 FAIL: 05_block-destroy_byname_pos 
	 Unable to create domain

 FAIL: 13_create_multinic_pos 
	 (0 nics) Failed to create domain

 FAIL: 14_create_blockroot_pos 
	 Failed to create domain

 FAIL: 03_memset_random_pos 
	 Timed out waiting for console prompt

 FAIL: 01_migrate_localhost_pos 
	 xm migrate returned invalid 256 != 0

XFAIL: 02_network_local_ping_pos 
	 ping loopback failed for size 65507. ping eth0 failed for size 65507.

XFAIL: 05_network_dom0_ping_pos 
	 Ping to dom0 failed for size 65507.

XFAIL: 11_network_domU_ping_pos 
	 Ping failed for size 1 48 64 512 1440 1500 1505 4096 4192 32767 65507.

 FAIL: 12_network_domU_tcp_pos 
	 TCP hping2 failed for size 16384 24567 32767 65495.

 FAIL: 13_network_domU_udp_pos 
	 UDP hping2 failed for size 32767 65495.


[-- Attachment #3: hs20.rhel4-x86_32.report --]
[-- Type: text/plain, Size: 2722 bytes --]

Xm-test execution summary:
  PASS:  69
  FAIL:  48
  XPASS: 0
  XFAIL: 3


Details:

 FAIL: 01_block_attach_device_pos 
	

 FAIL: 02_block_attach_file_device_pos 
	Unknown reason

 FAIL: 04_block_attach_device_repeatedly_pos 
	Unknown reason

 FAIL: 05_block_attach_and_dettach_device_repeatedly_pos 
	Unknown reason

 FAIL: 07_block_attach_baddevice_neg 
	Unknown reason

 FAIL: 08_block_attach_bad_filedevice_neg 
	Unknown reason

 FAIL: 09_block_attach_and_dettach_device_check_data_pos 
	Unknown reason

 FAIL: 12_block_attach_shared_domU 
	Unknown reason

 FAIL: 01_block-destroy_btblock_pos 
	Unknown reason

 FAIL: 02_block-destroy_rtblock_pos 
	Unknown reason

 FAIL: 06_block-destroy_check_list_pos 
	Unknown reason

 FAIL: 01_block-list_pos 
	Unknown reason

 FAIL: 03_block-list_anotherbd_pos 
	Unknown reason

 FAIL: 06_block-list_checkremove_pos 
	 block-detach failed device did not disappear

 FAIL: 01_block_device_read_verify 
	Unknown reason

 FAIL: 02_block_device_write_verify 
	Unknown reason

 FAIL: 01_create_basic_pos 
	Unknown reason

 FAIL: 11_create_concurrent_pos 
	Unknown reason

 FAIL: 12_create_concurrent_stress_pos 
	Unknown reason

 FAIL: 13_create_multinic_pos 
	Unknown reason

 FAIL: 14_create_blockroot_pos 
	Unknown reason

 FAIL: 15_create_smallmem_pos 
	Unknown reason

 FAIL: 01_destroy_basic_pos 
	Unknown reason

 FAIL: 07_destroy_stale_pos 
	Unknown reason

 FAIL: 04_list_goodparm_pos 
	Unknown reason

 FAIL: 03_memset_random_pos 
	Unknown reason

 FAIL: 04_memset_smallmem_pos 
	Unknown reason

 FAIL: 01_migrate_localhost_pos 
	 xm migrate returned invalid 256 != 0

XFAIL: 02_network_local_ping_pos 
	 Failed to create domain

 FAIL: 03_network_local_tcp_pos 
	 Failed to create domain

 FAIL: 04_network_local_udp_pos 
	Unknown reason

XFAIL: 05_network_dom0_ping_pos 
	 Ping to dom0 failed for size 65507.

 FAIL: 06_network_dom0_tcp_pos 
	Unknown reason

 FAIL: 07_network_dom0_udp_pos 
	 Failed to create domain

XFAIL: 11_network_domU_ping_pos 
	 Failed to create domain

 FAIL: 12_network_domU_tcp_pos 
	 Failed to create domain

 FAIL: 13_network_domU_udp_pos 
	 Failed to create domain

 FAIL: 01_network_attach_pos 
	Unknown reason

 FAIL: 02_network_attach_detach_pos 
	Unknown reason

 FAIL: 03_network_attach_detach_multiple_pos 
	 xm network-attach returned invalid 256 != 0

 FAIL: 01_pause_basic_pos 
	Unknown reason

 FAIL: 01_reboot_basic_pos 
	Unknown reason

 FAIL: 01_restore_basic_pos 
	Unknown reason

 FAIL: 04_restore_withdevices_pos 
	 Failed to create domain

 FAIL: 01_save_basic_pos 
	Unknown reason

 FAIL: 03_save_bogusfile_neg 
	Unknown reason

 FAIL: 03_sysrq_withreboot_pos 
	Unknown reason

 FAIL: 01_unpause_basic_pos 
	Unknown reason


[-- Attachment #4: x335sles9_harry.report --]
[-- Type: text/plain, Size: 1165 bytes --]

Xm-test execution summary:
  PASS:  105
  FAIL:  11
  XPASS: 0
  XFAIL: 3


Details:

 FAIL: 01_block_attach_device_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 02_block_attach_file_device_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 04_block_attach_device_repeatedly_pos 
	 Device is not actually attached to domU

 FAIL: 05_block_attach_and_dettach_device_repeatedly_pos 
	 block-attach failed device did not switch to Connected state

XFAIL: 02_network_local_ping_pos 
	 ping loopback failed for size 65507. ping eth0 failed for size 65507.

XFAIL: 05_network_dom0_ping_pos 
	 Ping to dom0 failed for size 1440 1500 1505 4096 65507.

 FAIL: 06_network_dom0_tcp_pos 
	 TCP hping2 to dom0 failed for size 4096 4192 32767.

 FAIL: 07_network_dom0_udp_pos 
	 UDP hping2 to dom0 failed for size 64 512 1440 1500 1505 4096 32767 65495.

XFAIL: 11_network_domU_ping_pos 
	 Ping failed for size 1 48 64 512 1440 1500 1505 4096 4192 32767 65507.

 FAIL: 12_network_domU_tcp_pos 
	 TCP hping2 failed for size 16384 24567 32767 65495.

 FAIL: 13_network_domU_udp_pos 
	 UDP hping2 failed for size 32767 65495.


[-- Attachment #5: x335sles9.report --]
[-- Type: text/plain, Size: 2710 bytes --]

Xm-test execution summary:
  PASS:  68
  FAIL:  48
  XPASS: 0
  XFAIL: 3


Details:

 FAIL: 01_block_attach_device_pos 
	

 FAIL: 02_block_attach_file_device_pos 
	 block-attach failed device did not switch to Connected state

 FAIL: 04_block_attach_device_repeatedly_pos 
	Unknown reason

 FAIL: 05_block_attach_and_dettach_device_repeatedly_pos 
	Unknown reason

 FAIL: 07_block_attach_baddevice_neg 
	Unknown reason

 FAIL: 09_block_attach_and_dettach_device_check_data_pos 
	Unknown reason

 FAIL: 12_block_attach_shared_domU 
	Unknown reason

 FAIL: 01_block-destroy_btblock_pos 
	Unknown reason

 FAIL: 02_block-destroy_rtblock_pos 
	Unknown reason

 FAIL: 05_block-destroy_byname_pos 
	Unknown reason

 FAIL: 06_block-destroy_check_list_pos 
	Unknown reason

 FAIL: 01_block-list_pos 
	Unknown reason

 FAIL: 02_block-list_attachbd_pos 
	Unknown reason

 FAIL: 03_block-list_anotherbd_pos 
	Unknown reason

 FAIL: 01_block_device_read_verify 
	Unknown reason

 FAIL: 02_block_device_write_verify 
	Unknown reason

 FAIL: 01_create_basic_pos 
	Unknown reason

 FAIL: 11_create_concurrent_pos 
	Unknown reason

 FAIL: 12_create_concurrent_stress_pos 
	Unknown reason

 FAIL: 13_create_multinic_pos 
	Unknown reason

 FAIL: 14_create_blockroot_pos 
	Unknown reason

 FAIL: 15_create_smallmem_pos 
	Unknown reason

 FAIL: 01_destroy_basic_pos 
	Unknown reason

 FAIL: 07_destroy_stale_pos 
	Unknown reason

 FAIL: 04_list_goodparm_pos 
	Unknown reason

 FAIL: 01_memset_basic_pos 
	Unknown reason

 FAIL: 03_memset_random_pos 
	Unknown reason

 FAIL: 04_memset_smallmem_pos 
	Unknown reason

 FAIL: 01_migrate_localhost_pos 
	Unknown reason

XFAIL: 02_network_local_ping_pos 
	 ping loopback failed for size 65507. ping eth0 failed for size 65507.

 FAIL: 03_network_local_tcp_pos 
	Unknown reason

XFAIL: 05_network_dom0_ping_pos 
	Unknown reason

 FAIL: 06_network_dom0_tcp_pos 
	Unknown reason

 FAIL: 07_network_dom0_udp_pos 
	Unknown reason

XFAIL: 11_network_domU_ping_pos 
	 Ping failed for size 1 48 64 512 1440 1500 1505 4096 4192 32767 65507.

 FAIL: 12_network_domU_tcp_pos 
	Unknown reason

 FAIL: 13_network_domU_udp_pos 
	 UDP hping2 failed for size 32767 65495.

 FAIL: 01_network_attach_pos 
	Unknown reason

 FAIL: 03_network_attach_detach_multiple_pos 
	Unknown reason

 FAIL: 01_pause_basic_pos 
	Unknown reason

 FAIL: 01_reboot_basic_pos 
	Unknown reason

 FAIL: 01_restore_basic_pos 
	Unknown reason

 FAIL: 04_restore_withdevices_pos 
	Unknown reason

 FAIL: 03_save_bogusfile_neg 
	Unknown reason

 FAIL: 01_shutdown_basic_pos 
	Unknown reason

 FAIL: 02_sysrq_sync_pos 
	Unknown reason

 FAIL: 03_sysrq_withreboot_pos 
	Unknown reason

 FAIL: 01_unpause_basic_pos 
	Unknown reason


[-- Attachment #6: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
@ 2006-06-19 16:36 Harry Butterworth
  0 siblings, 0 replies; 6+ messages in thread
From: Harry Butterworth @ 2006-06-19 16:36 UTC (permalink / raw)
  To: xen-devel, dfbp, aliguori, ewan

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

On Fri, 2006-06-16 at 19:49 +0100, Harry Butterworth wrote: 
> Lots of xm-test tests are failing with console timeouts on some machines
> at the moment.  I reproduced the problem and found it was due to some
> probing activity in the boot process of the -xen kernel.  The behaviour
> of the current xm-test code is to assume that the boot process has
> finished after performing three one-second waits for input---when the
> probing activity introduces more than three one-second delays the test
> suite breaks.
> 
> The patch below changes the test suite to wait for the command prompt
> before attempting to submit a command.  The timeout is increased from 3
> seconds to 3 minutes but the wait exits early when the prompt is found
> so the test suite doesn't take any longer to run.

This patch has now had adequate testing and David Barrera has shown that
it fixes a substantial chunk of the current breakage in xm-test.

Signed-off-by Harry Butterworth <butterwo@uk.ibm.com>

Please apply.

[-- Attachment #2: console-timeout.patch --]
[-- Type: text/x-patch, Size: 3576 bytes --]

diff -r ee3d10828937 -r 2dcc3cc7118e tools/xm-test/lib/XmTestLib/Console.py
--- a/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 13:43:54 2006
+++ b/tools/xm-test/lib/XmTestLib/Console.py	Fri Jun 16 18:28:52 2006
@@ -82,9 +82,6 @@
 
         tty.setraw(self.consoleFd, termios.TCSANOW)
 
-        self.__chewall(self.consoleFd)
-
-
     def __addToHistory(self, line):
         self.historyBuffer.append(line)
         self.historyLines += 1
@@ -120,34 +117,47 @@
         output"""
         self.PROMPT = prompt
 
-
-    def __chewall(self, fd):
+    def __getprompt(self, fd):
         timeout = 0
-        bytes   = 0
-        
-        while timeout < 3:
-            i, o, e = select.select([fd], [], [], 1)
-            if fd in i:
-                try:
-                    foo = os.read(fd, 1)
-                    if self.debugMe:
-                        sys.stdout.write(foo)
-                    bytes += 1
-                except Exception, exn:
-                    raise ConsoleError(str(exn))
-
-            else:
-                timeout += 1
-
-            if self.limit and bytes >= self.limit:
+        bytes = 0
+        while timeout < 180:
+            # eat anything while total bytes less than limit else raise RUNAWAY
+            while (not self.limit) or (bytes < self.limit):
+                i, o, e = select.select([fd], [], [], 1)
+                if fd in i:
+                    try:
+                        foo = os.read(fd, 1)
+                        if self.debugMe:
+                            sys.stdout.write(foo)
+                        bytes += 1
+                    except Exception, exn:
+                        raise ConsoleError(str(exn))
+                else:
+                    break
+            else:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"
                                    % self.limit, RUNAWAY)
-
-        if self.debugMe:
-            print "Ignored %i bytes of miscellaneous console output" % bytes
-        
-        return bytes
-
+            # press enter
+            os.write(self.consoleFd, "\n")
+            # look for prompt
+            for prompt_char in "\r\n" + self.PROMPT:
+                i, o, e = select.select([fd], [], [], 1)
+                if fd in i:
+                    try:
+                        foo = os.read(fd, 1)
+                        if self.debugMe:
+                            sys.stdout.write(foo)
+                        if foo != prompt_char:
+                            break
+                    except Exception, exn:
+                        raise ConsoleError(str(exn))
+                else:
+                    timeout += 1
+                    break
+            else:
+                break
+        else:
+            raise ConsoleError("Timed out waiting for console prompt")
 
     def __runCmd(self, command, saveHistory=True):
         output = ""
@@ -155,7 +165,7 @@
         lines  = 0
         bytes  = 0
 
-        self.__chewall(self.consoleFd)
+        self.__getprompt(self.consoleFd)
 
         if verbose:
             print "[%s] Sending `%s'" % (self.domain, command)
@@ -176,7 +186,7 @@
                         "Failed to read from console (fd=%i): %s" %
                         (self.consoleFd, exn))
             else:
-                raise ConsoleError("Timed out waiting for console")
+                raise ConsoleError("Timed out waiting for console command")
 
             if self.limit and bytes >= self.limit:
                 raise ConsoleError("Console run-away (exceeded %i bytes)"

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-19 16:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-16 18:49 [PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt Harry Butterworth
2006-06-16 20:06 ` David F Barrera
2006-06-18 23:02   ` Harry Butterworth
2006-06-16 20:35 ` David F Barrera
2006-06-19 16:17 ` David F Barrera
  -- strict thread matches above, loose matches on Subject: below --
2006-06-19 16:36 Harry Butterworth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.