Logging for ser2net

mer. 22 juin 2016 by Rémi Duraffort

Today, I was debugging an strange issue in LAVA while trying to boot a board.

I was under the impression that the board was not receiving all the u-boot commands that LAVA was sending.

The serial connection is accessible on the network by ser2net.

I discovered that ser2net can log inputs, outputs or both to a file:

TRACEFILE:trace1:/var/log/ser2net.2000.log
2000:telnet:0:/dev/ttyUSB0:9600 tr=trace1

ser2net will print both inputs and outputs characters to /var/log/ser2net.2000.log.

Going back to my issue, the logfile was:

sseetteennvv  aauuttoollooaadd  nnoo
sseettenv initrd_high '0xffffffff'

When the characters are doubled, it means that ser2net has sent and received that character. That's what I was expected as the board is supposed to echo all characters.

However, the characters are suddenly no longer doubled: the board is not echoing. This does explain why the board was not booting.

The question remains: why is the serial line breaking after a random number of characters.


Static analysis for Python

ven. 13 mai 2016 by Rémi Duraffort

I've always been a big fan of static analysis. While I was working with C and C++, I was scanning my code with:

For a longer list of static analyzers for each language, look at wikipedia

As I'm now mostly ...

read more

type() vs isinstance()

mar. 03 mai 2016 by Rémi Duraffort

When running pylint on your Python source code, you might encounter this message:

Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck)

This message will be raised for this kind of code:

d = dict()
if type(d) == dict:
    print("d is a dict")

The code is valid but pylint does ...

read more

Migrating from Python2 to Python3

mar. 19 avril 2016 by Rémi Duraffort

Porting code from Python 2 to Python 3 is made easier by using 2to3. This application will find patterns that should be changed to keep the same behavior in Python 2 and 3.

However, 2to3 is sometime too conservative, trying to keep the exact same semantic.

For instance, dictionaries functions ...

read more

@FOSDEM

mer. 08 janvier 2014 by Rémi Duraffort

We will be at FOSDEM to talk about PRoot and some other tools based on it.

Cedric will do a Lightning talk Saturday about syscall instrumentation. He will present some tools, based on syscall instrumentation, that we develop and use at STMicroelectronics:

  • PRoot, emulate chroot, bind mount and binfmt_misc for ...
read more

Pretending to be root inside PRoot

jeu. 21 novembre 2013 by Rémi Duraffort

While working on PRoot to improve the extension that fake the root user, I (re)discovered an old article that I never published before. So let's focus on the fake_id0 feature and on how it allows to use package manager directly inside the root file systems.

Some root causes ...

read more

PRoot now in Debian

mar. 20 août 2013 by Rémi Duraffort

A really short message to inform you that PRoot is now part of Debian Sid.

You can now install PRoot with apt-get install proot.

Enjoy !

read more

Scaling the time

lun. 24 septembre 2012 by Rémi Duraffort

Using valgrind on time-dependent softwares like VLC media player is often a nightmare and leads to poor results. Let's present a simple and elegant way to workaround this issue

Valgrind and realtime softwares

Valgrind is a really useful tool that checks for memory leaks, wrong memory access and many ...

read more

Making VLC at home

ven. 04 mai 2012 by Rémi Duraffort

In my previous article, I showed a way to setup and jump into a root file system in order to test a software in this environment.

Using PRoot, such task looks really easy and does not require any privileges. We will now finish this setup in order to build and ...

read more

PRoot sorcery

lun. 16 avril 2012 by Rémi Duraffort

A good practice for software developer is to provide a test suite while developing a software. When developing for Linux, it's also a good practice to compile the software and run the test suite on many distributions like Debian, Ubuntu, Fedora, ArchLinux, Centos, Slackware and for both i386 and ...

read more