From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] Patch for LTP
Date: Wed, 24 Jul 2019 16:25:47 +0200 [thread overview]
Message-ID: <20190724142520.GA21787@rei.lan> (raw)
In-Reply-To: <5d383661.1c69fb81.3d170.b9f8@mx.google.com>
Hi!
> When I run LTP tests with musl libc, I discovered few issues in tst_timer_test.c:
>
> The array with run times was not sorted. As Rich Felker pointed out, cmp() function breaks the contract for qsort() ??? I fixed it.Because array was not sorted, some tests were dumping cores. Plotting function strongly relies on having array sorted. I fixed that in #1 but still prefer defensive
> programming here ??? protect against buffer overflow i.e. when input data is incorrect.Calculation if average run time is greater than desired time + threshold was incorrect. Each expected run should be in range t < s[i] < t + threshold, so for max.
> edge: sum(s[i] + threshold) < sum(t + threshold). For i belonging to [d,n] => sum(s[i]) < (n-d)*(t + threshold) and not (n-d)*t + threshold.
> Please add this patch to main line of LTP if you don???t see issues here. Feel free to modify the change if needed.Thanks in advance!
Good catch, also thanks for the patch.
Can you please split the patch into separate patches?
You are doing unrelated changes each should be in a separate patch.
Also the comment in the compare function should rather be in the patch
description than in the code itself.
Lastly but not least if you could send the patches with git-send-email
or at least inline so that I can comment on the changes in the reply.
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2019-07-24 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 10:43 [LTP] Patch for LTP piotr.krzysztof.gawel
2019-07-24 14:25 ` Cyril Hrubis [this message]
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=20190724142520.GA21787@rei.lan \
--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