summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* remove getpgrp back to setsidlcg/no-getpgrpLamont Granquist2015-05-151-6/+6
|
* Merge pull request #78 from BackSlasher/add-loginLamont Granquist2015-05-141-1/+83
|\ | | | | with_logon now simulates login in unix
| * Added TODO for next majorNitz2015-02-151-0/+3
| |
| * Option "login" now simulates login in unixNitz2015-02-151-1/+80
| | | | | | | | | | | | | | | | | | Added: * Secondary groups from etc files * Set environment variables like `su` would * Set primary group to user's primary group if no other group specified All only if `login` is set
* | Change mixlib spec test to pass on windows by invoking powershell explicitly.ksubrama/test_fixKartik Null Cating-Subramanian2015-04-211-1/+1
| |
* | Add some test coverage for timeouts on windowsJay Mundrawala2014-12-181-99/+115
| |
* | The process no longer inherit LC_ALL from the parent. Update spec to ↵Jay Mundrawala2014-12-171-8/+3
|/ | | | | | | | | refelect that. This fixes a spec that was broken on Windows by 767ea4fc19cb29a55a81a55d1a13643ae3108f4c from PR https://github.com/opscode/mixlib-shellout/pull/58 It seems the Unix spec was updated to reflect this change, but the Windows was not
* Merge pull request #57 from ClogenyTechnologies/kd/processgrp-fixlamont-granquist2014-09-111-11/+14
|\ | | | | aix getpgid fails when called from parent and parent and child have different session
| * removed emulated Errno::ESRCHkaustubh-d2014-09-101-10/+11
| |
| * raise Errno::ESRCH in spec for aixkaustubh-d2014-08-271-1/+1
| |
| * fix getpgid issue on aixkaustubh-d2014-08-271-2/+4
| |
* | control ENV['LC_ALL'] global betterLamont Granquist2014-09-031-10/+9
| | | | | | | | fixes travis failure that did not fail on my desktop
* | remove LC_ALL default environment variableLamont Granquist2014-08-281-13/+8
| | | | | | | | now that we no longer support ruby 1.8.7 its time to retire this
* | aix does not allow resetting real uid once the euid is changed to non-root.kaustubh-d2014-08-273-0/+27
| |
* | remove #clean_parent_file_descriptors which is not required now.kaustubh-d2014-08-251-14/+0
|/
* Simplify live_stream vs live_stdout vs live_stderr based on PR commentsMax Lincoln2014-07-171-22/+34
|
* Support separate live stream for stderrMax Lincoln2014-07-171-4/+78
|
* Correct spelling in spec filesTyler Cipriani2014-05-161-5/+5
|
* Merge pull request #26 from akshaykarle/masterSerdar Sutay2014-05-131-2/+7
|\ | | | | [#MIXLIB-19] Copy stderr to live_stream along with stdout of the subprocess
| * Fix a broken specAkshay Karle2014-01-061-4/+3
| |
| * Add a spec for showing stderr to live_stream.Akshay Karle2014-01-061-0/+6
| |
* | marking some unix_only tests unix_onlyLamont Granquist2014-04-081-2/+2
| |
* | [MIXLIB-6] Add comment describing why the test was changed, per Dan DeLeo.Julian C. Dunn2014-04-011-0/+2
| |
* | [MIXLIB-6] Use conditional to determine whether to use /tmp or /bin as a cwd ↵Julian C. Dunn2014-04-011-1/+1
| | | | | | | | for the test.
* | [MIXLIB-6] Fix test due to /bin being a symlink on Fedora. Use /tmp insteadJulian C. Dunn2014-04-011-1/+1
| |
* | Exclude ESRCH test from windowsdanielsdeleo2014-03-311-1/+1
| |
* | Handle ESRCH when getting pgid of a zombie on OS Xdanielsdeleo2014-03-311-0/+19
| |
* | Add debugging to volatile specsdanielsdeleo2014-03-071-7/+25
| | | | | | | | | | | | Attempting to reproduce this in isolation hasn't worked. Add debug information permanently so we may get a hint of why this test sometimes fails if we see it again.
* | Adds error? method to check whether the process exited successfully. This ↵Chris Armstrong2014-01-211-0/+18
| | | | | | | | allows the user to use custom error-handling logic. error! now uses error? internally.
* | Always send KILL to process groupdanielsdeleo2013-12-091-2/+4
| | | | | | | | | | | | | | | | | | There is not a good way to reliably detect whether all grandchildren have exited after sending a TERM to the process group; if the child has correctly exited, grandchildren (which may be unresponsive) will have been adopted by init (ppid == 1) so the parent cannot wait() on them. To ensure no stuck grandchildren are left, send a KILL to the process group after allowing the processes time to clean up.
* | Run commands with unique pgid to improve timeout cleanupdanielsdeleo2013-12-091-1/+52
| | | | | | | | | | | | | | To ensure that all child processes are properly signaled to exit before forcibly killing them, use `setsid()` in the child process to give the child (and any grandchildren it might create) a new and unique process group. If the command times out, kill and reap the entire process group.
* | Run timeout tests without a subshelldanielsdeleo2013-12-061-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | /bin/sh on Ubuntu is dash, which does not support bash's behavior of using exec to run a command (instead of fork) when possible. This means that, when given a single string command, instead of an array of command plus arguments, the process created by fork/exec is dash, and the ruby program is a child process of dash. When shellout signals the child to exit after a timeout, it will signal dash instead of the ruby program. To avoid this issue, the command needs to be given as an Array to avoid creating a subshell.
* | Add termination info to error messagesdanielsdeleo2013-11-041-1/+1
| | | | | | | | | | If no logger is configured, we still want to inform the user that the process was killed (and how).
* | Add logging about timed-out cmd termination when possibledanielsdeleo2013-11-041-0/+19
| | | | | | | | | | If a logger is configured, send `error` level messages about child process termination for timeout violations.
* | Cleanup control flow in main loopdanielsdeleo2013-11-011-6/+10
| | | | | | | | | | removes some complexity that was introduced with the fix to kill timed-out child processes
* | Force subprocess to exit after timeoutdanielsdeleo2013-11-011-2/+30
| | | | | | | | | | | | | | | | Fixes MIXLIB-16. This issue is particularly prominent when yum/rpm commands go off the deep end repeatedly, but affects any case where a process takes longer than the timeout to complete.
* | Update mock/stubs to avoid deprecationsdanielsdeleo2013-11-011-2/+2
| |
* | [MIXLIB-7] remove awesome_printLamont Granquist2013-10-312-3/+0
|/
* Wait for child process to die in case of critical errorsdanielsdeleo2013-09-091-0/+32
| | | | | | | | | | | | Ported the regression test from OHAI-455 to mixlib-shellout, which revealed a race condition in the way shellout reaps the child after a failed exec (most commonly caused by attempting to run a command that doesn't exist). The call to waitpid2 used WNOHANG to avoid hanging indefinitely if an error was caused but the child process was still alive, but this results in the child process not getting reaped if it exits after the call to waitpid2. In a single run of the stress test, this occurred 94/100 times, so it is very likely that mixlib-shellout will leak zombies for the ENOENT case without this change.
* remove uneeded requiredanielsdeleo2013-09-091-1/+0
| | | | not sure what this was, tests run fine without it.
* Check the password option in the tests.sersut2013-06-201-0/+1
|
* Make windows running as tests more reliable.sersut2013-06-201-7/+4
|
* Fix password and fd cleanup related specs on windows.sersut2013-06-191-8/+16
|
* Make sure the parent process' LC_ALL setting is passed to subprocess when ↵sersut2013-06-141-0/+9
| | | | LC_ALL is set to nil in the :environment setting.
* add spec test for EBADF in closing fdsLamont Granquist2013-06-141-0/+14
|
* More robust pipe checks and tests.sersut2013-04-171-4/+10
|
* Clean inherited file descriptors from the parent while forking subprocess.sersut2013-04-161-3/+13
|
* Update check for local system use a downcased computer nameMoser, Kevin2013-01-221-1/+2
|
* Add tests for running as different user in windowsMoser, Kevin2013-01-222-3/+70
|
* Add default value check for with_logon, domain, & userMoser, Kevin2013-01-151-0/+3
|