summaryrefslogtreecommitdiffhomepage
path: root/test (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-05-28Tests: Added rootfs tests.Tiago Natel de Moura12-35/+543
2020-03-09Refactor of process management.Tiago Natel de Moura1-0/+1
The process abstraction has changed to: setup(task, process) start(task, process_data) prefork(task, process, mp) The prefork() occurs in the main process right before fork. The file src/nxt_main_process.c is completely free of process specific logic. The creation of a process now supports a PROCESS_CREATED state. The The setup() function of each process can set its state to either created or ready. If created, a MSG_PROCESS_CREATED is sent to main process, where external setup can be done (required for rootfs under container). The core processes (discovery, controller and router) doesn't need external setup, then they all proceeds to their start() function straight away. In the case of applications, the load of the module happens at the process setup() time and The module's init() function has changed to be the start() of the process. The module API has changed to: setup(task, process, conf) start(task, data) As a direct benefit of the PROCESS_CREATED message, the clone(2) of processes using pid namespaces now doesn't need to create a pipe to make the child block until parent setup uid/gid mappings nor it needs to receive the child pid.
2020-05-20Tests: print unit.log in case of errors.Andrei Zeliankou1-1/+2
Thanks to hongzhidao.
2020-05-15Tests: added tests for "targets" option.Andrei Zeliankou4-0/+141
2020-05-15Tests: added test for encoding in the "pass" option.Andrei Zeliankou1-0/+55
2020-05-15Tests: style.Andrei Zeliankou34-43/+60
2020-05-15Tests: test_proxy_invalid simplified.Andrei Zeliankou1-79/+20
2020-05-14Tests: decode uri and args.Axel Duch1-35/+158
2020-05-14Configuration: URI encoding in the "pass" option.Valentin Bartenev1-1/+4
This is useful to escape "/" in path fragments. For example, in order to reference the application named "foo/bar": { "pass": "applications/foo%2Fbar" }
2020-05-12Tests: added respawn tests.Andrei Zeliankou1-0/+95
2020-04-24Tests: introduced module version specification in prerequisites.Andrei Zeliankou25-26/+38
2020-04-20Tests: skips adjusted.Andrei Zeliankou2-9/+21
2020-04-14Tests: added test with rescheduling requests.Andrei Zeliankou1-0/+32
2020-04-14Tests: minor fixes and style.Andrei Zeliankou16-175/+99
2020-04-08Controller: improved handling of unix domain control socket.Valentin Bartenev1-4/+1
One of the ways to detect Unit's startup and subsequent readiness to accept commands relies on waiting for the control socket file to be created. Earlier, it was unreliable due to a race condition between the client's connect() and the daemon's listen() calls after the socket's bind() call. Now, unix domain listening sockets are created with a nxt_listen_socket_create() call as follows: s = socket(); unlink("path/to/socket.tmp") bind(s, "path/to/socket.tmp"); listen(s); rename("path/to/socket.tmp", "path/to/socket"); This eliminates a time-lapse when the socket file is already created but nobody is listening on it yet, which therefore prevents the condition described above. Also, it allows reliably detecting whether the socket is being used or simply wasn't cleaned after the daemon stopped abruptly. A successful connection to the socket file means the daemon has been started; otherwise, the file can be overwritten.
2020-04-03Tests: use "return" action in upstream tests.Andrei Zeliankou5-98/+101
2020-04-03Tests: added notification on "read_timeout" expiration.Andrei Zeliankou2-4/+30
2020-04-03Tests: minor fixes.Andrei Zeliankou3-9/+20
2020-03-30Tests: added tests for rational numbers in upstream server weight.Andrei Zeliankou2-12/+98
2020-03-30Fixing application process infinite loop.Max Romanov2-2/+1
Main process exiting before app process init may have caused hanging.
2020-03-30Handling change file message in libunit.Max Romanov2-2/+1
This is required for proper log file rotation action.
2020-03-27Tests: added tests for "location" option.Andrei Zeliankou1-0/+94
2020-03-27Tests: added tests for "return" action.Andrei Zeliankou4-270/+191
2020-03-27Tests: increase default "read_timeout" to 60s in message_read().Andrei Zeliankou1-1/+1
2020-03-25Tests: added tests for comments in JSON.Andrei Zeliankou1-0/+61
2020-03-25Tests: UTF-8 BOM test.Andrei Zeliankou1-0/+19
2020-03-23Tests: increase default "read_timeout" value to 60s.Andrei Zeliankou2-15/+16
This change is necessary to avoid errors on slow hosts. Also slightly reworked argument passing to the recvall() function.
2020-03-23Tests: added notification on unsuccessful connect().Andrei Zeliankou1-1/+1
2020-03-23Tests: wait for unit.pid file before running tests.Andrei Zeliankou1-1/+4
Waiting for control.unit.sock was replaced by unit.pid due to current problem with race between connect() and listen() calls for control.unit.sock. This change should be reverted after fix.
2020-03-23Tests: rearranging functions in main.py.Andrei Zeliankou1-69/+69
2020-03-23Tests: terminate unitd process on exit().Andrei Zeliankou1-12/+14
2020-03-19Tests: test_python_procman.py refactored.Andrei Zeliankou1-115/+58
2020-03-19Tests: fixed prerequisite in test_share_fallback.py.Andrei Zeliankou1-3/+3
2020-03-17Fixing body fd access racing condition.Max Romanov1-2/+0
To avoid closing the body fd prematurely, the fd value is moved from the request struct to the app link. The body fd should not be closed immediately after the request is sent to the application due to possible request rescheduling.
2020-03-12Tests: skip "close failed" alert in test_proxy_parallel test.Andrei Zeliankou1-0/+2
2020-03-12Using disk file to store large request body.Max Romanov1-0/+1
This closes #386 on GitHub.
2020-03-12Tests: added Python input readline and iterator tests.Max Romanov5-6/+125
2020-03-12Tests: fixed race in USR1 signal tests.Andrei Zeliankou1-19/+22
Also, minor style fixes applied.
2020-03-12Tests: round robin upstream tests.Andrei Zeliankou4-0/+489
2020-03-12Tests: skip "last message send failed" alerts globally.Andrei Zeliankou1-0/+1
2020-01-31Tests: more routing tests with negative rules.Andrei Zeliankou1-0/+57
2020-03-10Tests: use blocking to print unit.log files.Andrei Zeliankou1-1/+1
2020-03-10Tests: redirect tests output to the stdout.Andrei Zeliankou6-13/+20
2020-03-06Tests: unitd stderr output redirected to unit.log.Valentin Bartenev1-13/+13
A part of the debug log was printed to stderr before the log file was opened. Now, this output is redirected to the same log file.
2020-03-06Tests: simplified unitd process running.Valentin Bartenev1-42/+26
There are no reasons to wrap the Unit daemon in a separate Python process.
2020-03-03Tests: chdir() and open() for PHP module.Tiago Natel de Moura6-6/+161
These tests ensure optimizations in the chdir calls don't break SAPI semantics.
2020-03-03Tests: added tests for "fallback" option for the "share" action.Andrei Zeliankou1-0/+212
2020-03-03Tests: check unique options in "action" object.Andrei Zeliankou1-0/+50
2020-03-03Improved validation of the "action" object.Valentin Bartenev1-2/+0
Now it enforces the mutual exclusivity of "pass", "proxy", and "share" options.
2020-03-02Tests: truncated huge messages while logging.Andrei Zeliankou1-12/+33