summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-04-10 19:26:47 +0000
committerfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2009-04-10 19:26:47 +0000
commit79b3965b016b7e5c743b9ff4537215a4e001a4b9 (patch)
treefeaaf02a3305ebfde856dd910e05f9d7fc026752
parent5468b2e0880e9cdfebeaa2d0665ea3ef0a082b34 (diff)
downloaddistcc-79b3965b016b7e5c743b9ff4537215a4e001a4b9.tar.gz
Fix a distcc test that was failing on modern kernels:
ignore a spurious warning from gdb. According to Paul Pluzhnikov, the warning is gone from current GDB, fixed by the following patch: 2008-04-21 Pedro Alves <pedro@codesourcery.com> * symfile.c (syms_from_objfile): Don't warn if lowest loadable section is not a code section. But since there are going to be some versions of gdb in the wild that don't have that patch, we still need to work around it in the distcc tests. Reviewed by Craig Silverstein. git-svn-id: http://distcc.googlecode.com/svn/trunk@671 01de4be4-8c4a-0410-9132-4925637da917
-rwxr-xr-xtest/testdistcc.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/testdistcc.py b/test/testdistcc.py
index b94d556..97e5316 100755
--- a/test/testdistcc.py
+++ b/test/testdistcc.py
@@ -1269,11 +1269,14 @@ class Gdb_Case(CompileHello_Case):
f.close()
out, errs = self.runcmd("gdb --batch --command=gdb_commands "
"link/%s </dev/null" % testtmp_exe)
- # Apparently, due to a gdb bug, gdb can produce the (harmless) error
- # message "Failed to read a valid object file" on some systems.
- error_message = 'Failed to read a valid object file image from memory.\n'
- if errs:
- self.assert_equal(errs, error_message)
+ # Normally we expect the stderr output to be empty.
+ # But, due two gdb bugs, some versions of gdb will produce a
+ # (harmless) error or warning message.
+ # In both of these cases, we can safely ignore the message.
+ error_message1 = 'Failed to read a valid object file image from memory.\n'
+ error_message2 = 'warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4\n'
+ if errs and errs != error_message1 and errs != error_message2:
+ self.assert_equal(errs, '')
self.assert_re_search('puts\\(HELLO_WORLD\\);', out)
self.assert_re_search('testtmp.c:[45]', out)
@@ -1296,8 +1299,8 @@ class Gdb_Case(CompileHello_Case):
or ((not pump_mode) and gcc_preprocessing_preserves_pwd)):
out, errs = self.runcmd("gdb --batch --command=../gdb_commands "
"./%s </dev/null" % testtmp_exe)
- if errs:
- self.assert_equal(errs, error_message)
+ if errs and errs != error_message1 and errs != error_message2:
+ self.assert_equal(errs, '')
self.assert_re_search('puts\\(HELLO_WORLD\\);', out)
self.assert_re_search('testtmp.c:[45]', out)
os.chdir('..')