[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libl4 test cases
From: |
Marcus Brinkmann |
Subject: |
Re: libl4 test cases |
Date: |
Tue, 15 Feb 2005 21:18:12 +0100 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Fri, 11 Feb 2005 19:52:27 +0000,
Matthieu Lemerre <address@hidden> wrote:
> [1 <text/plain (7bit)>]
> Here's a patch which adds support for reading/writing things in the
> utcb. Along is a C file which tests the loading / storing of MRs/BRs.
Thanks. I checked it in, but with some changes:
* I refactored the test code a bit, so you can easily add more MR and
BR tests (and I added one which writes all MRs/BRs). This may look
a bit silly, considering that those functions tested are very, very
simple, but we can just as well do it properly, and it may be useful
for c&p later on. I also made the function clear all vregs with a
pattern different from the one we test.
* Apropos c&p: You tested to write BR63, which doesn't exist. This
made the test crash on my system. I fixed this, but you would have
found that yourself if you had added more tests! This is why:
* I added a test for the L4_NUM_BRS and L4_NUM_MRS macros.
* I renamed the file to t-l4-message.c. This is supposed to suggest
that the file l4/message.h is tested. (All tests for header
interfaces should be named that way. Tests for bugs that used to
exist etc can go in differently named files, like t-bug-NUMBER or
t-FEATURE).
Some small hints for later:
* We usually write full and proper sentences in our comments, which
end with a period, followed by two spaces.
/* This is a proper comment. */
/* this not */
* Keep your lines under 80 characters, even better under or up to 78
characters, or even 76 characters (default in emacs).
As a bonus, I added option and env parsing, so you can do now:
./t-l4-message -v
or
./t-l4-message -vk
or
./t-l4-message -v -k
or
TESTOPTS=vk ./t-l4-message
or even
TESTOPTS=v ./t-l4-message -k
Thanks,
Marcus
Re: libl4 test cases, Matthieu Lemerre, 2005/02/11
- Re: libl4 test cases,
Marcus Brinkmann <=