[issue26944] android: test_posix fails

Xavier de Gaye report at bugs.python.org
Mon Jul 25 10:01:10 EDT 2016


Xavier de Gaye added the comment:

> Hum, does the id program supports -G on Android?

It does on Android 6.0 but prints the same result as 'id' (without -G) on previous Android versions.

Here is the output of the commands involved in the test for the root user on my archlinux box, the Android 5.0 emulator and the Android 6.0 emulator:

archlinux:
  [root at bilboquet default]# python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [0, 1, 2, 3, 4, 6, 10, 19]
  >>> getegid()
  0
  [root at bilboquet default]# id -G
  0 1 2 3 4 6 10 19

Android 5.0 (API level 21)
  root at generic_x86:/data/data/org.bitbucket.pyona # python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [1003, 1004, 1007, 1011, 1015, 1028, 3001, 3002, 3003, 3006]
  >>> getegid()
  0
  root at generic_x86:/data/data/org.bitbucket.pyona # id -G
  uid=0(root) gid=0(root) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)

Android 6.0 (API level 23)
  root at generic_x86:/data/data/org.bitbucket.pyona # python
  ...
  >>> from posix import getegid, getgroups
  >>> getgroups()
  [1004, 1007, 1011, 1015, 1028, 3001, 3002, 3003, 3006]
  >>> getegid()
  0
  root at generic_x86:/data/data/org.bitbucket.pyona # id -G
  1004 1007 1011 1015 1028 3001 3002 3003 3006

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26944>
_______________________________________


More information about the Python-bugs-list mailing list