From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F204466.1040603@domain.hid> Date: Wed, 25 Jan 2012 19:05:26 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4F202C11.70908@domain.hid> <4F202F4E.6000708@domain.hid> <4F203237.2010102@domain.hid> <4F203353.8030302@domain.hid> <4F2035B6.6090105@domain.hid> <4F203771.6070708@domain.hid> <4F203F7F.70509@domain.hid> In-Reply-To: <4F203F7F.70509@domain.hid> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3708128A286541F676046736" Subject: Re: [Xenomai-core] [PATCH] Add sigdebug unit test List-Id: Xenomai life and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai-core This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3708128A286541F676046736 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-01-25 18:44, Gilles Chanteperdrix wrote: > On 01/25/2012 06:10 PM, Jan Kiszka wrote: >> On 2012-01-25 18:02, Gilles Chanteperdrix wrote: >>> On 01/25/2012 05:52 PM, Jan Kiszka wrote: >>>> On 2012-01-25 17:47, Jan Kiszka wrote: >>>>> On 2012-01-25 17:35, Gilles Chanteperdrix wrote: >>>>>> On 01/25/2012 05:21 PM, Jan Kiszka wrote: >>>>>>> We had two regressions in this code recently. So test all 6 possi= ble >>>>>>> SIGDEBUG reasons, or 5 if the watchdog is not available. >>>>>> >>>>>> Ok for this test, with a few remarks: >>>>>> - this is a regression test, so should go to >>>>>> src/testsuite/regression(/native), and should be added to the >>>>>> xeno-regression-test >>>>> >>>>> What are unit test for (as they are defined here)? Looks a bit inco= nsistent. >>> >>> I put under "regression" all the tests I have which corresponded to >>> things that failed one time or another in xenomai past. Maybe we coul= d >>> move unit tests under regression. >>> >>>>> >>>>>> - we already have a regression test for the watchdog called mayday= =2Ec, >>>>>> which tests the second watchdog action, please merge mayday.c with= >>>>>> sigdebug.c (mayday.c also allows checking the disassembly of the c= ode in >>>>>> the mayday page, a nice feature) >>>>> >>>>> It seems to have failed in that important last discipline. Need to = check >>>>> why. >>>> >>>> Because it didn't check the page content for correctness. But that's= now >>>> done via the new watchdog test. I can keep the debug output, but the= >>>> watchdog test of mayday looks obsolete to me. Am I missing something= ? >>> >>> The watchdog does two things: it first sends a SIGDEBUG, then if the >>> application is still spinning, it sends a SIGSEGV. As far as I >>> understood, you test tests the first case, and mayday tests the secon= d >>> case, so, I agree that mayday should be removed, but whatever it test= s >>> should be integrated in the sigdebug test. >>> >> >> Err... SIGSEGV is not a feature, it was the bug I fixed today. :) So t= he >> test case actually specified a bug as correct behavior. >> >> The fallback case is in fact killing the RT task as before. But I'm >> unsure right now: will this leave the system always in a clean state >> behind? >=20 > The test case being a test case and doing nothing particular, I do not > see what could go wrong. And if something goes wrong, then it needs fix= ing. Well, if you kill a RT task while it's running in the kernel, you risk inconsistent system states (held mutexex etc.). In this case the task is supposed to spin in user space. If that is always safe, let's implement the test. Jan --------------enig3708128A286541F676046736 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8gRGYACgkQitSsb3rl5xRb0ACcCx2yhpDqE4uOFwkQwKyHEAgx kP4AoIMyHCdh385RdjmCFTSPgdCF73Xv =5ppU -----END PGP SIGNATURE----- --------------enig3708128A286541F676046736--