All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: Florian Westphal <fw@strlen.de>, mptcp@lists.linux.dev
Subject: Re: [PATCH v2 mptcp-next 2/2] selftests: mptcp: check IP_TOS in/out are the same
Date: Tue, 23 Nov 2021 01:01:27 +0100	[thread overview]
Message-ID: <20211123000127.GL6326@breakpoint.cc> (raw)
In-Reply-To: <7f24c515-6b41-e58a-6aba-c9f597c07cd1@tessares.net>

Matthieu Baerts <matthieu.baerts@tessares.net> wrote:
> > +static void init_rng(void)
> > +{
> > +	int fd = open("/dev/urandom", O_RDONLY);
> > +
> > +	if (fd >= 0) {
> > +		unsigned int foo;
> > +
> > +		/* can't fail */
> > +		(void)read(fd, &foo, sizeof(foo));
> > +
> > +		close(fd);
> > +		srand(foo);
> > +	} else {
> > +		srand(time(NULL));
> > +	}
> > +}
> 
> Do you think we need to modify the other ones in MPTCP selftests?

Probably best to add a followup patch that adds internal.h helpers
to reduce this copypastry.

  reply	other threads:[~2021-11-23  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 15:26 [PATCH v2 mptcp-next 1/2] mptcp: getsockopt: add support for IP_TOS Florian Westphal
2021-11-22 15:26 ` [PATCH v2 mptcp-next 2/2] selftests: mptcp: check IP_TOS in/out are the same Florian Westphal
2021-11-22 15:52   ` Matthieu Baerts
2021-11-23  0:01     ` Florian Westphal [this message]
2021-11-23 11:11   ` selftests: mptcp: check IP_TOS in/out are the same: Build Failure MPTCP CI
2021-11-23 11:24     ` Matthieu Baerts
2021-11-23 15:42   ` [PATCH v2 mptcp-next 2/2] selftests: mptcp: check IP_TOS in/out are the same Matthieu Baerts
2021-11-23  7:49 ` [PATCH v2 mptcp-next 1/2] mptcp: getsockopt: add support for IP_TOS Matthieu Baerts

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=20211123000127.GL6326@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    /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 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.