zdtm.py: exclude a vsyscall vma for x32 tests

Submitted by Andrey Vagin on June 17, 2018, 3:25 a.m.

Details

Message ID 20180617032503.5657-1-avagin@virtuozzo.com
State Accepted
Series "zdtm.py: exclude a vsyscall vma for x32 tests"
Commit 8a5321d99c7ef5f65bd1357f9c650f2988315bcc
Headers show

Commit Message

Andrey Vagin June 17, 2018, 3:25 a.m.
We alwasy exclude vsyscall vma-s for x32 tests, but
this part was broken by python3 patches.

1: Old maps lost: set([])
1: New maps appeared: set([u"ffffffffff600000-ffffffffff601000 [u'r-xp']"])

Reported-by: Mr Jenkins
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 test/zdtm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/test/zdtm.py b/test/zdtm.py
index e60a93662..2e093e597 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1322,7 +1322,7 @@  def get_visible_state(test):
 				cmaps.append(m)
 				last += 1
 
-		maps[pid] = set(map(lambda x: '%x-%x %s' % (x[0], x[1], x[2:]), cmaps))
+		maps[pid] = set(map(lambda x: '%x-%x %s' % (x[0], x[1], " ".join(x[2:])), cmaps))
 
 		cmounts = []
 		try:
@@ -1351,7 +1351,7 @@  def check_visible_state(test, state, opts):
 		new_maps = new[1][pid]
 		if os.getenv("COMPAT_TEST"):
 			# the vsyscall vma isn't unmapped from x32 processes
-			vsyscall = "ffffffffff600000-ffffffffff601000 ['r-xp']"
+			vsyscall = u"ffffffffff600000-ffffffffff601000 r-xp"
 			if vsyscall in new_maps and vsyscall not in old_maps:
 				new_maps.remove(vsyscall)
 		if old_maps != new_maps:

Comments

Andrey Vagin June 18, 2018, 5:11 p.m.
Applied

On Sun, Jun 17, 2018 at 06:25:03AM +0300, Andrei Vagin wrote:
> We alwasy exclude vsyscall vma-s for x32 tests, but
> this part was broken by python3 patches.
> 
> 1: Old maps lost: set([])
> 1: New maps appeared: set([u"ffffffffff600000-ffffffffff601000 [u'r-xp']"])
> 
> Reported-by: Mr Jenkins
> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
> ---
>  test/zdtm.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/zdtm.py b/test/zdtm.py
> index e60a93662..2e093e597 100755
> --- a/test/zdtm.py
> +++ b/test/zdtm.py
> @@ -1322,7 +1322,7 @@ def get_visible_state(test):
>  				cmaps.append(m)
>  				last += 1
>  
> -		maps[pid] = set(map(lambda x: '%x-%x %s' % (x[0], x[1], x[2:]), cmaps))
> +		maps[pid] = set(map(lambda x: '%x-%x %s' % (x[0], x[1], " ".join(x[2:])), cmaps))
>  
>  		cmounts = []
>  		try:
> @@ -1351,7 +1351,7 @@ def check_visible_state(test, state, opts):
>  		new_maps = new[1][pid]
>  		if os.getenv("COMPAT_TEST"):
>  			# the vsyscall vma isn't unmapped from x32 processes
> -			vsyscall = "ffffffffff600000-ffffffffff601000 ['r-xp']"
> +			vsyscall = u"ffffffffff600000-ffffffffff601000 r-xp"
>  			if vsyscall in new_maps and vsyscall not in old_maps:
>  				new_maps.remove(vsyscall)
>  		if old_maps != new_maps:
> -- 
> 2.14.3
>