Latest Tweets

MODEST: adding some automation skills to the project!

There are some news concerning MODEST!

It’s been a long time, no doubt, since I added some news to MODEST Project. They were such hectic days, and I was really overloaded with a pile of jobs to be done and some exams to pass … but now, I’m on holidays! Finally! And, this very next Friday, I’ll be flying to London! Isn’t that amazing?

The news are directly related to some tests of MODEST suite. I wrote a simple and trivial bash script so as to control and test the most common routines, functions and so on of kmodest LKM and umodest user-space utility, trying not to waste my time when I’m working on its code, adding some functionalities or testing other ones. This bash-script has been inserted inside the “kmodest-src” CVS source branch, now. You can take a look at it right HERE.

The script

The idea was, more or less, to automate its execution. Compiling , recompiling, cleaning sources, running static and shared tests… this sort of common tasks. Of course the script is very simple. But I didn’t need anything more than that! That’s for certain ;-). Well, we are going to explain what can be done using it.

Full automation tests (static or dynamic-shared)

There are two flags: -cas and -cans. The first one allows to compile and run static tests, thanks to bin/fakeproc static linked binary. The latter does the same, but with the shared linked version of the very same user process bin/fakeproc-shared, ‘course.

Below, some examples how it works:

fakeproc is running now, killing with PID: 7037
Running with PID: 7219
Files opened by process 7219
Slot    I-Node          Type            Uid             Gid             Name
0       959             CharDev         (0):root        (0):root        null
1       4               CharDev         (0):root        (0):root        2
2       959             CharDev         (0):root        (0):root        null
3       392507          Regular         (0):root        (0):root        fakeproc.out
Running static tests (-c) over /tmp/modest-tests…
fakeproc is running now, killing with PID: 7219
Running with PID: 7229
Redirecting fd: 3 to: /tmp/modest-tests.
When you want to restore original fd, just type q ENTER
>? q
Okay, fd[] on pid: 7229 restored.
Running static tests (-d) over /tmp/modest-tests…
fakeproc is running now, killing with PID: 7229
Running with PID: 7239
Redirecting fd: 3 to: /tmp/modest-tests.
When you want to restore original fd, just type q ENTER
>? q
Okay, fd[] on pid: 7239 restored.

Purging sources and updating the CVS repository

Use the -p flag. The script will run a make clean all along the whole sources and, then, will execute the cvs ci -m “” command so as to keep the CVS repository truly synchronized.

Little bit improvements to the umodest tool

Simply, I added a few changes to its source code, in order to show the user during its execution, as long as the FDT for any given process is being altered, what file descriptor will be remaped or redirected and where , that is: the destination file.

This can be shown right here:

Redirecting fd: 3 to: /tmp/modest-tests.
When you want to restore original fd, just type q ENTER
>? q