All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29
@ 2012-05-09  9:11 Jan Stancek
  2012-05-09  9:39 ` Zhouping Liu
  2012-05-09 10:31 ` Caspar Zhang
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Stancek @ 2012-05-09  9:11 UTC (permalink / raw)
  To: ltp-list; +Cc: Jeffrey Burke

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]


Following commit reworked do_pages_move() to work by page-sized
chunks and also removed E2BIG:

commit 3140a2273009c01c27d316f35ab76a37e105fdd8
Author: Brice Goglin <Brice.Goglin@inria.fr>
Date:   Tue Jan 6 14:38:57 2009 -0800
    mm: rework do_pages_move() to work on page_sized chunks

So, move_pages08 makes sense only for kernels < 2.6.29.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 .../kernel/syscalls/move_pages/move_pages08.c      |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)



[-- Attachment #2: 0001-move_pages08-E2BIG-was-removed-in-2.6.29.patch --]
[-- Type: text/x-patch, Size: 1181 bytes --]

diff --git a/testcases/kernel/syscalls/move_pages/move_pages08.c b/testcases/kernel/syscalls/move_pages/move_pages08.c
index a7ce6e4..f6f01d6 100644
--- a/testcases/kernel/syscalls/move_pages/move_pages08.c
+++ b/testcases/kernel/syscalls/move_pages/move_pages08.c
@@ -46,7 +46,7 @@
  *		Initial Version.
  *
  * Restrictions
- *	None
+ *	kernel < 2.6.29
  */
 
 #include <sys/mman.h>
@@ -96,6 +96,20 @@ int main(int argc, char **argv)
 		/* reset Tst_count in case we are looping */
 		Tst_count = 0;
 
+		/*
+		 * commit 3140a2273009c01c27d316f35ab76a37e105fdd8
+		 * Author: Brice Goglin <Brice.Goglin@inria.fr>
+		 * Date:   Tue Jan 6 14:38:57 2009 -0800
+		 *     mm: rework do_pages_move() to work on page_sized chunks
+		 *
+		 * reworked do_pages_move() to work by page-sized chunks and removed E2BIG
+		 */
+		if ((tst_kvercmp(2, 6, 29)) >= 0) {
+			tst_resm(TCONF, "move_pages: E2BIG was removed in "
+			    "commit 3140a2273009c01c27d316f35ab76a37e105fdd8");
+			break;
+		}
+
 		ret = alloc_pages_on_node(pages, TEST_PAGES, from_node);
 		if (ret == -1)
 			continue;
@@ -151,4 +165,4 @@ void cleanup(void)
 	 */
 	TEST_CLEANUP;
 
- }
\ No newline at end of file
+ }


