public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Zhouping Liu <zliu@redhat.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH v5 3/3] mm/thp: add new case thp05
Date: Tue, 16 Apr 2013 12:42:29 +0200	[thread overview]
Message-ID: <20130416104228.GA17259@rei> (raw)
In-Reply-To: <a6942bb2d9d35f695b5067a7008620110c769222.1366107814.git.zliu@redhat.com>

Hi!
Here is the last nit (the rest of the code looks ok).

Applies for the next test as well.

> +void setup(void)
> +{
> +	char path[BUFSIZ];
> +
> +	tst_require_root(NULL);
> +
> +	if (access(PATH_THP, F_OK) == -1)
> +		tst_brkm(TCONF, NULL, "THP is not enabled");
> +
> +	if (!is_numa(NULL))
> +		tst_brkm(TCONF, NULL, "The case need a NUMA system.");
> +
> +	SAFE_FILE_SCANF(NULL, PATH_KHPD "scan_sleep_millisecs",
> +			"%d", &pre_thp_scan_sleep_millisecs);
> +	SAFE_FILE_PRINTF(NULL, PATH_KHPD "scan_sleep_millisecs", "%d", 0);
> +
> +	SAFE_FILE_SCANF(NULL, PATH_KHPD "alloc_sleep_millisecs",
> +			"%d", &pre_thp_alloc_sleep_millisecs);
> +	SAFE_FILE_PRINTF(NULL, PATH_KHPD "alloc_sleep_millisecs", "%d", 0);

No need to convert the constant integer via "%d", just pass the "0"
string.

> +	SAFE_FILE_SCANF(NULL, PATH_THP "enabled", "%[^\n]", pre_thp_enabled);
> +	SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "%s", "always");

No need to pass the "always" via "%s", just pass it directly.

> +
> +	tst_sig(FORK, DEF_HANDLER, NULL);
> +	TEST_PAUSE;
> +}



-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2013-04-16 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16 10:26 [LTP] [PATCH v5 0/3] mm/thp: add two new case Zhouping Liu
2013-04-16 10:26 ` [LTP] [PATCH v5 1/3] mm/thp: new case thp04.c Zhouping Liu
2013-04-16 10:26 ` [LTP] [PATCH v5 2/3] lib/mem: introduce a new function set_global_mempolicy() Zhouping Liu
2013-04-16 10:26 ` [LTP] [PATCH v5 3/3] mm/thp: add new case thp05 Zhouping Liu
2013-04-16 10:42   ` chrubis [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=20130416104228.GA17259@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=zliu@redhat.com \
    /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