Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e2ca0f21
Commit
e2ca0f21
authored
Oct 19, 2016
by
Xavier de Gaye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #26944: Fix test_posix for Android where 'id -G' is entirely wrong
or missing the effective gid.
parent
241b245d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
Lib/test/test_posix.py
Lib/test/test_posix.py
+10
-7
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_posix.py
View file @
e2ca0f21
...
...
@@ -799,7 +799,11 @@ class PosixTester(unittest.TestCase):
groups
=
idg
.
read
().
strip
()
ret
=
idg
.
close
()
if
ret
is
not
None
or
not
groups
:
try
:
idg_groups
=
set
(
int
(
g
)
for
g
in
groups
.
split
())
except
ValueError
:
idg_groups
=
set
()
if
ret
is
not
None
or
not
idg_groups
:
raise
unittest
.
SkipTest
(
"need working 'id -G'"
)
# Issues 16698: OS X ABIs prior to 10.6 have limits on getgroups()
...
...
@@ -810,12 +814,11 @@ class PosixTester(unittest.TestCase):
raise
unittest
.
SkipTest
(
"getgroups(2) is broken prior to 10.6"
)
# 'id -G' and 'os.getgroups()' should return the same
# groups, ignoring order and duplicates.
# #10822 - it is implementation defined whether posix.getgroups()
# includes the effective gid so we include it anyway, since id -G does
self
.
assertEqual
(
set
([
int
(
x
)
for
x
in
groups
.
split
()]),
set
(
posix
.
getgroups
()
+
[
posix
.
getegid
()]))
# groups, ignoring order, duplicates, and the effective gid.
# #10822/#26944 - It is implementation defined whether
# posix.getgroups() includes the effective gid.
symdiff
=
idg_groups
.
symmetric_difference
(
posix
.
getgroups
())
self
.
assertTrue
(
not
symdiff
or
symdiff
==
{
posix
.
getegid
()})
# tests for the posix *at functions follow
...
...
Misc/NEWS
View file @
e2ca0f21
...
...
@@ -35,6 +35,9 @@ Build
Tests
-----
- Issue #26944: Fix test_posix for Android where '
id
-
G
' is entirely wrong or
missing the effective gid.
- Issue #28409: regrtest: fix the parser of command line arguments.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment