public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Samir M <samir@linux.ibm.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] hugeshmget: Use __func__ instead of hardcoded function
Date: Sun, 12 Apr 2026 19:46:23 +0530	[thread overview]
Message-ID: <5ea8ce47-4c93-42cf-b808-ff47faf50d70@linux.ibm.com> (raw)
In-Reply-To: <adYhNrtHEGBRO2xF@yuki.lan>


On 08/04/26 3:04 pm, Cyril Hrubis wrote:
> Hi!
>> Fixed in:
>> - hugeshmget02.c:83
>> - hugeshmget03.c:76
>> - hugeshmget05.c:75
>>
>> Changed from: tst_brk(TBROK | TERRNO, "shmget #setup");
>> Changed to:   tst_brk(TBROK | TERRNO, "shmget #%s", __func__);
> You should really use SAFE_SHMGET() in the setup() in the 02 and 05
> tests instead.
>
>> Signed-off-by: “Samir <samir@linux.ibm.com>
>> ---
>>   testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c | 2 +-
>>   testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c | 2 +-
>>   testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c | 2 +-
>>   3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
>> index bbd968c06..065aa05fc 100644
>> --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
>> +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c
>> @@ -80,7 +80,7 @@ void setup(void)
>>   	shm_id_1 = shmget(shmkey, shm_size,
>>   			  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
>>   	if (shm_id_1 == -1)
>> -		tst_brk(TBROK | TERRNO, "shmget #setup");
>> +		tst_brk(TBROK | TERRNO, "shmget #%s", __func__);
>>   }
>>   
>>   void cleanup(void)
>> diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
>> index 625761f6e..1f07d585a 100644
>> --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
>> +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c
>> @@ -73,7 +73,7 @@ static void setup(void)
>>   				  SHM_HUGETLB | IPC_CREAT | IPC_EXCL | SHM_RW);
>>   	}
>>   	if (errno != ENOSPC)
>> -		tst_brk(TBROK | TERRNO, "shmget #setup");
>> +		tst_brk(TBROK | TERRNO, "shmget #%s", __func__);
> And here you should probably just print tst_brk(TBROK | TERRNO, "shmget()");
>
> There is enough information printed by the tst_brk() to locate the
> failure, no need to add more.
>
>>   
>>   static void cleanup(void)
>> diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
>> index 336319603..a2bb9020d 100644
>> --- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
>> +++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c
>> @@ -72,7 +72,7 @@ void setup(void)
>>   	shm_id_1 = shmget(shmkey, shm_size,
>>   			  SHM_HUGETLB | SHM_RW | IPC_CREAT | IPC_EXCL);
>>   	if (shm_id_1 == -1)
>> -		tst_brk(TBROK | TERRNO, "shmget #setup");
>> +		tst_brk(TBROK | TERRNO, "shmget #%s", __func__);
>>   
>>   	/* get the userid for a non-root user */
>>   	ltp_uid = getuserid(ltp_user);
>> -- 
>> 2.52.0
>>
>>
>> -- 
>> Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Cyril,


I have incorporated the requested review comments and submitted the 
revised version (v2). Thank you for your valuable feedback.
Patch v2: 
https://lore.kernel.org/ltp/20260412141039.1075095-1-samir@linux.ibm.com/T/#u


Thanks,
Samir

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-04-12 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  5:49 [LTP] [PATCH] hugeshmget: Use __func__ instead of hardcoded function “Samir
2026-04-08  9:34 ` Cyril Hrubis
2026-04-12 14:16   ` Samir M [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=5ea8ce47-4c93-42cf-b808-ff47faf50d70@linux.ibm.com \
    --to=samir@linux.ibm.com \
    --cc=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