Thanks Eric! wonderful, all test passed (with very minimal CPU strain) I also enabled full 64 bit kernel so that helps I am sure.
and yes, very true var is symlinked under 10.6 (not sure if this was the case <) thanks that was wonderful weekend gift (I am now unblocked) and try other things with this container have a wonderful weekend! bash-3.2$ ls -l var lrwxr-xr-x@ 1 root wheel 11 Feb 1 18:44 var -> private/var bash-3.2$ bash-3.2$ make * test/unit/test_configurator.rb * test/unit/test_http_parser.rb * test/unit/test_http_parser_ng.rb * test/unit/test_request.rb * test/unit/test_response.rb * test/unit/test_socket_helper.rb * test/unit/test_tee_input.rb * test/unit/test_util.rb * test/unit/test_server.rb -n test_preload_app_config * test/unit/test_server.rb -n test_broken_app * test/unit/test_server.rb -n test_simple_server * test/unit/test_server.rb -n test_client_shutdown_writes * test/unit/test_server.rb -n test_client_shutdown_write_truncates * test/unit/test_server.rb -n test_client_malformed_body * test/unit/test_server.rb -n test_trickle_attack * test/unit/test_server.rb -n test_close_client * test/unit/test_server.rb -n test_bad_client * test/unit/test_server.rb -n test_logger_set * test/unit/test_server.rb -n test_logger_changed * test/unit/test_server.rb -n test_bad_client_400 * test/unit/test_server.rb -n test_http_0_9 * test/unit/test_server.rb -n test_header_is_too_long * test/unit/test_server.rb -n test_file_streamed_request * test/unit/test_server.rb -n test_file_streamed_request_bad_body * test/unit/test_server.rb -n test_listener_names * test/exec/test_exec.rb -n test_working_directory_rel_path_config_file * test/exec/test_exec.rb -n test_working_directory * test/exec/test_exec.rb -n test_working_directory_controls_relative_paths * test/exec/test_exec.rb -n test_exit_signals * test/exec/test_exec.rb -n test_basic * test/exec/test_exec.rb -n test_rack_env_unset * test/exec/test_exec.rb -n test_rack_env_cli_set * test/exec/test_exec.rb -n test_rack_env_ENV_set * test/exec/test_exec.rb -n test_rack_env_cli_override_ENV * test/exec/test_exec.rb -n test_ttin_ttou * test/exec/test_exec.rb -n test_help * test/exec/test_exec.rb -n test_broken_reexec_config * test/exec/test_exec.rb -n test_broken_reexec_ru * test/exec/test_exec.rb -n test_unicorn_config_listener_swap * test/exec/test_exec.rb -n test_unicorn_config_listen_with_options * test/exec/test_exec.rb -n test_unicorn_config_per_worker_listen * test/exec/test_exec.rb -n test_unicorn_config_listen_augments_cli * test/exec/test_exec.rb -n test_weird_config_settings * test/exec/test_exec.rb -n test_read_embedded_cli_switches * test/exec/test_exec.rb -n test_config_ru_alt_path * test/exec/test_exec.rb -n test_load_module * test/exec/test_exec.rb -n test_reexec * test/exec/test_exec.rb -n test_reexec_alt_config * test/exec/test_exec.rb -n test_socket_unlinked_restore * test/exec/test_exec.rb -n test_unicorn_config_file * test/exec/test_exec.rb -n test_daemonize_reexec * test/exec/test_exec.rb -n test_daemonize_redirect_fail * test/exec/test_exec.rb -n test_reexec_fd_leak * test/exec/test_exec.rb -n test_preload_app_hup * test/exec/test_exec.rb -n test_hup * test/exec/test_exec.rb -n test_default_listen_hup_holds_listener * test/exec/test_exec.rb -n test_default_listen_upgrade_holds_listener * test/unit/test_signals.rb -n test_worker_dies_on_dead_master * test/unit/test_signals.rb -n test_sleepy_kill * test/unit/test_signals.rb -n test_timeout_slow_response * test/unit/test_signals.rb -n test_response_write * test/unit/test_signals.rb -n test_request_read * test/unit/test_upload.rb -n test_put * test/unit/test_upload.rb -n test_put_content_md5 * test/unit/test_upload.rb -n test_put_trickle_small * test/unit/test_upload.rb -n test_put_keepalive_truncates_small_overwrite * test/unit/test_upload.rb -n test_put_excessive_overwrite_closed * test/unit/test_upload.rb -n test_uncomfortable_with_onenine_encodings * test/unit/test_upload.rb -n test_chunked_upload_via_curl * test/unit/test_upload.rb -n test_curl_chunked_small 179 tests, 63093 assertions, 0 failures, 0 errors bash-3.2$ On Fri, Jun 25, 2010 at 2:35 PM, Eric Wong <[email protected]> wrote: > Andrew Milkowski <[email protected]> wrote: >> Hi there, >> >> ran to a snag building unicorn from sources (git master at >> git://git.bogomips.org/unicorn.git) >> >> 1) Failure: >> : test_working_directory_rel_path_config_file(ExecTest) >> [test/exec/test_exec.rb:106]: >> : >> <"/var/folders/gy/gyjECZCGGxKv3I3mRTmhB++++TI/-Tmp-/unicorn_exec_test20100625-1679-1x3ks9d-0"> >> expected but was >> : >> <"/private/var/folders/gy/gyjECZCGGxKv3I3mRTmhB++++TI/-Tmp-/unicorn_exec_test20100625-1679-1x3ks9d-0">. > > Hi Andrew, > > Not being an OSX user, I had to look this up, but apparently /var on OSX > is a symlink to /private/var? Weird... > > We have to work around a similar issue for upgrades in Capistrano > deployments by updating ENV['PWD'], might as well do it here. > > I've just pushed out the following patch, which is a more thorough test > anyways: > > >From cf63db66bca9acfd3416ab8fc8a7fd4f07927342 Mon Sep 17 00:00:00 2001 > From: Eric Wong <[email protected]> > Date: Fri, 25 Jun 2010 11:29:13 -0700 > Subject: [PATCH] test-exec: prefer ENV['PWD'] in working_directory tests > > We do an extra check in the application dispatch to ensure > ENV['PWD'] is set correctly to match Dir.pwd (even if the > string path is different) as this is required for Capistrano > deployments. > > These tests should now pass under OSX where /var is apparently > a symlink to /private/var. > --- > test/exec/test_exec.rb | 29 +++++++++++++++++------------ > 1 files changed, 17 insertions(+), 12 deletions(-) > > diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb > index 9830683..1d24ca3 100644 > --- a/test/exec/test_exec.rb > +++ b/test/exec/test_exec.rb > @@ -54,6 +54,20 @@ before_fork do |server, worker| > end > EOS > > + WORKING_DIRECTORY_CHECK_RU = <<-EOS > +use Rack::ContentLength > +run lambda { |env| > + pwd = ENV['PWD'] > + a = ::File.stat(pwd) > + b = ::File.stat(Dir.pwd) > + if (a.ino == b.ino && a.dev == b.dev) > + [ 200, { 'Content-Type' => 'text/plain' }, [ pwd ] ] > + else > + [ 404, { 'Content-Type' => 'text/plain' }, [] ] > + end > +} > + EOS > + > def setup > @pwd = Dir.pwd > @tmpfile = Tempfile.new('unicorn_exec_test') > @@ -87,10 +101,7 @@ end > File.unlink(other.path) > Dir.mkdir(other.path) > File.open("config.ru", "wb") do |fp| > - fp.syswrite <<EOF > -use Rack::ContentLength > -run proc { |env| [ 200, { 'Content-Type' => 'text/plain' }, [ Dir.pwd ] ] } > -EOF > + fp.syswrite WORKING_DIRECTORY_CHECK_RU > end > FileUtils.cp("config.ru", other.path + "/config.ru") > Dir.chdir(@tmpdir) > @@ -138,10 +149,7 @@ EOF > File.unlink(other.path) > Dir.mkdir(other.path) > File.open("config.ru", "wb") do |fp| > - fp.syswrite <<EOF > -use Rack::ContentLength > -run proc { |env| [ 200, { 'Content-Type' => 'text/plain' }, [ Dir.pwd ] ] } > -EOF > + fp.syswrite WORKING_DIRECTORY_CHECK_RU > end > FileUtils.cp("config.ru", other.path + "/config.ru") > tmp = Tempfile.new('unicorn.config') > @@ -177,10 +185,7 @@ EOF > File.unlink(other.path) > Dir.mkdir(other.path) > File.open("config.ru", "wb") do |fp| > - fp.syswrite <<EOF > -use Rack::ContentLength > -run proc { |env| [ 200, { 'Content-Type' => 'text/plain' }, [ Dir.pwd ] ] } > -EOF > + fp.syswrite WORKING_DIRECTORY_CHECK_RU > end > FileUtils.cp("config.ru", other.path + "/config.ru") > system('mkfifo', "#{other.path}/fifo") > -- > Eric Wong > _______________________________________________ > Unicorn mailing list - [email protected] > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying > _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
