summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* add logging message if attempting to kill critical processsmurawski/agressive_terminationSteven Murawski2016-06-061-5/+7
|
* Keep `kill_process_tree` from killing protected system processes.Steven Murawski2016-05-241-3/+43
|
* convert environment hash keys to stringsEvan Tschuy2015-11-101-0/+8
| | | | | | | by converting the hash keys to strings, we can use symbols in our environment blocks: environment {FOO: 'bar', SHELL: 'zsh'}
* improve the test to more accurately detrermine if child process is killedMatt Wrock2015-10-201-8/+5
|
* kill all windows child processes when the command times outMatt Wrock2015-09-241-0/+13
|
* make tests pass when run by a domain joined userMatt Wrock2015-09-241-2/+2
|
* prevent shellout from attempting to execute a directory on windowsMatt Wrock2015-09-111-0/+2
|
* have failing testMatt Wrock2015-09-111-0/+29
|
* Added comment for bugjdm/testJay Mundrawala2015-08-261-0/+10
|
* Don't use presence of fd to check if fd's were inheritedJay Mundrawala2015-08-261-2/+4
| | | | | | | | | This is breaking on windows with ruby 2.0.0p645. The issue seems to be that there is something at the fd, but it's not the file descriptor from the parent. Instead, we're now testing that both the fd exists and the file contains the contents that were written
* force expect syntaxLamont Granquist2015-05-151-0/+3
|
* rspec3ificationLamont Granquist2015-05-153-283/+350
|
* Merge pull request #94 from chef/lcg/no-getpgrpLamont Granquist2015-05-151-6/+6
|\ | | | | remove getpgrp back to setsid
| * remove getpgrp back to setsidlcg/no-getpgrpLamont Granquist2015-05-151-6/+6
| |
* | Fix 2 ruby warnings for uninitialized variablesdanielsdeleo2015-05-151-0/+3
|/
* 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.