[Pharo-project] [Jenkins] Failing tests 2.0
Issue 6929: Undeclared ManifestManifestResourcesTests http://code.google.com/p/pharo/issues/detail?id=6929 Issue 6927: Failing test for Manifest http://code.google.com/p/pharo/issues/detail?id=6927 Issue 6928: Obsolete class after running all tests http://code.google.com/p/pharo/issues/detail?id=6928 Issue 6309: Failing test on Windows related to SocketStream http://code.google.com/p/pharo/issues/detail?id=6309 -- Marcus Denker -- http://marcusdenker.de
I'm stuck. I try to open a serial Port on Linux using Pharo. The code is as simple as: port := SerialPort new. portName := '/dev/ttyUSB0'. port openPort: portName. Now this opening fails for "whatever" reason. Anyway in the console I got the following "messages": PluggableTextMorph>>handleEdit: in Block: [result := editBlock value] Error while opening the serial port (/dev/ttyUSB0#4 ). Error: Cannot open '/dev/ttyUSB0' It seems after the USB0 there is not the "end" of the string but some gibberish. I tried to extract the code for the SerialPlugin and use it stand-alone in C andwrote the following: #include <stdio.h> #include "SerialPlugin.h" int main(void) { char *portName = "/dev/ttyUSB0"; int baudRate = 9600; int stopBitsType = 1; int parityType = 0; int dataBits = 8; int inFlowControlType = 0; int outFlowControlType = 0; int xOnByte = 19; int xOffByte = 24; int iRval; iRval = serialPortOpenByName (portName, baudRate, stopBitsType, parityType, dataBits, inFlowControlType, outFlowControlType, xOnByte, xOffByte); iRval = serialPortCloseByName (portName); return 0; } And there is no error while using it this way in C. So what is broken? Regards Friedrich
we fixed that with Luc in the sprint last friday :) problem was: 1) for linux, primitive openByName: was never implemented. 2) for OSX, all the plugin was never implemented, there was just a stub. So well, we implemented all of that, now... you need the latest VM build. but I'm afraid right now jenkins is experimenting some problems and not online. Just wait a few hours and you will be able to download it :) Esteban On Nov 7, 2012, at 3:54 PM, Friedrich Dominicus <frido@q-software-solutions.de> wrote:
I'm stuck. I try to open a serial Port on Linux using Pharo.
The code is as simple as:
port := SerialPort new. portName := '/dev/ttyUSB0'. port openPort: portName.
Now this opening fails for "whatever" reason. Anyway in the console I got the following "messages":
PluggableTextMorph>>handleEdit: in Block: [result := editBlock value] Error while opening the serial port (/dev/ttyUSB0#4 ). Error: Cannot open '/dev/ttyUSB0'
It seems after the USB0 there is not the "end" of the string but some gibberish.
I tried to extract the code for the SerialPlugin and use it stand-alone in C andwrote the following:
#include <stdio.h> #include "SerialPlugin.h"
int main(void) { char *portName = "/dev/ttyUSB0"; int baudRate = 9600; int stopBitsType = 1; int parityType = 0; int dataBits = 8; int inFlowControlType = 0; int outFlowControlType = 0; int xOnByte = 19; int xOffByte = 24; int iRval;
iRval = serialPortOpenByName (portName, baudRate, stopBitsType, parityType, dataBits, inFlowControlType, outFlowControlType, xOnByte, xOffByte); iRval = serialPortCloseByName (portName); return 0; }
And there is no error while using it this way in C. So what is broken?
Regards Friedrich
Hi Friedrich, I did not test myself but I will soon. Since the Jenkins is down, you can found the latest VM (with the SerialPlugin modifications that Esteban did) in my dropbox: https://www.dropbox.com/sh/flx2cc8mjszhckg/uZ8sTxSB1k Luc #Luc 2012/11/7 Esteban Lorenzano <estebanlm@gmail.com>
we fixed that with Luc in the sprint last friday :)
problem was:
1) for linux, primitive openByName: was never implemented. 2) for OSX, all the plugin was never implemented, there was just a stub.
So well, we implemented all of that, now... you need the latest VM build. but I'm afraid right now jenkins is experimenting some problems and not online. Just wait a few hours and you will be able to download it :)
Esteban
On Nov 7, 2012, at 3:54 PM, Friedrich Dominicus < frido@q-software-solutions.de> wrote:
I'm stuck. I try to open a serial Port on Linux using Pharo.
The code is as simple as:
port := SerialPort new. portName := '/dev/ttyUSB0'. port openPort: portName.
Now this opening fails for "whatever" reason. Anyway in the console I got the following "messages":
PluggableTextMorph>>handleEdit: in Block: [result := editBlock value] Error while opening the serial port (/dev/ttyUSB0# 4 ). Error: Cannot open '/dev/ttyUSB0'
It seems after the USB0 there is not the "end" of the string but some gibberish.
I tried to extract the code for the SerialPlugin and use it stand-alone in C andwrote the following:
#include <stdio.h> #include "SerialPlugin.h"
int main(void) { char *portName = "/dev/ttyUSB0"; int baudRate = 9600; int stopBitsType = 1; int parityType = 0; int dataBits = 8; int inFlowControlType = 0; int outFlowControlType = 0; int xOnByte = 19; int xOffByte = 24; int iRval;
iRval = serialPortOpenByName (portName, baudRate, stopBitsType, parityType, dataBits, inFlowControlType, outFlowControlType, xOnByte, xOffByte); iRval = serialPortCloseByName (portName); return 0; }
And there is no error while using it this way in C. So what is broken?
Regards Friedrich
Luc Fabresse <luc.fabresse@gmail.com> writes:
Hi Friedrich,
 I did not test myself but I will soon.  Since the Jenkins is down, you can found the latest VM (with the SerialPlugin modifications that Esteban did) in my dropbox: https://www.dropbox.com/sh/flx2cc8mjszhckg/uZ8sTxSB1k Ok I downloaded this Virtual Machine and tried it, but still the erro persists: 8 November 2012 5:24:29.474 pm
VM: unix - i686 - linux-gnu - CoInterpreter VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, https://git.gitorious.org/cogvm/blessed.git Commit: a7bf128cd3b9389e77ea0cdec9a515282926a483 Date: 2012-11-02 14:17:44 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #136 Image: Pharo1.4 [Latest update: #14457] SerialPort(Object)>>error: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: aString: 'Cannot open ''/dev/ttyUSB0''' Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24 SerialPort>>openPort: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: portId: '/dev/ttyUSB0' result: nil Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24 UndefinedObject>>DoIt Receiver: nil Arguments and temporary variables: Receiver's instance variables: nil Compiler>>evaluate:in:to:notifying:ifFail:logged: Receiver: a Compiler Arguments and temporary variables: textOrStream: a ReadWriteStream aContext: nil receiver: nil aRequestor: a TextMorphForEditView(464781312) failBlock: [self morph flash. ^ nil] logFlag: true methodNode: DoIt sPort := SerialPort new. ^ sPort openPort: '/dev/ttyUSB0' method: (UndefinedObject>>#DoIt "a CompiledMethod(30146560)") value: nil toLog: nil itsSelection: nil itsSelectionString: nil Receiver's instance variables: sourceStream: a ReadWriteStream requestor: a TextMorphForEditView(464781312) class: UndefinedObject category: nil context: nil parser: a Parser [rcvr class evaluatorClass new evaluate: self selectionForDoitAsStream in: ctxt to: rcvr notifying: self morph ifFail: [self morph flash. ^ nil] logged: true] in SmalltalkEditor>>evaluateSelectionAndDo: Receiver: a SmalltalkEditor Arguments and temporary variables: rcvr: nil ctxt: nil Receiver's instance variables: morph: a TextMorphForEditView(464781312) selectionShowing: true model: a Workspace editingState: a SmalltalkEditingState This is the code I tried: sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyUSB0'. What can I have done wrong? If I'm trying the other approach (making a symbolc link to /dev/ttyS0 I can open the port and get my informations back. Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
2012/11/8 Friedrich Dominicus <frido@q-software-solutions.de>
Luc Fabresse <luc.fabresse@gmail.com> writes:
Hi Friedrich,
I did not test myself but I will soon. Since the Jenkins is down, you can found the latest VM (with the SerialPlugin modifications that Esteban did) in my dropbox: https://www.dropbox.com/sh/flx2cc8mjszhckg/uZ8sTxSB1k Ok I downloaded this Virtual Machine and tried it, but still the erro persists: 8 November 2012 5:24:29.474 pm
VM: unix - i686 - linux-gnu - CoInterpreter VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, https://git.gitorious.org/cogvm/blessed.git Commit: a7bf128cd3b9389e77ea0cdec9a515282926a483 Date: 2012-11-02 14:17:44 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #136 Image: Pharo1.4 [Latest update: #14457]
SerialPort(Object)>>error: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: aString: 'Cannot open ''/dev/ttyUSB0''' Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24
SerialPort>>openPort: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: portId: '/dev/ttyUSB0' result: nil Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24
UndefinedObject>>DoIt Receiver: nil Arguments and temporary variables:
Receiver's instance variables: nil
Compiler>>evaluate:in:to:notifying:ifFail:logged: Receiver: a Compiler Arguments and temporary variables: textOrStream: a ReadWriteStream aContext: nil receiver: nil aRequestor: a TextMorphForEditView(464781312) failBlock: [self morph flash. ^ nil] logFlag: true methodNode: DoIt sPort := SerialPort new. ^ sPort openPort: '/dev/ttyUSB0' method: (UndefinedObject>>#DoIt "a CompiledMethod(30146560)") value: nil toLog: nil itsSelection: nil itsSelectionString: nil Receiver's instance variables: sourceStream: a ReadWriteStream requestor: a TextMorphForEditView(464781312) class: UndefinedObject category: nil context: nil parser: a Parser
[rcvr class evaluatorClass new evaluate: self selectionForDoitAsStream in: ctxt to: rcvr notifying: self morph ifFail: [self morph flash. ^ nil] logged: true] in SmalltalkEditor>>evaluateSelectionAndDo: Receiver: a SmalltalkEditor Arguments and temporary variables: rcvr: nil ctxt: nil Receiver's instance variables: morph: a TextMorphForEditView(464781312) selectionShowing: true model: a Workspace editingState: a SmalltalkEditingState
This is the code I tried:
sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyUSB0'.
Did you tried:
sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyS0'. Luc What can I have done wrong?
If I'm trying the other approach (making a symbolc link to /dev/ttyS0 I can open the port and get my informations back.
Regards Friedrich
-- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Luc Fabresse <luc.fabresse@gmail.com> writes:
Did you tried:
sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyS0'.
No, but now I did and with a symbolic link from /dev/ttyUSB0 to /dev/ttyS0 I get this thing opened? Well I can not see why this should be "expected". Regards Friedrich
2012/11/11 Friedrich Dominicus <frido@q-software-solutions.de>
Luc Fabresse <luc.fabresse@gmail.com> writes:
Did you tried:
sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyS0'.
No, but now I did and with a symbolic link from /dev/ttyUSB0 to /dev/ttyS0 I get this thing opened?
I do not understand why you need a symlink.
Well I can not see why this should be "expected".
Because you said previously that: "If I'm trying the other approach (making a symbolc link to /dev/ttyS0 I can open the port and get my informations back." So I understood that your device is accessible through /dev/ttyS0. And why not trying to access it directly? Perhaps I did not get what you meant. Cheers, Luc
Regards Friedrich
Luc Fabresse <luc.fabresse@gmail.com> writes:
2012/11/11 Friedrich Dominicus <frido@q-software-solutions.de>
Luc Fabresse <luc.fabresse@gmail.com> writes:
> > Did you tried: > > sPort := SerialPort new. > sPort close. > sPort openPort: '/dev/ttyS0'. No, but now I did and with a symbolic link from /dev/ttyUSB0 to /dev/ttyS0 Â I get this thing opened?
I do not understand why you need a symlink. Well in the end I want to open /dev/ttyUSB0 and this is what I've done: ls -l ttyS* lrwxrwxrwx 1 root root 7 Nov 8 15:11 ttyS0 -> ttyUSB0
So there is a symbolic link from /dev/ttyUSB0 to /dev/ttyS0 Now if I'm trying: sPort := SerialPort new. sPort close. sPort openPort: '/dev/ttyUSB0'. I get: 11 November 2012 4:26:26.774 pm VM: unix - i686 - linux-gnu - CoInterpreter VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.166 uuid: 5773fcb9-2982-4507-8a9e-4308ec33731e Nov 6 2012, https://git.gitorious.org/cogvm/blessed.git Commit: a7bf128cd3b9389e77ea0cdec9a515282926a483 Date: 2012-11-02 14:17:44 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #136 Image: Pharo1.4 [Latest update: #14457] SerialPort(Object)>>error: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: aString: 'Cannot open ''/dev/ttyUSB0''' Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24 SerialPort>>openPort: Receiver: SerialPort(closed, 9600 baud, 8 bits, 1 stopbits, no parity) Arguments and temporary variables: portId: '/dev/ttyUSB0' result: nil Receiver's instance variables: port: nil baudRate: 9600 stopBitsType: 1 parityType: 0 dataBits: 8 outputFlowControlType: 0 inputFlowControlType: 0 xOnByte: 19 xOffByte: 24 If I'm doing: SerialPort(#'/dev/ttyS0', 9600 baud, 8 bits, 1 stopbits, no parity) So the port is properly opened. Don't ask me why I'm not understanding it. Regards Friedrich
Old workaround is to create symlink from /dev/ttyUSB0 to /dev/ttySx and open the port by number (x), not by the name. But use the fixed VM ;-) -- Pavel On Wed, Nov 7, 2012 at 3:54 PM, Friedrich Dominicus <frido@q-software-solutions.de> wrote:
I'm stuck. I try to open a serial Port on Linux using Pharo.
The code is as simple as:
port := SerialPort new. portName := '/dev/ttyUSB0'. port openPort: portName.
Now this opening fails for "whatever" reason. Anyway in the console I got the following "messages":
PluggableTextMorph>>handleEdit: in Block: [result := editBlock value] Error while opening the serial port (/dev/ttyUSB0# 4 ). Error: Cannot open '/dev/ttyUSB0'
It seems after the USB0 there is not the "end" of the string but some gibberish.
I tried to extract the code for the SerialPlugin and use it stand-alone in C andwrote the following:
#include <stdio.h> #include "SerialPlugin.h"
int main(void) { char *portName = "/dev/ttyUSB0"; int baudRate = 9600; int stopBitsType = 1; int parityType = 0; int dataBits = 8; int inFlowControlType = 0; int outFlowControlType = 0; int xOnByte = 19; int xOffByte = 24; int iRval;
iRval = serialPortOpenByName (portName, baudRate, stopBitsType, parityType, dataBits, inFlowControlType, outFlowControlType, xOnByte, xOffByte); iRval = serialPortCloseByName (portName); return 0; }
And there is no error while using it this way in C. So what is broken?
Regards Friedrich
participants (5)
-
Esteban Lorenzano -
Friedrich Dominicus -
Luc Fabresse -
Marcus Denker -
Pavel Krivanek