public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Shuang Qiu <shuang.qiu@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2] Clean up hugemmap02 testcase
Date: Wed, 17 Feb 2016 16:20:50 +0800	[thread overview]
Message-ID: <56C42D62.7050303@oracle.com> (raw)
In-Reply-To: <20160210123124.GB10106@rei.lan>

On 02/10/2016 08:31 PM, Cyril Hrubis wrote:
> Hi!
>>   #if __WORDSIZE == 64		/* 64-bit process */
>> -		if (addr2 == MAP_FAILED) {
>> +		if (addr2 == MAP_FAILED)
>>   			tst_resm(TFAIL | TERRNO, "huge mmap failed unexpectedly"
>>   				 " with %s (64-bit)", TEMPFILE);
>> -			close(fildes);
>> -			continue;
>> -		} else {
>> +		else {
>>   			tst_resm(TPASS, "huge mmap succeeded (64-bit)");
>>   		}
>>   #else /* 32-bit process */
>>   		if (addr2 == MAP_FAILED)
>>   			tst_resm(TFAIL | TERRNO, "huge mmap failed unexpectedly"
>>   				 " with %s (32-bit)", TEMPFILE);
>> -		else if (addr2 > 0) {
>> +		else if (addr2 > 0)
>>   			tst_resm(TCONF,
>>   				 "huge mmap failed to test the scenario");
>> -			close(fildes);
>> -			continue;
>> -		} else if (addr == 0)
>> +		else if (addr == 0)
>>   			tst_resm(TPASS, "huge mmap succeeded (32-bit)");
> The LKML coding style says that we should add curly braces to both else
> branches if they are around one of them. Or if the function call after
> if spans across more lines. So please do not remove them.
Thanks for review and correct me it.
Will send a new one.

Thanks
Shuang
>
> Otherwise the change looks good.
>


      reply	other threads:[~2016-02-17  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13  4:32 [LTP] [PATCH v2] Clean up hugemmap02 testcase shuang.qiu
2016-02-10 12:31 ` Cyril Hrubis
2016-02-17  8:20   ` Shuang Qiu [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=56C42D62.7050303@oracle.com \
    --to=shuang.qiu@oracle.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