-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-124213: Skip tests failing with --suppress-sync=true when inside systemd-nspawn container
#124215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-124213: Skip tests failing with --suppress-sync=true when inside systemd-nspawn container
#124215
Changes from all commits
dac1143
c4dbdeb
e580bb5
ce85e75
e016a82
68802f8
ed0fc42
222fcc0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,6 @@ | ||||||||||||||
| from test.support import ( | ||||||||||||||
| requires, _2G, _4G, gc_collect, cpython_only, is_emscripten, is_apple, | ||||||||||||||
| in_systemd_nspawn_sync_suppressed, | ||||||||||||||
| ) | ||||||||||||||
| from test.support.import_helper import import_module | ||||||||||||||
| from test.support.os_helper import TESTFN, unlink | ||||||||||||||
|
|
@@ -839,7 +840,8 @@ def test_flush_return_value(self): | |||||||||||||
| mm.write(b'python') | ||||||||||||||
| result = mm.flush() | ||||||||||||||
| self.assertIsNone(result) | ||||||||||||||
| if sys.platform.startswith(('linux', 'android')): | ||||||||||||||
| if (sys.platform.startswith(('linux', 'android')) | ||||||||||||||
| and not in_systemd_nspawn_sync_suppressed()): | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be honest, I wanted to avoid this because it's very confusing when the condition has the same indent as the code below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah but the line was too long. That's the problem of long function names.
Comment on lines
+843
to
+844
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we could follow black here:
Suggested change
|
||||||||||||||
| # 'offset' must be a multiple of mmap.PAGESIZE on Linux. | ||||||||||||||
| # See bpo-34754 for details. | ||||||||||||||
| self.assertRaises(OSError, mm.flush, 1, len(b'python')) | ||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Detect whether the test suite is running inside a systemd-nspawn container | ||
| with ``--suppress-sync=true`` option, and skip the ``test_os`` | ||
| and ``test_mmap`` tests that are failing in this scenario. |
Uh oh!
There was an error while loading. Please reload this page.