All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] max_map_count: tst_fork() instead of fork()
@ 2015-04-15  9:27 Stanislav Kholmanskikh
  2015-04-15 13:13 ` Jan Stancek
  0 siblings, 1 reply; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2015-04-15  9:27 UTC (permalink / raw)
  To: ltp-list; +Cc: vasily.isaenko

In order to put output messages in order and remove "duplicates",
we need a fflush() before forking and tst_fork() does it.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
---
 testcases/kernel/mem/tunable/max_map_count.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/testcases/kernel/mem/tunable/max_map_count.c b/testcases/kernel/mem/tunable/max_map_count.c
index 96ec2b8..2c0599e 100644
--- a/testcases/kernel/mem/tunable/max_map_count.c
+++ b/testcases/kernel/mem/tunable/max_map_count.c
@@ -200,7 +200,7 @@ static void max_map_count_test(void)
 	while (max_maps <= max_iters) {
 		set_sys_tune("max_map_count", max_maps, 1);
 
-		switch (pid = fork()) {
+		switch (pid = tst_fork()) {
 		case -1:
 			tst_brkm(TBROK | TERRNO, cleanup, "fork");
 		case 0:
-- 
1.7.1


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] max_map_count: tst_fork() instead of fork()
  2015-04-15  9:27 [LTP] [PATCH] max_map_count: tst_fork() instead of fork() Stanislav Kholmanskikh
@ 2015-04-15 13:13 ` Jan Stancek
  2015-04-15 13:39   ` Stanislav Kholmanskikh
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Stancek @ 2015-04-15 13:13 UTC (permalink / raw)
  To: Stanislav Kholmanskikh; +Cc: vasily isaenko, ltp-list





----- Original Message -----
> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com>
> To: ltp-list@lists.sourceforge.net
> Cc: "vasily isaenko" <vasily.isaenko@oracle.com>
> Sent: Wednesday, 15 April, 2015 11:27:09 AM
> Subject: [LTP] [PATCH] max_map_count: tst_fork() instead of fork()
> 
> In order to put output messages in order and remove "duplicates",
> we need a fflush() before forking and tst_fork() does it.
> 
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>

Should be safe even this to release.

Reviewed-by: Jan Stancek <jstancek@redhat.com>

Regards,
Jan

> ---
>  testcases/kernel/mem/tunable/max_map_count.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/testcases/kernel/mem/tunable/max_map_count.c
> b/testcases/kernel/mem/tunable/max_map_count.c
> index 96ec2b8..2c0599e 100644
> --- a/testcases/kernel/mem/tunable/max_map_count.c
> +++ b/testcases/kernel/mem/tunable/max_map_count.c
> @@ -200,7 +200,7 @@ static void max_map_count_test(void)
>  	while (max_maps <= max_iters) {
>  		set_sys_tune("max_map_count", max_maps, 1);
>  
> -		switch (pid = fork()) {
> +		switch (pid = tst_fork()) {
>  		case -1:
>  			tst_brkm(TBROK | TERRNO, cleanup, "fork");
>  		case 0:
> --
> 1.7.1
> 
> 
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] max_map_count: tst_fork() instead of fork()
  2015-04-15 13:13 ` Jan Stancek
@ 2015-04-15 13:39   ` Stanislav Kholmanskikh
  0 siblings, 0 replies; 3+ messages in thread
From: Stanislav Kholmanskikh @ 2015-04-15 13:39 UTC (permalink / raw)
  To: Jan Stancek; +Cc: vasily isaenko, ltp-list



On 04/15/2015 04:13 PM, Jan Stancek wrote:
>
>
>
>
> ----- Original Message -----
>> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com>
>> To: ltp-list@lists.sourceforge.net
>> Cc: "vasily isaenko" <vasily.isaenko@oracle.com>
>> Sent: Wednesday, 15 April, 2015 11:27:09 AM
>> Subject: [LTP] [PATCH] max_map_count: tst_fork() instead of fork()
>>
>> In order to put output messages in order and remove "duplicates",
>> we need a fflush() before forking and tst_fork() does it.
>>
>> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
>
> Should be safe even this to release.
>
> Reviewed-by: Jan Stancek <jstancek@redhat.com>

Thank you. Pushed.

>
> Regards,
> Jan
>
>> ---
>>   testcases/kernel/mem/tunable/max_map_count.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/testcases/kernel/mem/tunable/max_map_count.c
>> b/testcases/kernel/mem/tunable/max_map_count.c
>> index 96ec2b8..2c0599e 100644
>> --- a/testcases/kernel/mem/tunable/max_map_count.c
>> +++ b/testcases/kernel/mem/tunable/max_map_count.c
>> @@ -200,7 +200,7 @@ static void max_map_count_test(void)
>>   	while (max_maps <= max_iters) {
>>   		set_sys_tune("max_map_count", max_maps, 1);
>>
>> -		switch (pid = fork()) {
>> +		switch (pid = tst_fork()) {
>>   		case -1:
>>   			tst_brkm(TBROK | TERRNO, cleanup, "fork");
>>   		case 0:
>> --
>> 1.7.1
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> Ltp-list mailing list
>> Ltp-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ltp-list
>>

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-15 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  9:27 [LTP] [PATCH] max_map_count: tst_fork() instead of fork() Stanislav Kholmanskikh
2015-04-15 13:13 ` Jan Stancek
2015-04-15 13:39   ` Stanislav Kholmanskikh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.