public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Lukasz Majewski <lukma@denx.de>
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	Florian Weimer <fweimer@redhat.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Florian Weimer <fw@deneb.enyo.de>,
	Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v2 1/3] tst: Extend cross-test-ssh.sh to specify if target date can be altered
Date: Mon, 8 Feb 2021 22:09:01 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2102082203400.2739371@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20210206175709.4691-1-lukma@denx.de>

On Sat, 6 Feb 2021, Lukasz Majewski wrote:

> This code adds new flag - '--allow-time-setting' to cross-test-ssh.sh
> script to indicate if it is allowed to alter the date on the system
> on which tests are executed. This change is supposed to be used with
> test systems, which use virtual machines for testing.
> 
> The GLIBC_TEST_ALLOW_TIME_SETTING env variable is exported to the
> remote environment on which the eligible test is run and brings no
> functional change when it is not.

I think there are two separate features here, both of which should be 
documented.  The ability to run tests that set the time should not be 
limited to when cross-test-ssh.sh is used; someone might want to write 
their own test wrapper supporting that feature (there's no requirement to 
use the provided test wrapper, writing your own is fully supported), or 
might want to run tests with setting time enabled for native testing (for 
example, if they have a build and test environment that creates a virtual 
machine to run "make check" natively on it and then destroys that virtual 
machine afterwards).

So at least two things should be documented:

* If you set GLIBC_TEST_ALLOW_TIME_SETTING in the environment in which 
tests are run *and* run the tests with appropriate privileges to be able 
to use clock_settime, then such tests will be run, but this will not by 
itself provide any locking against conflicting tests running in parallel 
so you should also either test in series or use a test wrapper that 
provides such locking.

* In the case of using cross-test-ssh.sh, you can pass the 
--allow-time-setting option to automate both setting 
GLIBC_TEST_ALLOW_TIME_SETTING and doing the locking.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2021-02-08 22:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06 17:57 Lukasz Majewski
2021-02-06 17:57 ` [PATCH v2 2/3] support: Provide xclock_settime test helper function Lukasz Majewski
2021-02-06 17:57 ` [PATCH v2 3/3] tst: Add test for clock_settime Lukasz Majewski
2021-02-08 22:09 ` Joseph Myers [this message]
2021-02-10  9:09   ` [PATCH v2 1/3] tst: Extend cross-test-ssh.sh to specify if target date can be altered Lukasz Majewski

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=alpine.DEB.2.22.394.2102082203400.2739371@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).