Skip to contentSkip to conversation

move_pages08: E2BIG was removed in 2.6.29

PATCH Superseded Jan Stancek 3 participants 4 messages May 9, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
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.

---
 .../kernel/syscalls/move_pages/move_pages08.c      |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/move_pages/move_pages08.c +16 -2
index a7ce6e4..f6f01d6 100644
@@ -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 <[email protected]>
+		 * 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
+ }

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Acked-by on v1 1/1
#1 lore raw

----- Original Message -----

Quoted 10 lines

From: "Jan Stancek" <[email protected]>
To: [email protected]
Cc: "Jeffrey Burke" <[email protected]>
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:

Quoted 6 lines

commit 3140a2273009c01c27d316f35ab76a37e105fdd8

Author: Brice Goglin <[email protected]>
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.

Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw
In reply to Jan Stancek
Quoted 42 lines · Jan Stancek

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

commit 3140a2273009c01c27d316f35ab76a37e105fdd8

Author: Brice Goglin <[email protected]>
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.

---
 .../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

testcases/kernel/syscalls/move_pages/move_pages08.c +5 -1
index a7ce6e4..f6f01d6 100644
@@ -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 <[email protected]>
+		 * Date:   Tue Jan 6 14:38:57 2009 -0800

testcases/kernel/syscalls/move_pages/move_pages08.c int main(int argc, char **argv) · line 112

Quoted 10 lines
testcases/kernel/syscalls/move_pages/move_pages08.c +10 -0
+		 *     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

testcases/kernel/syscalls/move_pages/move_pages08.c void cleanup(void) · line 168

Quoted 11 lines
testcases/kernel/syscalls/move_pages/move_pages08.c +1 -1
 		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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw

----- Original Message -----

Quoted 6 lines

From: "Caspar Zhang" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected], "Jeffrey Burke" <[email protected]>
Sent: Wednesday, 9 May, 2012 12:31:30 PM
Subject: Re: [LTP] [PATCH] move_pages08: E2BIG was removed in 2.6.29

Quoted 7 lines

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

Quoted 3 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list