all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Adding a TOR system test - confusing results
Date: Thu, 26 Jul 2018 22:13:55 -0700	[thread overview]
Message-ID: <874lgltg4s.fsf@gmail.com> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Chris Marusich <cmmarusich@gmail.com> 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 ‘sleep’
> 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.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-07-27  5:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23  0:14 Adding a TOR system test - confusing results Chris Marusich
2018-07-23  9:01 ` Ludovic Courtès
2018-07-24  3:11   ` Chris Marusich
2018-07-26 13:36     ` Ludovic Courtès
2018-07-27  5:13       ` Chris Marusich [this message]
2018-07-27  8:19         ` Chris Marusich
2018-07-27  8:41         ` Ludovic Courtès
2018-07-27  9:58           ` Chris Marusich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874lgltg4s.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.