From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/3] syscalls: sysinfo01: Rewrite
Date: Tue, 7 Apr 2026 14:16:55 +0200 [thread overview]
Message-ID: <adT1t083QxgjBX6i@yuki.lan> (raw)
In-Reply-To: <69a84fdb.050a0220.18749d.4545@mx.google.com>
Hi!
> > + sys_load1 = sys_buf->loads[0] / 65536.0;
> > + sys_load5 = sys_buf->loads[1] / 65536.0;
> > + sys_load15 = sys_buf->loads[2] / 65536.0;
>
> I would go for:
>
> sys_load1 = sys_buf->loads[0] / (float)(1 << SI_LOAD_SHIFT);
>
> That "magic value" needs at least to be explained on a comment
> otherwise. With this fixed:
I've fixed the test to use SI_LOAD_SHIFT and TST_KB and also to use
:manpage:`sysinfo(2)` in the doc comment and pushed, thanks for the
reviews.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-04-07 12:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 14:12 [LTP] [PATCH 0/3] Convert sysinfo tests to new library Cyril Hrubis
2026-03-04 14:12 ` [LTP] [PATCH 1/3] tst_test_macros: Add TST_EXP_LE_LU*() Cyril Hrubis
2026-03-04 15:17 ` Andrea Cervesato via ltp
2026-03-04 14:12 ` [LTP] [PATCH 2/3] syscalls: sysinfo01: Rewrite Cyril Hrubis
2026-03-04 15:29 ` Andrea Cervesato via ltp
2026-04-07 12:16 ` Cyril Hrubis [this message]
2026-03-04 15:32 ` Andrea Cervesato via ltp
2026-03-04 14:12 ` [LTP] [PATCH 3/3] syscalls: sysinfo02: Convert to the new library Cyril Hrubis
2026-03-04 15:31 ` Andrea Cervesato via ltp
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=adT1t083QxgjBX6i@yuki.lan \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.com \
--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