mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #28759: Fix the tests that fail with PermissionError when run as
a non-root user on Android where access rights are controled by SELinux MAC.
This commit is contained in:
parent
fb24eead48
commit
3a4e989324
7 changed files with 22 additions and 3 deletions
|
@ -8,6 +8,7 @@ import sys
|
|||
import unittest
|
||||
import warnings
|
||||
from test import support
|
||||
android_not_root = support.android_not_root
|
||||
|
||||
|
||||
def create_file(filename, data=b'foo'):
|
||||
|
@ -212,6 +213,7 @@ class GenericTest:
|
|||
def test_samefile_on_symlink(self):
|
||||
self._test_samefile_on_link_func(os.symlink)
|
||||
|
||||
@unittest.skipIf(android_not_root, "hard links not allowed, non root user")
|
||||
def test_samefile_on_link(self):
|
||||
self._test_samefile_on_link_func(os.link)
|
||||
|
||||
|
@ -251,6 +253,7 @@ class GenericTest:
|
|||
def test_samestat_on_symlink(self):
|
||||
self._test_samestat_on_link_func(os.symlink)
|
||||
|
||||
@unittest.skipIf(android_not_root, "hard links not allowed, non root user")
|
||||
def test_samestat_on_link(self):
|
||||
self._test_samestat_on_link_func(os.link)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue