Re: CVS commit: src/tests/syscall

2011-05-22 Thread Julio Merino

On 5/22/11 12:48 AM, Christos Zoulas wrote:

On May 22, 12:28am, j...@julipedia.org (Julio Merino) wrote:
-- Subject: Re: CVS commit: src/tests/syscall
| That's what was done.  But in order to enforce the timeouts et. al. this
| library had to fork() on every test case.  This was really, really ugly
| (and slow) in shell.  It was also hard to keep the 3 implementations (c,
| c++, shell) in sync.

You should not have to fork if you don't set a timeout. Or you can fork
just one killer and have it timeout in 2x the last registered timeout and exit.
It listens to a socket for pid's and timeouts; if the socket is still
useable after the timeout it kills.


One of the original design goals of atf was to explicitly run every test 
case in a subprocess.  The idea was to prevent broken test cases from 
corrupting the results of other tests.  So yes, you have to fork (if 
only because it's in the requirements of the design) ;-)


I had actually thought about the alternative you mention not too long 
ago, but if you do that, then a misbehaving test case will result in the 
termination of the whole test program (you need to kill a particular 
process after all).  Maybe it's not a big deal since that's what other 
very-popular frameworks do, but it's a complete shift in how atf 
currently works.


Anyway.  We are getting side-tracked here; I was just trying to see if 
we had a bug in atf.  If you want to discuss this further, the topic 
needs to be moved to atf-devel.


Re: CVS commit: src/sys/dev/acpi

2011-05-22 Thread Iain Hibbert
On Sun, 22 May 2011, Joerg Sonnenberger wrote:

 Modified Files:
   src/sys/dev/acpi: acpi_power.c

 Log Message:
 Let's not be silly. Use a fancy if else to decide behavior of a bool
 and hope cosmic radition doesn't create a third state.

I'll just say here, that I found a code generation bug in pcc (actually,
inexact emulation of a gcc feature which was a wtf itself) because of the
existence of this kind of code..

think of it as an assert(), which could for example catch calls to the
function using an int argument (yeah ok, -std=gnu99 would complain about
lack of prototypes)

iain