public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH V3-2 6/9] testcases/lib: Add tst_random decmical integer generator
Date: Mon, 6 Jun 2016 17:46:10 +0200	[thread overview]
Message-ID: <20160606154609.GD21264@rei> (raw)
In-Reply-To: <1462966591-3895-7-git-send-email-chuhu@redhat.com>

Hi!
> +static long rand_range(long min, long max)
> +{
> +	return rand() % (max - min + 1) + min;
> +}

I've changed this to use random() and srandom() instead of rand() and
srand(), since rand() and srand() are obsolete and moreover rand()
returns only int while the rest of the test uses long.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2016-06-06 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 11:36 [LTP] [PATCH V3-2 0/9] tracing: make ftrace tests to be extended Chunyu Hu
2016-05-11 11:36 ` [LTP] [PATCH V3-2 1/9] tracing: reorganize ftrace-stress tests to general tests Chunyu Hu
2016-05-11 11:36   ` [LTP] [PATCH V3-2 2/9] tracing/ftrace: add new case for ftrace userstacktrace Chunyu Hu
2016-05-11 11:36     ` [LTP] [PATCH V3-2 3/9] tracing/ftrace: add a new case for signal_generate Chunyu Hu
2016-05-11 11:36       ` [LTP] [PATCH V3-2 4/9] ftrace_stress: skip unsupported tests and early cleanup Chunyu Hu
2016-05-11 11:36         ` [LTP] [PATCH V3-2 5/9] ftrace_stress: keep the name of testscipt in sync with tracing file Chunyu Hu
2016-05-11 11:36           ` [LTP] [PATCH V3-2 6/9] testcases/lib: Add tst_random decmical integer generator Chunyu Hu
2016-05-11 11:36             ` [LTP] [PATCH V3-2 7/9] ftrace_stress: update the trace_options test Chunyu Hu
2016-05-11 11:36               ` [LTP] [PATCH V3-2 8/9] ftrace_stress: add two new tests for ftrace_filter and tracing_cpu_mask Chunyu Hu
2016-05-11 11:36                 ` [LTP] [PATCH V3-2 9/9] ftrace_stress: cleanup and use ltp API Chunyu Hu
2016-06-06 15:46             ` Cyril Hrubis [this message]
2016-06-06 15:45 ` [LTP] [PATCH V3-2 0/9] tracing: make ftrace tests to be extended Cyril Hrubis
2016-06-07  3:38   ` Chunyu Hu
2016-06-07 10:25     ` Cyril Hrubis

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=20160606154609.GD21264@rei \
    --to=chrubis@suse.cz \
    --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