summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2009-04-10 19:26:47 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2009-04-10 19:26:47 +0000
commit1a89b4316bc38ebcc50cc137da54b2e568bfd844 (patch)
treefeaaf02a3305ebfde856dd910e05f9d7fc026752
parenta9ae9ab7772ba9da360858179ef6a10d05610c0c (diff)
downloaddistcc-git-1a89b4316bc38ebcc50cc137da54b2e568bfd844.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.
-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('..')