From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Adding a TOR system test - confusing results Date: Thu, 26 Jul 2018 22:13:55 -0700 Message-ID: <874lgltg4s.fsf@gmail.com> References: <87k1pmhkp9.fsf@gmail.com> <87y3e2tjfm.fsf@gnu.org> <87wotltjig.fsf@gmail.com> <87effqyv87.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiv4l-00083j-KP for guix-devel@gnu.org; Fri, 27 Jul 2018 01:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiv4k-00076q-Mx for guix-devel@gnu.org; Fri, 27 Jul 2018 01:14:03 -0400 In-Reply-To: <87effqyv87.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 26 Jul 2018 15:36:40 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Chris Marusich skribis: > >> Why does it pass? The (sleep 999999) form appears to be totally >> ignored, and I don't understand why. It's concerning to me that I can't >> understand how the code is being executed. I expected the test to hang. > > According to the manual (info "(guile) Signals"): > > -- Scheme Procedure: sleep secs > -- Scheme Procedure: usleep usecs > -- C Function: scm_sleep (secs) > -- C Function: scm_usleep (usecs) > Wait the given period SECS seconds or USECS microseconds (both > integers). If a signal arrives the wait stops and the return value > is the time remaining, in seconds or microseconds respectively. If > the period elapses with no signal the return is zero. > > So I suspect that the marionette process got a signal, and thus =E2=80=98= sleep=E2=80=99 > returned quickly. Could you print its return value? Thank you for the reply! The return value is 999998. Like you said, maybe it's possible that the marionette process got a signal. But why would that happen? I have a related question. Is there a guarantee that the test case will begin after the TOR service has started up? The test passes consistently, which is good. However, I can't find any code that guarantees that the test case will begin after TOR has started up. In order to make the test succeed even if it happens to check TOR before TOR has started up, I think I need to check the TOR service in a loop and eventually time out if it doesn't show up after a while. That will be difficult to implement if I can't rely on the "sleep" procedure. In short, my questions are: * Why does the sleep get interrupted? * Do I need to periodically poll for TOR's health in my test? I appreciate your time answering these detailed questions. Thank you. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltaqhMACgkQ3UCaFdgi Rp2RXg/7Bp2zBKBqCEU28QfoeWINrWi9qoGsXUnMUTmJ9fCob9NtQtsTzaPs76b9 ntol2wkTPBuffRslKXBI5JpmwDXKrcee+gJlmn8A9l/I5si2bNn6PnG3cNepvRqf iY7h6N9ZmWQRr8yZj6sZQ4Uh+C37d4jysekoj7axbI+jc5M5rmmxjEwEQPiqEdcM 81pvZeEntFF930Y6frXj2wNf1VU0Usj7fC7loRonUOQ3DTHjpLCMclarltkA3t/s YL9ak0EyOkLag0eiJS+/4B8bnTS8aUMzCUQZk+cpFTUW7ye8LfsyDXe14od9ZRV7 4dDvfZgR25pd5Ee+EOpYR5c2AgGjHWqLi504+2aqQeJUcXorUT0zm6afVOEBAAII XG2WDU3VRNVKaNwLUKhQy1anO+S5qRphCSowJBnRqx4SGqQifaHcVpajGKhAFOqV hsIv63SApq/NH5Bf4EsJ7Zde5oLDEpscH1SOBRMv2o8nFSkfYSIcW8/ipKIOMP11 RB5tLlTqvRc01MP+GYNQd7esclcE9QmVDw6jcrL9sYYgGnAqlCq8/NGLGbMGK1xx JkchnapW2SAt055qqg6EK6NeX03CnvUSBaiQIHpV28zKHgW9qq8of1y269GQpYp6 +1mUHnerTRl3uQib/XbOPcXN2Bhkhh8X5jrhMjaGMmCx3WcRFfo= =zYNw -----END PGP SIGNATURE----- --=-=-=--