public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 4/5] fzsync: Simplify API with start/end race calls and limit exec time
Date: Thu, 30 Aug 2018 15:03:05 +0200	[thread overview]
Message-ID: <87r2igroqe.fsf@rpws.prws.suse.cz> (raw)
In-Reply-To: <20180829091712.GA30074@rei>

Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> > If yuo init the pair with TST_FZSYNC_PAIR_INIT these fields are already
>> > zeroed...
>>
>> Not if the user uses the -i argument.
>
> Hmm, then we should probably drop the static initialization. We would
> have to have way to set some parameters to non-default values, but I
> guess that we can do that after we called the init function. Something
> as:
>
> 	tst_fzsync_init(&pair);
> 	tst_fzsync_set_foo(&par, val);
>
> Where tst_fzsync_set_foo() is an static inline function.
>

Yeah, thinking about it we should not do the static initialisation
statically anyway incase the test writer needs to dynamically allocate
the memory where the struct is stored. Although they could use memcpy,
but it seems a little bit messy.

--
Thank you,
Richard.

  reply	other threads:[~2018-08-30 13:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  9:29 [LTP] [PATCH 0/5] New fuzzy sync library API Richard Palethorpe
2018-08-28  9:29 ` [LTP] [PATCH 1/5] lib: Allow user to easily get LTP_TIMEOUT_MUL value Richard Palethorpe
2018-08-28  9:29 ` [LTP] [PATCH 2/5] tst_timer: Create interface for using multiple timers Richard Palethorpe
2018-08-28 14:23   ` Cyril Hrubis
2018-08-28  9:30 ` [LTP] [PATCH 3/5] tst_timer: Add nano second conversions Richard Palethorpe
2018-08-28  9:30 ` [LTP] [PATCH 4/5] fzsync: Simplify API with start/end race calls and limit exec time Richard Palethorpe
2018-08-28 16:24   ` Cyril Hrubis
2018-08-29  8:45     ` Richard Palethorpe
2018-08-29  9:17       ` Cyril Hrubis
2018-08-30 13:03         ` Richard Palethorpe [this message]
2018-08-30  5:58   ` Li Wang
2018-08-30  8:53     ` Richard Palethorpe
2018-08-28  9:30 ` [LTP] [PATCH 5/5] Convert tests to use fzsync_{start, end}_race API Richard Palethorpe

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=87r2igroqe.fsf@rpws.prws.suse.cz \
    --to=rpalethorpe@suse.de \
    --cc=ltp@lists.linux.it \
    /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