aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_nsjail.py (follow)
Commit message (Collapse)AuthorAgeLines
* Update test_forkbomb_resource_unavailable to disable memory limitsHEADmainGravatar Joe Banks5 days-5/+13
| | | | | | | This was still producing unpredictable behaviour in CI (sometimes being killed and exiting with 137/OOM kill). Disabling the memory limit ensures that the only reason this test case will kill the executing code is because of PID exhaustion.
* Reduce PID limits for test_forkbomb_resource_unavailableGravatar Joe Banks9 days-4/+14
| | | | | | | | This test case was being caught and nsjail was killing it, but not because of PID exhaustion but memory exhaustion. To ensure PID exhaustion is guarded against the PID count is now reduced to a level where nsjail will kill the process earlier before the memory limit.
* Update nsjail tests to try avoid multiprocessing exceptionGravatar Joe Banks10 days-10/+11
|
* Close & unlick SharedMemory object in testsGravatar Chris Lovering2025-07-30-0/+2
| | | | Not doing so outputs a warning about leaking SharedMemory, which fails the test
* Reuse the default executable path const in testsGravatar Chris Lovering2024-10-05-4/+2
|
* Update all references to /lang to /snekbinGravatar Chris Lovering2024-10-03-2/+2
|
* Allow setting a binary_path when calling /evalGravatar Chris Lovering2024-10-03-1/+3
|
* Raise error if attachment pathname contains invalid bytes (#209)Gravatar Esther Goldberg2024-04-09-0/+14
|
* Refactor modules into subpackagesGravatar Mark2023-10-27-2/+2
|
* Use lower timeout for file parsing timeout testGravatar Mark2023-09-16-2/+2
| | | | | | | Updating to Bookworm may have increased performance of the file processing. In any case, this test started failing intermittently on when running on a local machine. Lower the timeout so even fast machines will hit the timeout.
* Merge branch 'main' into jb3/shared-memGravatar wookie1842023-08-30-4/+59
|\
| * Merge pull request #181 from python-discord/feat/158/multi-versionGravatar ChrisJL2023-08-29-2/+2
| |\ | | | | | | Install Multiple Python Versions in the Image
| | * Install multiple Python versions in imageGravatar Mark2023-08-19-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Separate snekbox's Python interpreter from the interpreter used by NsJail. This allows for the interpreters to be updated on different cadences and provides better isolation of packages. Each Python interpreter adds about 70 MB to the built image.
| * | Limit total file size read from tmpfs to avoid high memory usageGravatar wookie1842023-08-29-2/+57
| |/
* / Update tests to account for shared memoryGravatar Joe Banks2023-08-28-17/+64
|/
* Add unit test for deeply nested path file parsingGravatar Ionite2023-03-11-0/+23
| | | | Using example for reproducing issue #172
* Add unit test for hidden paths exclusionGravatar Ionite2023-03-09-0/+19
|
* Add new -B flag to unit testsGravatar Ionite2023-03-08-1/+1
|
* Update file write error unit testGravatar Ionite2023-03-02-3/+9
|
* Update unit tests for home output directoryGravatar Ionite2023-03-02-3/+3
|
* Add refactors for Size enum renameGravatar ionite342022-12-04-2/+2
|
* Change Size to IntEnum, change usage in testsGravatar ionite342022-11-28-2/+3
|
* Refactor FileAttachment as non genericGravatar ionite342022-11-28-4/+4
|
* Switch null byte test to use eval_codeGravatar ionite342022-11-28-3/+2
|
* Add additional tests for py_argsGravatar ionite342022-11-28-9/+14
|
* Add request file IO error handlingGravatar ionite342022-11-24-0/+8
|
* Refactor output files in `output` dirGravatar ionite342022-11-24-3/+3
|
* Fixed leading empty filter for py_argsGravatar ionite342022-11-22-5/+12
|
* Refactor file parse timeoutGravatar ionite342022-11-22-6/+28
|
* Clarify resource unit testGravatar ionite342022-11-21-3/+3
|
* Refactor config patches in testsGravatar ionite342022-11-21-28/+3
|
* Add root back to unit testGravatar ionite342022-11-21-1/+1
|
* Combined file handling to FileAttachment classGravatar Ionite2022-11-20-4/+4
|
* Add unit test for multiple python filesGravatar ionite342022-11-19-0/+11
|
* Implement files request formGravatar ionite342022-11-19-25/+35
|
* Remove /dev/shm mountsGravatar ionite342022-11-19-17/+4
|
* Refactored tests to use new kwargsGravatar Ionite2022-11-17-13/+15
|
* Added additional unit testsGravatar Ionite2022-11-16-7/+65
|
* Fixed unit testsGravatar Ionite2022-11-16-6/+23
|
* Use more common binary for testing v1 cgroupsGravatar Mark2022-07-09-3/+3
|
* Test v1 cgroups are created as neededGravatar Mark2022-07-04-0/+68
|
* Use new NsJail instance for each test in NsJailArgsTestsGravatar Mark2022-06-07-12/+11
|
* Test NsJail args are set and used when passed to __init__Gravatar Mark2022-06-06-0/+37
|
* Add config path & output size args to NsJail classGravatar Mark2022-06-04-3/+3
|
* Add black and isortGravatar MarkKoz2022-06-03-39/+51
|
* Fix NsJail args testGravatar MarkKoz2021-12-21-1/+2
| | | | | Dynamically calculate the position of the arguments rather than hard-coding them.
* test: add test_multiprocess_resource_limits to test memory limit sharingGravatar Joe Banks2021-07-17-0/+28
| | | | This test ensures that spawned child processes inherit the same resource group as the parent by spawning 2 child processes which each allocate a 40MB object, it then verifies that one of the child processes was killed with SIGKILL for violating the resource quota.
* test: update pid limit tests to account for new increased limitGravatar Joe Banks2021-07-17-1/+10
|
* chore: Add tests for py_args and ns_jail argsGravatar ToxicKidz2021-05-18-0/+13
|
* Match new unicode eval tests and output to the format and functions of othersGravatar Bast2021-04-08-12/+8
|