[-- Attachment #3: Type: text/plain, Size: 395 bytes --]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29
  2012-05-09  9:11 [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29 Jan Stancek
@ 2012-05-09  9:39 ` Zhouping Liu
  2012-05-09 10:31 ` Caspar Zhang
  1 sibling, 0 replies; 4+ messages in thread
From: Zhouping Liu @ 2012-05-09  9:39 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke



----- Original Message -----
> From: "Jan Stancek" <jstancek@redhat.com>
> To: ltp-list@lists.sourceforge.net
> Cc: "Jeffrey Burke" <jburke@redhat.com>
> Sent: Wednesday, May 9, 2012 5:11:43 PM
> Subject: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29
> 
> 
> Following commit reworked do_pages_move() to work by page-sized
> chunks and also removed E2BIG:
> 
> commit 3140a2273009c01c27d316f35ab76a37e105fdd8
> Author: Brice Goglin <Brice.Goglin@inria.fr>
> Date:   Tue Jan 6 14:38:57 2009 -0800
>     mm: rework do_pages_move() to work on page_sized chunks
> 
> So, move_pages08 makes sense only for kernels < 2.6.29.

Looks good for me.

Acked-by: Zhouping Liu <zliu@redhat.com> 

-- 
Thanks,
Zhouping

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29
  2012-05-09  9:11 [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29 Jan Stancek
  2012-05-09  9:39 ` Zhouping Liu
@ 2012-05-09 10:31 ` Caspar Zhang
  2012-05-09 10:44   ` Jan Stancek
  1 sibling, 1 reply; 4+ messages in thread
From: Caspar Zhang @ 2012-05-09 10:31 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp-list, Jeffrey Burke

On 05/09/2012 05:11 PM, Jan Stancek wrote:
> Following commit reworked do_pages_move() to work by page-sized
> chunks and also removed E2BIG:
> 
> commit 3140a2273009c01c27d316f35ab76a37e105fdd8
> Author: Brice Goglin <Brice.Goglin@inria.fr>
> Date:   Tue Jan 6 14:38:57 2009 -0800
>     mm: rework do_pages_move() to work on page_sized chunks
> 
> So, move_pages08 makes sense only for kernels < 2.6.29.
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  .../kernel/syscalls/move_pages/move_pages08.c      |   18 ++++++++++++++++--
>  1 files changed, 16 insertions(+), 2 deletions(-)
> 
> 
> 
> 
> 0001-move_pages08-E2BIG-was-removed-in-2.6.29.patch
> 
> 
> diff --git a/testcases/kernel/syscalls/move_pages/move_pages08.c b/testcases/kernel/syscalls/move_pages/move_pages08.c
> index a7ce6e4..f6f01d6 100644
> --- a/testcases/kernel/syscalls/move_pages/move_pages08.c
> +++ b/testcases/kernel/syscalls/move_pages/move_pages08.c
> @@ -46,7 +46,7 @@
>   *		Initial Version.
>   *
>   * Restrictions
> - *	None
> + *	kernel < 2.6.29
>   */
>  
>  #include <sys/mman.h>
> @@ -96,6 +96,20 @@ int main(int argc, char **argv)
>  		/* reset Tst_count in case we are looping */
>  		Tst_count = 0;
>  
> +		/*
> +		 * commit 3140a2273009c01c27d316f35ab76a37e105fdd8
> +		 * Author: Brice Goglin <Brice.Goglin@inria.fr>
> +		 * Date:   Tue Jan 6 14:38:57 2009 -0800
> +		 *     mm: rework do_pages_move() to work on page_sized chunks
> +		 *
> +		 * reworked do_pages_move() to work by page-sized chunks and removed E2BIG
> +		 */
> +		if ((tst_kvercmp(2, 6, 29)) >= 0) {
> +			tst_resm(TCONF, "move_pages: E2BIG was removed in "
> +			    "commit 3140a2273009c01c27d316f35ab76a37e105fdd8");
> +			break;
> +		}
> +

Hi Jan,

I think it would be better to put it in setup() function (as we usually
do the kvercmp in setup phase), and just use tst_brkm(TCONF. How do you
think?

Thanks,
Caspar

>  		ret = alloc_pages_on_node(pages, TEST_PAGES, from_node);
>  		if (ret == -1)
>  			continue;
> @@ -151,4 +165,4 @@ void cleanup(void)
>  	 */
>  	TEST_CLEANUP;
>  
> - }
> \ No newline at end of file
> + }
> 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29
  2012-05-09 10:31 ` Caspar Zhang
@ 2012-05-09 10:44   ` Jan Stancek
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Stancek @ 2012-05-09 10:44 UTC (permalink / raw)
  To: Caspar Zhang; +Cc: ltp-list, Jeffrey Burke



----- Original Message -----
> From: "Caspar Zhang" <caspar@casparzhang.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp-list@lists.sourceforge.net, "Jeffrey Burke" <jburke@redhat.com>
> Sent: Wednesday, 9 May, 2012 12:31:30 PM
> Subject: Re: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29

> Hi Jan,
> 
> I think it would be better to put it in setup() function (as we
> usually
> do the kvercmp in setup phase), and just use tst_brkm(TCONF. How do
> you
> think?

Looking at random syscall tests I see it usually in main()
before setup(), but I'm OK with putting it to setup().
I'll send v2 for both.

Regards,
Jan

> 
> Thanks,
> Caspar

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2012-05-09 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09  9:11 [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29 Jan Stancek
2012-05-09  9:39 ` Zhouping Liu
2012-05-09 10:31 ` Caspar Zhang
2012-05-09 10:44   ` Jan Stancek

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.