bec8 / distcc

Automatically exported from code.google.com/p/distcc
0 stars 0 forks source link

make check fails on PreprocessAsm_Case #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am building on a plain user account distcc 3.1[1] on an arm4vt[2] 
machine with gcc 4.1.2 with FSO a distribution based on angstom built 
with Openembedded

uname -a;cc --version
Linux om-gta02 2.6.29-rc2 #1 PREEMPT Fri May 8 22:05:18 CEST 2009 armv4tl 
unknown unknown GNU/Linux
cc (GCC) 4.1.2
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is 
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

make check failed on PreprocessAsm_Case (the file assembler looks invalid 
for arm)

I have aplied the followin patch[*] to make it work for me
[1] -http://distcc.googlecode.com/files/distcc-3.1.tar.bz2
[2] -neo freeruner
[*]
--- ../testdistcc.py    Thu May 21 16:11:01 2009
+++ test/testdistcc.py  Thu May 21 15:38:47 2009
@@ -1852,7 +1852,8 @@

     def compile(self):
         if sys.platform == 'linux2':
-            self.runcmd(self.distcc()
+            if os.uname()[4] <> 'armv4tl':
+                 self.runcmd(self.distcc()
                         + "-o test2.o -c test2.S")

     def runtest(self):

Original issue reported on code.google.com by perezd...@gmail.com on 21 May 2009 at 2:13

GoogleCodeExporter commented 9 years ago
Thanks for the patch.

Really this test should raise NotRunError if it can't do the compile,
so that the test shows up as NOTRUN rather than as OK.

Could you test the following alternative patch, based on yours, which addresses 
that
issue?

If that works on your system too, I'll go ahead and submit it.

Index: testdistcc.py
===================================================================
--- testdistcc.py       (revision 673)
+++ testdistcc.py       (working copy)
@@ -1917,11 +1917,13 @@
     def setup(self):
         WithDaemon_Case.setup(self)
         open('test2.S', 'wt').write(self.asm_source)
-
+
     def compile(self):
-        if sys.platform == 'linux2':
+        if sys.platform == 'linux2' and os.uname()[4] <> 'armv4tl':
             self.runcmd(self.distcc()
                         + "-o test2.o -c test2.S")
+        else:
+            raise comfychair.NotRunError ('this test is system-specific')

     def runtest(self):
         self.compile()

Original comment by fergus.h...@gmail.com on 21 May 2009 at 5:30

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by fergus.h...@gmail.com on 21 May 2009 at 5:54

GoogleCodeExporter commented 9 years ago
Thanks for your fast reply.

Your path works but I suspect I misunderstod the isue: 
 if you look at the previous class RemoteAssemble_Case gives exactly the same errors
(they are the same code after the preprocessor) and get a OK.

I have modified it to run the test and it fails with the followin output: 
PreprocessAsm_Case             FAIL
-----------------------------------------------------------------
Traceback (most recent call last):
  File "/home/distcc/distcc-3.1/test/comfychair.py", line 355, in runtest
    obj.runtest()
  File "./test/testdistcc.py", line 1861, in runtest
    self.compile()
  File "./test/testdistcc.py", line 1856, in compile
    + "-o test2.o -c test2.S")
TypeError: bad operand type for unary +: 'str'
test_log:
Run command: distccd --verbose --lifetime=60 --daemon --log-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/distccd.log' --pid-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/daemonpid.tmp' --port 42000
--allow 127.0.0.1
Wait status: 0x6600 (exit code 102, signal 0)
stdout:

stderr:
Run command: distccd --verbose --lifetime=60 --daemon --log-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/distccd.log' --pid-file
'/home/distcc/distcc-3.1/_testtmp/PreprocessAsm_Case/daemonpid.tmp' --port 42001
--allow 127.0.0.1
Wait status: 0x0 (exit code 0, signal 0)
stdout:

stderr:

-----------------------------------------------------------------

Original comment by perezd...@gmail.com on 21 May 2009 at 9:14

GoogleCodeExporter commented 9 years ago
I have found the reason for the test failure; on arm assembler the "@" is 
allways 
the start of a comment.

The attached patch is tested on arm and i386

Original comment by perezd...@gmail.com on 26 May 2009 at 12:55

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the patch.  I split the patch into two, and made a couple of minor 
adjustments and applied them in revisions 712 and 717.

Revision 712:
Index: test/testdistcc.py
===================================================================
--- test/testdistcc.py  (revision 712)
+++ test/testdistcc.py  (revision 713)
@@ -1917,11 +1917,13 @@
     def setup(self):
         WithDaemon_Case.setup(self)
         open('test2.S', 'wt').write(self.asm_source)
-    
+
     def compile(self):
         if sys.platform == 'linux2':
             self.runcmd(self.distcc()
                         + "-o test2.o -c test2.S")
+        else:
+            raise comfychair.NotRunError ('this test is system-specific')

     def runtest(self):
         self.compile()

Revision 717:
Index: test/testdistcc.py
===================================================================
--- test/testdistcc.py  (revision 716)
+++ test/testdistcc.py  (revision 717)
@@ -1871,6 +1871,7 @@
     # We have a rather tricky method for testing assembly code when we
     # don't know what platform we're on.  I think this one will work
     # everywhere, though perhaps not.
+    # We don't use @ because that starts comments for ARM.
     asm_source = """
         .file  "foo.c"
 .globl msg
@@ -1879,7 +1880,7 @@
    .string "hello world"
 .data
    .align 4
-   .type    msg,@object
+   .type    msg,object
    .size    msg,4
 msg:
    .long .LC0
@@ -1908,7 +1909,7 @@
    .string  MSG
 .data
    .align 4
-   .type    msg,@object
+   .type    msg,object
    .size    msg,4
 msg:
    .long .LC0

Original comment by fergus.h...@gmail.com on 2 Mar 2010 at 8:27