├── .gitmodules ├── process ├── test-assets │ ├── empty │ └── sample └── process_suite_test.go ├── script └── test ├── old ├── linux_backend │ ├── skeleton │ │ ├── bin │ │ │ └── .gitkeep │ │ ├── etc │ │ │ └── .gitkeep │ │ ├── jobs │ │ │ └── .gitkeep │ │ ├── run │ │ │ └── .gitkeep │ │ ├── tmp │ │ │ └── .gitkeep │ │ ├── lib │ │ │ ├── hook-child-before-pivot.sh │ │ │ └── hook-parent-before-clone.sh │ │ └── start.sh │ ├── bin │ │ ├── README.md │ │ ├── .gitignore │ │ ├── create.sh │ │ ├── destroy.sh │ │ └── rootfs │ │ │ └── setup.sh │ └── src │ │ ├── oom │ │ ├── .gitignore │ │ └── Makefile │ │ ├── repquota │ │ ├── .gitignore │ │ ├── Makefile │ │ └── README.md │ │ ├── wsh │ │ ├── .gitignore │ │ ├── pty.h │ │ ├── Makefile.dep │ │ ├── un.h │ │ ├── util.h │ │ ├── pwd.h │ │ ├── Makefile │ │ └── pump.h │ │ ├── Makefile │ │ └── nstar │ │ ├── Makefile │ │ └── pwd.h ├── integration │ └── wshd │ │ ├── noop.go │ │ ├── noop_test.go │ │ ├── wshd_suite_test.go │ │ ├── fake_hook │ │ └── main.go │ │ └── rlimit_consts_test.go ├── rootfs_provider │ ├── getuid.go │ ├── getuid_linux.go │ ├── uid_mapper.go │ ├── rootfs_provider_suite_test.go │ ├── rootfs_provider.go │ └── namespaced_rootfs_provider.go ├── cgroups_manager │ ├── cgroups_manager.go │ └── cgroups_manager_suite_test.go ├── logging │ └── logging_suite_test.go ├── port_pool │ └── port_pool_suite_test.go ├── system_info │ ├── system_info_suite_test.go │ ├── fake_system_info │ │ └── provider.go │ └── system_info_test.go ├── quota_manager │ └── quota_manager_suite_test.go ├── bandwidth_manager │ └── bandwidth_manager_suite_test.go └── repository_fetcher │ └── repository_fetcher_suite_test.go ├── Godeps ├── _workspace │ ├── .gitignore │ └── src │ │ ├── github.com │ │ ├── tedsuo │ │ │ ├── rata │ │ │ │ ├── VERSION │ │ │ │ └── router_suite_test.go │ │ │ └── ifrit │ │ │ │ ├── fake_runner │ │ │ │ └── doc.go │ │ │ │ ├── ifrit_suite_test.go │ │ │ │ ├── proxy │ │ │ │ ├── proxy_suite_test.go │ │ │ │ └── proxy.go │ │ │ │ ├── grouper │ │ │ │ ├── group_suite_test.go │ │ │ │ └── sliding_buffer.go │ │ │ │ ├── restart │ │ │ │ ├── restart_suite_test.go │ │ │ │ └── strategies.go │ │ │ │ ├── http_server │ │ │ │ └── http_server_suite_test.go │ │ │ │ └── .gitignore │ │ ├── Sirupsen │ │ │ └── logrus │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── terminal_linux.go │ │ │ │ ├── terminal_darwin.go │ │ │ │ ├── terminal_freebsd.go │ │ │ │ ├── hooks │ │ │ │ ├── syslog │ │ │ │ │ ├── README.md │ │ │ │ │ └── syslog_test.go │ │ │ │ └── papertrail │ │ │ │ │ └── papertrail_test.go │ │ │ │ ├── json_formatter.go │ │ │ │ ├── terminal_notwindows.go │ │ │ │ └── terminal_windows.go │ │ ├── cloudfoundry-incubator │ │ │ ├── garden │ │ │ │ ├── .gitmodules │ │ │ │ ├── .travis.yml │ │ │ │ ├── transport │ │ │ │ │ └── message_writer.go │ │ │ │ ├── backend.go │ │ │ │ ├── .drone.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── garden_suite_test.go │ │ │ │ ├── client │ │ │ │ │ ├── client_suite_test.go │ │ │ │ │ ├── connection │ │ │ │ │ │ ├── connection_suite_test.go │ │ │ │ │ │ └── stdin_writer.go │ │ │ │ │ └── fake_api_client │ │ │ │ │ │ └── fake_client.go │ │ │ │ ├── server │ │ │ │ │ ├── server_suite_test.go │ │ │ │ │ ├── timebomb │ │ │ │ │ │ └── timebomb_suite_test.go │ │ │ │ │ ├── bomberman │ │ │ │ │ │ └── bomberman_suite_test.go │ │ │ │ │ ├── helpers_test.go │ │ │ │ │ └── chanwriter.go │ │ │ │ └── scripts │ │ │ │ │ └── test │ │ │ ├── cf-debug-server │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ └── cf_debug_server_suite_test.go │ │ │ └── cf-lager │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ └── integration │ │ │ │ └── main.go │ │ ├── cloudfoundry │ │ │ ├── gosigar │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── sigar_suite_test.go │ │ │ │ ├── sigar_util.go │ │ │ │ ├── NOTICE │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ │ ├── uptime.go │ │ │ │ │ └── free.go │ │ │ │ ├── sigar_unix.go │ │ │ │ └── sigar_windows_test.go │ │ │ ├── gosteno │ │ │ │ ├── .gitignore │ │ │ │ ├── codec.go │ │ │ │ ├── config.go │ │ │ │ ├── sink.go │ │ │ │ ├── .travis.yml │ │ │ │ ├── syslog │ │ │ │ │ └── syslog_windows.go │ │ │ │ ├── json_codec.go │ │ │ │ ├── config_test.go │ │ │ │ ├── null_sink_test.go │ │ │ │ ├── testing_sink_test.go │ │ │ │ ├── io_sink_test.go │ │ │ │ └── gosteno-prettify │ │ │ │ │ └── README.md │ │ │ ├── dropsonde │ │ │ │ ├── integration_test │ │ │ │ │ ├── package.go │ │ │ │ │ └── integration_test_suite_test.go │ │ │ │ ├── events │ │ │ │ │ ├── event.go │ │ │ │ │ └── generate-events.sh │ │ │ │ ├── emitter │ │ │ │ │ ├── byte_emitter.go │ │ │ │ │ ├── responding_byte_emitter.go │ │ │ │ │ ├── emitter_suite_test.go │ │ │ │ │ └── logemitter │ │ │ │ │ │ └── emitter_suite_test.go │ │ │ │ ├── .gitmodules │ │ │ │ ├── test │ │ │ │ ├── logs │ │ │ │ │ └── logs_suite_test.go │ │ │ │ ├── metrics │ │ │ │ │ └── metrics_suite_test.go │ │ │ │ ├── factories │ │ │ │ │ └── factories_suite_test.go │ │ │ │ ├── signature │ │ │ │ │ └── signature_suite_test.go │ │ │ │ ├── log_sender │ │ │ │ │ └── log_sender_suite_test.go │ │ │ │ ├── metric_sender │ │ │ │ │ └── metric_sender_suite_test.go │ │ │ │ ├── runtime_stats │ │ │ │ │ └── runtime_stats_suite_test.go │ │ │ │ ├── dropsonde_marshaller │ │ │ │ │ └── dropsonde_marshaller_suite_test.go │ │ │ │ ├── envelope_extensions │ │ │ │ │ └── envelope_extensions_suite_test.go │ │ │ │ ├── instrumented_handler │ │ │ │ │ └── instrumented_handler_suite_test.go │ │ │ │ ├── dropsonde_suite_test.go │ │ │ │ ├── dropsonde_unmarshaller │ │ │ │ │ └── dropsonde_unmarshaller_suite_test.go │ │ │ │ ├── instrumented_round_tripper │ │ │ │ │ └── instrumented_round_tripper_suite_test.go │ │ │ │ ├── .gitignore │ │ │ │ └── control │ │ │ │ │ └── heartbeatrequest.pb.go │ │ │ └── gunk │ │ │ │ └── command_runner │ │ │ │ ├── command_runner.go │ │ │ │ ├── linux_command_runner │ │ │ │ └── linux_command_runner_suite_test.go │ │ │ │ └── windows_command_runner │ │ │ │ └── windows_command_runner_suite_test.go │ │ ├── onsi │ │ │ ├── gomega │ │ │ │ ├── .gitignore │ │ │ │ ├── matchers │ │ │ │ │ ├── support │ │ │ │ │ │ └── goraph │ │ │ │ │ │ │ ├── node │ │ │ │ │ │ │ └── node.go │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ └── util.go │ │ │ │ │ ├── matcher_tests_suite_test.go │ │ │ │ │ ├── be_true_matcher_test.go │ │ │ │ │ ├── be_false_matcher_test.go │ │ │ │ │ ├── be_nil_matcher.go │ │ │ │ │ ├── be_nil_matcher_test.go │ │ │ │ │ ├── be_true_matcher.go │ │ │ │ │ ├── be_false_matcher.go │ │ │ │ │ ├── be_zero_matcher.go │ │ │ │ │ ├── be_empty_matcher.go │ │ │ │ │ ├── be_zero_matcher_test.go │ │ │ │ │ └── equal_matcher.go │ │ │ │ ├── internal │ │ │ │ │ ├── testingtsupport │ │ │ │ │ │ └── testing_t_support_test.go │ │ │ │ │ ├── assertion │ │ │ │ │ │ └── assertion_suite_test.go │ │ │ │ │ ├── asyncassertion │ │ │ │ │ │ └── async_assertion_suite_test.go │ │ │ │ │ └── fakematcher │ │ │ │ │ │ └── fake_matcher.go │ │ │ │ ├── format │ │ │ │ │ └── format_suite_test.go │ │ │ │ ├── gbytes │ │ │ │ │ └── gbuffer_suite_test.go │ │ │ │ ├── ghttp │ │ │ │ │ └── test_server_suite_test.go │ │ │ │ ├── .travis.yml │ │ │ │ ├── gexec │ │ │ │ │ └── gexec_suite_test.go │ │ │ │ └── types │ │ │ │ │ └── types.go │ │ │ └── ginkgo │ │ │ │ ├── integration │ │ │ │ └── integration.go │ │ │ │ ├── .gitignore │ │ │ │ ├── ginkgo │ │ │ │ ├── interrupthandler │ │ │ │ │ ├── sigquit_swallower_windows.go │ │ │ │ │ └── sigquit_swallower_unix.go │ │ │ │ ├── testsuite │ │ │ │ │ └── testsuite_suite_test.go │ │ │ │ ├── version_command.go │ │ │ │ ├── watch │ │ │ │ │ └── delta.go │ │ │ │ ├── testrunner │ │ │ │ │ └── run_result.go │ │ │ │ └── help_command.go │ │ │ │ ├── internal │ │ │ │ ├── spec │ │ │ │ │ └── spec_suite_test.go │ │ │ │ ├── failer │ │ │ │ │ └── failer_suite_test.go │ │ │ │ ├── writer │ │ │ │ │ └── writer_suite_test.go │ │ │ │ ├── leafnodes │ │ │ │ │ ├── leaf_node_suite_test.go │ │ │ │ │ ├── interfaces.go │ │ │ │ │ └── it_node_test.go │ │ │ │ ├── remote │ │ │ │ │ ├── remote_suite_test.go │ │ │ │ │ ├── output_interceptor.go │ │ │ │ │ ├── fake_output_interceptor_test.go │ │ │ │ │ ├── fake_poster_test.go │ │ │ │ │ └── output_interceptor_win.go │ │ │ │ ├── specrunner │ │ │ │ │ ├── spec_runner_suite_test.go │ │ │ │ │ └── random_id.go │ │ │ │ ├── codelocation │ │ │ │ │ └── code_location_suite_test.go │ │ │ │ ├── containernode │ │ │ │ │ └── container_node_suite_test.go │ │ │ │ └── suite │ │ │ │ │ └── suite_suite_test.go │ │ │ │ ├── types │ │ │ │ ├── types_suite_test.go │ │ │ │ ├── code_location.go │ │ │ │ └── synchronization.go │ │ │ │ ├── reporters │ │ │ │ ├── reporters_suite_test.go │ │ │ │ └── reporter.go │ │ │ │ └── .travis.yml │ │ ├── kr │ │ │ └── pty │ │ │ │ ├── .gitignore │ │ │ │ ├── types.go │ │ │ │ ├── ztypes_386.go │ │ │ │ ├── ztypes_arm.go │ │ │ │ ├── ztypes_amd64.go │ │ │ │ ├── pty_unsupported.go │ │ │ │ ├── ioctl.go │ │ │ │ ├── ztypes_freebsd_386.go │ │ │ │ ├── ztypes_freebsd_arm.go │ │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ │ ├── types_freebsd.go │ │ │ │ ├── mktypes.bash │ │ │ │ ├── doc.go │ │ │ │ ├── README.md │ │ │ │ ├── run.go │ │ │ │ └── util.go │ │ ├── vaughan0 │ │ │ └── go-ini │ │ │ │ └── test.ini │ │ ├── bmizerany │ │ │ └── pat │ │ │ │ ├── .gitignore │ │ │ │ ├── bench_test.go │ │ │ │ └── example │ │ │ │ └── hello.go │ │ ├── docker │ │ │ ├── docker │ │ │ │ ├── pkg │ │ │ │ │ ├── mflag │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── term │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── parsers │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ └── kernel │ │ │ │ │ │ │ ├── uname_unsupported.go │ │ │ │ │ │ │ └── uname_linux.go │ │ │ │ │ ├── tarsum │ │ │ │ │ │ ├── MAINTAINER │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ │ ├── xattr │ │ │ │ │ │ │ │ └── layer.tar │ │ │ │ │ │ │ └── 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158 │ │ │ │ │ │ │ │ └── json │ │ │ │ │ │ └── writercloser.go │ │ │ │ │ ├── mount │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── mountinfo.go │ │ │ │ │ │ ├── mounter_unsupported.go │ │ │ │ │ │ ├── mountinfo_unsupported.go │ │ │ │ │ │ ├── flags_unsupported.go │ │ │ │ │ │ ├── mounter_linux.go │ │ │ │ │ │ └── flags_freebsd.go │ │ │ │ │ ├── httputils │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── timeutils │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── truncindex │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── archive │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ │ └── broken.tar │ │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ │ ├── time_linux.go │ │ │ │ │ │ └── archive_windows.go │ │ │ │ │ ├── units │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── system │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ │ ├── umask.go │ │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ │ ├── stat_linux.go │ │ │ │ │ │ ├── stat_windows.go │ │ │ │ │ │ ├── lstat.go │ │ │ │ │ │ ├── utimes_darwin.go │ │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ │ ├── meminfo.go │ │ │ │ │ │ ├── lstat_test.go │ │ │ │ │ │ ├── mknod.go │ │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ │ ├── stat_test.go │ │ │ │ │ │ ├── stat.go │ │ │ │ │ │ └── utimes_linux.go │ │ │ │ │ ├── promise │ │ │ │ │ │ └── promise.go │ │ │ │ │ └── fileutils │ │ │ │ │ │ └── fileutils.go │ │ │ │ ├── engine │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ ├── helpers_test.go │ │ │ │ │ └── hack.go │ │ │ │ ├── vendor │ │ │ │ │ └── src │ │ │ │ │ │ └── code.google.com │ │ │ │ │ │ └── p │ │ │ │ │ │ └── go │ │ │ │ │ │ └── src │ │ │ │ │ │ └── pkg │ │ │ │ │ │ └── archive │ │ │ │ │ │ └── tar │ │ │ │ │ │ ├── testdata │ │ │ │ │ │ ├── small.txt │ │ │ │ │ │ ├── small2.txt │ │ │ │ │ │ ├── v7.tar │ │ │ │ │ │ ├── writer-big.tar │ │ │ │ │ │ └── writer-big-long.tar │ │ │ │ │ │ ├── stat_atim.go │ │ │ │ │ │ └── stat_atimespec.go │ │ │ │ ├── daemon │ │ │ │ │ └── graphdriver │ │ │ │ │ │ ├── btrfs │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── dummy_unsupported.go │ │ │ │ │ │ ├── version_test.go │ │ │ │ │ │ ├── version_none.go │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ └── btrfs_test.go │ │ │ │ │ │ ├── devmapper │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ │ ├── aufs │ │ │ │ │ │ ├── mount_linux.go │ │ │ │ │ │ ├── mount_unsupported.go │ │ │ │ │ │ └── mount.go │ │ │ │ │ │ └── vfs │ │ │ │ │ │ └── vfs_test.go │ │ │ │ ├── api │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ ├── server │ │ │ │ │ │ └── MAINTAINERS │ │ │ │ │ ├── README.md │ │ │ │ │ └── api_unit_test.go │ │ │ │ ├── image │ │ │ │ │ └── graph.go │ │ │ │ ├── registry │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ └── endpoint_test.go │ │ │ │ ├── graph │ │ │ │ │ └── MAINTAINERS │ │ │ │ ├── utils │ │ │ │ │ ├── random.go │ │ │ │ │ ├── tmpdir.go │ │ │ │ │ └── timeoutconn.go │ │ │ │ ├── opts │ │ │ │ │ └── ip.go │ │ │ │ ├── nat │ │ │ │ │ └── sort.go │ │ │ │ └── dockerversion │ │ │ │ │ └── dockerversion.go │ │ │ ├── libcontainer │ │ │ │ └── netlink │ │ │ │ │ ├── netlink_linux_arm.go │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ └── netlink_linux_notarm.go │ │ │ └── libtrust │ │ │ │ ├── MAINTAINERS │ │ │ │ ├── doc.go │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── util_test.go │ │ │ │ └── README.md │ │ ├── gorilla │ │ │ ├── context │ │ │ │ ├── .travis.yml │ │ │ │ └── README.md │ │ │ └── mux │ │ │ │ ├── .travis.yml │ │ │ │ ├── README.md │ │ │ │ └── bench_test.go │ │ ├── pivotal-golang │ │ │ ├── clock │ │ │ │ ├── README.md │ │ │ │ ├── fakeclock │ │ │ │ │ └── fakeclock_suite_test.go │ │ │ │ ├── ticker.go │ │ │ │ ├── timer.go │ │ │ │ └── clock.go │ │ │ └── lager │ │ │ │ ├── chug │ │ │ │ └── chug_suite_test.go │ │ │ │ ├── lager_suite_test.go │ │ │ │ ├── ginkgoreporter │ │ │ │ └── ginkgoreporter_suite_test.go │ │ │ │ └── models.go │ │ ├── nu7hatch │ │ │ └── gouuid │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ └── example_test.go │ │ └── awslabs │ │ │ └── aws-sdk-go │ │ │ ├── aws │ │ │ ├── version.go │ │ │ ├── example.ini │ │ │ ├── error.go │ │ │ └── handlers_test.go │ │ │ └── internal │ │ │ └── endpoints │ │ │ ├── endpoints.go │ │ │ └── endpoints_test.go │ │ └── golang.org │ │ └── x │ │ └── crypto │ │ └── ssh │ │ ├── test │ │ └── doc.go │ │ ├── testdata │ │ └── doc.go │ │ ├── terminal │ │ ├── util_bsd.go │ │ └── util_linux.go │ │ ├── tcpip_test.go │ │ └── doc.go └── Readme ├── integration ├── device │ └── package.go ├── bind_mount │ └── package.go ├── lifecycle │ └── lifecycle.go ├── networking │ └── networking.go ├── measurements │ └── measurements.go ├── runner │ ├── tmpfs_mounter_notlinux.go │ └── tmpfs_mounter_linux.go ├── performance │ ├── README.md │ └── performance_suite_test.go └── test-images │ └── preexisting_users │ └── Dockerfile ├── packer ├── garden-ci │ ├── AMI_IMAGE_ID │ ├── DOCKER_IMAGE_VERSION │ ├── VAGRANT_VIRTUALBOX_VERSION │ ├── scripts │ │ ├── cleanup.sh │ │ ├── vagrant_passwordless_sudo.sh │ │ ├── amazon_ebs_passwordless_sudo.sh │ │ ├── vagrant_provision.sh │ │ ├── untar_rootfses.sh │ │ ├── passwordless_sudo.sh │ │ ├── install_vbox_guest_additions.sh │ │ └── add_insecure_vagrant_ssh_keys.sh │ └── Vagrantfile.template ├── rootfs │ ├── busybox │ │ ├── seed │ │ └── busybox.json │ ├── empty │ │ ├── hello.go │ │ └── scripts │ │ │ └── compile_binary │ ├── docker_registry │ │ └── docker_registry.json │ ├── fuse │ │ ├── provision.sh │ │ └── fuse.json │ └── ubuntu │ │ └── ubuntu.json └── .gitignore ├── scripts ├── install_godep_for_os.sh ├── garden-fly ├── test-in-vagrant ├── run-garden-remote-linux ├── test_from_vim ├── run-garden-linux ├── test-in-docker ├── concourse-test ├── remote-fly-hijack ├── add-route ├── clean-aws-instances ├── oneoff │ └── move_pkg ├── remote-fly └── test-in-aws ├── docs └── images │ ├── container creation.png │ └── iodaemon process structure.png ├── Cheffile ├── Makefile ├── main.go ├── site-cookbooks └── garden │ └── recipes │ ├── apt-update.rb │ ├── dev.rb │ └── rootfs.rb ├── ci ├── nested-build.yml ├── non-nested-build.yml └── clean-aws-instances.yml ├── network ├── configure_notlinux.go ├── network_suite_test.go ├── subnets │ └── subnets_suite_test.go ├── iptables │ └── iptables_suite_test.go ├── bridgemgr │ └── bridgemgr_suite_test.go ├── hostname_notlinux.go ├── hostname_linux.go ├── configure_linux.go └── devices │ ├── devices_suite_test.go │ └── bridgetest │ └── main.go ├── .drone.yml ├── hook └── hook_suite_test.go ├── process_tracker ├── writer │ ├── writer_suite_test.go │ └── fan_out.go └── process_tracker_suite_test.go ├── linux_container └── container_suite_test.go ├── linux_backend ├── linux_backend_suite_test.go └── container_initializer_linux.go ├── container_pool └── container_pool_suite_test.go ├── iodaemon ├── child_darwin.go ├── child_linux.go ├── winsize.go └── winsizereporter │ └── main.go ├── .travis.yml ├── .gitignore └── Cheffile.lock /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /process/test-assets/empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | ../scripts/test_from_vim -------------------------------------------------------------------------------- /old/linux_backend/skeleton/bin/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/etc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/jobs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/run/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/tmp/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Godeps/_workspace/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | -------------------------------------------------------------------------------- /integration/device/package.go: -------------------------------------------------------------------------------- 1 | package device 2 | -------------------------------------------------------------------------------- /packer/garden-ci/AMI_IMAGE_ID: -------------------------------------------------------------------------------- 1 | ami-7412131c 2 | -------------------------------------------------------------------------------- /packer/garden-ci/DOCKER_IMAGE_VERSION: -------------------------------------------------------------------------------- 1 | 0.2.0 2 | -------------------------------------------------------------------------------- /old/linux_backend/bin/README.md: -------------------------------------------------------------------------------- 1 | # Placeholder 2 | -------------------------------------------------------------------------------- /old/linux_backend/src/oom/.gitignore: -------------------------------------------------------------------------------- 1 | oom 2 | *.o 3 | -------------------------------------------------------------------------------- /packer/garden-ci/VAGRANT_VIRTUALBOX_VERSION: -------------------------------------------------------------------------------- 1 | 0.3.0 2 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | apt-get clean 2 | -------------------------------------------------------------------------------- /packer/rootfs/busybox/seed: -------------------------------------------------------------------------------- 1 | touch /tmp/ran-seed 2 | -------------------------------------------------------------------------------- /integration/bind_mount/package.go: -------------------------------------------------------------------------------- 1 | package bind_mount 2 | -------------------------------------------------------------------------------- /integration/lifecycle/lifecycle.go: -------------------------------------------------------------------------------- 1 | package lifecycle 2 | -------------------------------------------------------------------------------- /old/linux_backend/bin/.gitignore: -------------------------------------------------------------------------------- 1 | /*/rootfs 2 | /tmp 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/rata/VERSION: -------------------------------------------------------------------------------- 1 | 0.3.0 2 | -------------------------------------------------------------------------------- /integration/networking/networking.go: -------------------------------------------------------------------------------- 1 | package networking 2 | -------------------------------------------------------------------------------- /old/linux_backend/src/repquota/.gitignore: -------------------------------------------------------------------------------- 1 | repquota 2 | *.o 3 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/.gitignore: -------------------------------------------------------------------------------- 1 | wshd 2 | wsh 3 | *.o 4 | -------------------------------------------------------------------------------- /integration/measurements/measurements.go: -------------------------------------------------------------------------------- 1 | package measurements 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | -------------------------------------------------------------------------------- /process/test-assets/sample: -------------------------------------------------------------------------------- 1 | key1=value1 2 | key2=value2 3 | key3=value=3 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.test 3 | . 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/.gitignore: -------------------------------------------------------------------------------- 1 | [568].out 2 | _go* 3 | _test* 4 | _obj 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/vaughan0/go-ini/test.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | stuff = things 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/bmizerany/pat/.gitignore: -------------------------------------------------------------------------------- 1 | *.prof 2 | *.out 3 | example/example 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/integration/integration.go: -------------------------------------------------------------------------------- 1 | package integration 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | pkg 3 | *.iml 4 | src 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/integration_test/package.go: -------------------------------------------------------------------------------- 1 | package integration 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | TODO 3 | tmp/**/* 4 | *.coverprofile -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mflag/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/engine/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/term/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /scripts/install_godep_for_os.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | rm $(which godep) 4 | go install github.com/tools/godep 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Erik Hollensbe (@erikh) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/MAINTAINER: -------------------------------------------------------------------------------- 1 | Eric Windisch (@ewindisch) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/small.txt: -------------------------------------------------------------------------------- 1 | Kilts -------------------------------------------------------------------------------- /docs/images/container creation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/docs/images/container creation.png -------------------------------------------------------------------------------- /Cheffile: -------------------------------------------------------------------------------- 1 | site "http://community.opscode.com/api/v1" 2 | 3 | cookbook "apt", "1.7.0" 4 | cookbook "git" 5 | cookbook "golang" 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/small2.txt: -------------------------------------------------------------------------------- 1 | Google.com 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/fake_runner/doc.go: -------------------------------------------------------------------------------- 1 | // fake_runner contains test fixtures. 2 | package fake_runner 3 | -------------------------------------------------------------------------------- /old/integration/wshd/noop.go: -------------------------------------------------------------------------------- 1 | package wshd 2 | 3 | // prevent non-linux test runs from choking because everything else is linux 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/httputils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/timeutils/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/truncindex/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /docs/images/iodaemon process structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/docs/images/iodaemon process structure.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/dummy_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux !cgo 2 | 3 | package btrfs 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | # Proxy any target to the Makefile in the old directory 4 | %: 5 | cd old && $(MAKE) $@ 6 | 7 | .PHONY: default -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-debug-server/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | *.swp 3 | .DS_Store 4 | .idea 5 | *.coverprofile 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4.1 5 | 6 | script: scripts/test 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/events/event.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | type Event interface { 4 | ProtoMessage() 5 | } 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/clock/README.md: -------------------------------------------------------------------------------- 1 | Provides a `Clock` interface, useful for injecting time dependencies in tests. 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/api/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/api/server/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | Johan Euphrosine (@proppy) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Victor Vieux (@vieux) 2 | Jessie Frazelle (@jfrazelle) 3 | -------------------------------------------------------------------------------- /Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/codec.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | type Codec interface { 4 | EncodeRecord(record *Record) ([]byte, error) 5 | } 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libcontainer/netlink/netlink_linux_arm.go: -------------------------------------------------------------------------------- 1 | package netlink 2 | 3 | func ifrDataByte(b byte) uint8 { 4 | return uint8(b) 5 | } 6 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/cloudfoundry-incubator/garden-linux/old" 4 | 5 | // garden-linux server process 6 | func main() { 7 | old.Main() 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Victor Vieux (@vieux) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/nu7hatch/gouuid/.gitignore: -------------------------------------------------------------------------------- 1 | _obj 2 | _test 3 | *.6 4 | *.out 5 | _testmain.go 6 | \#* 7 | .\#* 8 | *.log 9 | _cgo* 10 | *.o 11 | *.a 12 | -------------------------------------------------------------------------------- /integration/runner/tmpfs_mounter_notlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package runner 4 | 5 | func MustMountTmpfs(destination string) { 6 | panic("not supported") 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/emitter/byte_emitter.go: -------------------------------------------------------------------------------- 1 | package emitter 2 | 3 | type ByteEmitter interface { 4 | Emit([]byte) error 5 | Close() 6 | } 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Cristian Staretu (@unclejack) 2 | Tibor Vass (@tiborvass) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/types.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package pty 4 | 5 | import "C" 6 | 7 | type ( 8 | _C_int C.int 9 | _C_uint C.uint 10 | ) 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/support/goraph/node/node.go: -------------------------------------------------------------------------------- 1 | package node 2 | 3 | type Node struct { 4 | Id int 5 | } 6 | 7 | type NodeOrderedSet []Node 8 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/pty.h: -------------------------------------------------------------------------------- 1 | #ifndef PTY_H 2 | #define PTY_H 3 | 4 | #define openpty __wshd_openpty 5 | 6 | int openpty(int *master, int *slave, char *name); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /packer/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /packer_cache 3 | *.log 4 | .envrc 5 | Vagrantfile 6 | .vagrant/ 7 | rootfs/**/*.tar 8 | rootfs/empty/hello 9 | output* 10 | release_output* 11 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/vagrant_passwordless_sudo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | usermod -a -G admin vagrant 6 | echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers 7 | -------------------------------------------------------------------------------- /site-cookbooks/garden/recipes/apt-update.rb: -------------------------------------------------------------------------------- 1 | execute "apt-get-update" do 2 | command "apt-get update" 3 | ignore_failure true 4 | action :nothing 5 | end.run_action(:run) 6 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/amazon_ebs_passwordless_sudo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | usermod -a -G admin ubuntu 6 | echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/devmapper/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexander Larsson (@alexlarsson) 2 | Vincent Batts (@vbatts) 3 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/vagrant_provision.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e -x 3 | 4 | # install build dependencies 5 | 6 | apt-get -y install \ 7 | dkms \ 8 | linux-headers-$(uname -r) 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dropsonde-protocol"] 2 | path = dropsonde-protocol 3 | url = https://github.com/cloudfoundry/dropsonde-protocol 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libcontainer/netlink/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Michael Crosby (@crosbymichael) 2 | Guillaume J. Charmes (@creack) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libcontainer/netlink/netlink_linux_notarm.go: -------------------------------------------------------------------------------- 1 | // +build !arm 2 | 3 | package netlink 4 | 5 | func ifrDataByte(b byte) int8 { 6 | return int8(b) 7 | } 8 | -------------------------------------------------------------------------------- /scripts/garden-fly: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Run fly with the necessary parameters to run Garden Linux container tests. 4 | fly --privileged -- -slowSpecThreshold=15 $* | sed -e 's/\\n/\'$'\n/g' 5 | -------------------------------------------------------------------------------- /scripts/test-in-vagrant: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e -x -u 3 | 4 | vagrant up 5 | vagrant ssh -c "cd /home/vagrant/go/src/github.com/cloudfoundry-incubator/garden-linux && sudo -E ./scripts/drone-test $*" 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2 5 | 6 | install: 7 | - 'go install github.com/onsi/ginkgo/ginkgo' 8 | script: 'ginkgo -r' 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/config.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | type Config struct { 4 | Sinks []Sink 5 | Level LogLevel 6 | Codec Codec 7 | EnableLOC bool 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/testdata/broken.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/Godeps/_workspace/src/github.com/docker/docker/pkg/archive/testdata/broken.tar -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libtrust/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes 2 | Josh Hawn (github: jlhawn) 3 | Derek McGowan (github: dmcgowan) 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package interrupthandler 4 | 5 | func SwallowSigQuit() { 6 | //noop 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/support/goraph/util/util.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "math" 4 | 5 | func Odd(n int) bool { 6 | return math.Mod(float64(n), 2.0) == 1.0 7 | } 8 | -------------------------------------------------------------------------------- /old/rootfs_provider/getuid.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package rootfs_provider 4 | 5 | import "os" 6 | 7 | func getuidgid(info os.FileInfo) (int, int, error) { 8 | panic("not supported") 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/xattr/layer.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/xattr/layer.tar -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /ci/nested-build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | image: docker:///cloudfoundry/garden-ci-ubuntu 3 | 4 | platform: linux 5 | 6 | inputs: 7 | - name: garden-linux 8 | 9 | run: 10 | path: garden-linux/scripts/concourse-test 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | func ReadMemInfo() (*MemInfo, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types.go 3 | 4 | package pty 5 | 6 | type ( 7 | _C_int int32 8 | _C_uint uint32 9 | ) 10 | -------------------------------------------------------------------------------- /ci/non-nested-build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | image: docker:///cloudfoundry/garden-ci-ubuntu 3 | 4 | platform: linux 5 | 6 | inputs: 7 | - name: garden-linux 8 | 9 | run: 10 | path: garden-linux/scripts/test-in-aws 11 | -------------------------------------------------------------------------------- /old/integration/wshd/noop_test.go: -------------------------------------------------------------------------------- 1 | package wshd_test 2 | 3 | import ( 4 | "testing" 5 | 6 | _ "github.com/onsi/ginkgo" 7 | _ "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestNoop(t *testing.T) { 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/sink.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | type Sink interface { 4 | AddRecord(record *Record) 5 | Flush() 6 | 7 | SetCodec(codec Codec) 8 | GetCodec() Codec 9 | } 10 | -------------------------------------------------------------------------------- /packer/rootfs/empty/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | ) 7 | 8 | func main() { 9 | fmt.Fprint(os.Stdout, "hello from stdout") 10 | fmt.Fprint(os.Stderr, "hello from stderr") 11 | } 12 | -------------------------------------------------------------------------------- /ci/clean-aws-instances.yml: -------------------------------------------------------------------------------- 1 | --- 2 | image: docker:///cloudfoundry/garden-ci-ubuntu 3 | 4 | platform: linux 5 | 6 | inputs: 7 | - name: garden-linux 8 | 9 | run: 10 | path: garden-linux/scripts/clean-aws-instances 11 | -------------------------------------------------------------------------------- /scripts/run-garden-remote-linux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # vim: set ft=sh 3 | 4 | set -e 5 | 6 | ssh -t vagrant@192.168.50.5 /vagrant/scripts/run-garden-linux \ 7 | -listenNetwork=tcp \ 8 | -listenAddr=:7031 \ 9 | "$@" 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | const SDKName = "aws-sdk-go" 5 | const SDKVersion = "0.5.0" 6 | -------------------------------------------------------------------------------- /integration/performance/README.md: -------------------------------------------------------------------------------- 1 | The tests in this directory are for manual performance testing and not part of CI. 2 | 3 | A local garden-linux must be running on port 7777. 4 | 5 | $GARDEN_PERFORMANCE must be set to enable this test. -------------------------------------------------------------------------------- /old/linux_backend/skeleton/lib/hook-child-before-pivot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o nounset 5 | set -o errexit 6 | 7 | cd $(dirname $0)/../ 8 | 9 | . etc/config 10 | 11 | # Placeholder 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 9 | ) 10 | -------------------------------------------------------------------------------- /network/configure_notlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package network 4 | 5 | import "github.com/pivotal-golang/lager" 6 | 7 | func NewConfigurer(log lager.Logger) Configurer { 8 | panic("not supported on this OS") 9 | } 10 | -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | image: cloudfoundry/warden-ci 2 | 3 | env: 4 | - COVERALLS_TOKEN={{coveralls_token}} 5 | - GOROOT=/usr/local/go 6 | - GOPATH=/var/cache/drone 7 | - PATH=$GOPATH/bin:$PATH 8 | 9 | script: 10 | - ./scripts/drone-test 11 | -------------------------------------------------------------------------------- /old/cgroups_manager/cgroups_manager.go: -------------------------------------------------------------------------------- 1 | package cgroups_manager 2 | 3 | type CgroupsManager interface { 4 | Set(subsystem, name, value string) error 5 | Get(subsystem, name string) (string, error) 6 | SubsystemPath(subsystem string) string 7 | } 8 | -------------------------------------------------------------------------------- /packer/rootfs/docker_registry/docker_registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "docker", 5 | "image": "registry", 6 | "export_path": "rootfs/docker_registry/docker_registry.tar" 7 | } 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mountinfo.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | type MountInfo struct { 4 | Id, Parent, Major, Minor int 5 | Root, Mountpoint, Opts, Optional string 6 | Fstype, Source, VfsOpts string 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/events/generate-events.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | OUT_DIR=`dirname $0` 4 | OUT_DIR=`cd $OUT_DIR && pwd` 5 | 6 | PROTO_DIR=$OUT_DIR/../dropsonde-protocol 7 | 8 | cd $PROTO_DIR 9 | ./generate-go.sh $OUT_DIR -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Lstat(path string) (*Stat, error) { 6 | // should not be called on cli code path 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/pty_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!darwin,!freebsd 2 | 3 | package pty 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func open() (pty, tty *os.File, err error) { 10 | return nil, nil, ErrUnsupported 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/example.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey 3 | aws_secret_access_key = secret 4 | aws_session_token = token 5 | 6 | [no_token] 7 | aws_access_key_id = accessKey 8 | aws_secret_access_key = secret 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/umask.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Umask(newmask int) (oldmask int, err error) { 10 | return syscall.Umask(newmask), nil 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/umask_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Umask(newmask int) (oldmask int, err error) { 6 | // should not be called on cli code path 7 | return 0, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/Makefile.dep: -------------------------------------------------------------------------------- 1 | barrier.o: barrier.c barrier.h util.h 2 | msg.o: msg.c msg.h 3 | pump.o: pump.c pump.h util.h 4 | un.o: un.c un.h util.h 5 | util.o: util.c util.h 6 | wsh.o: wsh.c msg.h pump.h un.h 7 | wshd.o: wshd.c barrier.h msg.h un.h util.h 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - tip 6 | install: 7 | - go get github.com/stretchr/testify 8 | - go get github.com/stvp/go-udp-testing 9 | - go get github.com/tobi/airbrake-go 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/test: -------------------------------------------------------------------------------- 1 | set -e 2 | cd `dirname $0` 3 | go fmt ./... 4 | go vet ./... 5 | GINKGO="ginkgo -r --race --randomizeAllSpecs --failOnPending --skipMeasurements" 6 | export DROPSONDE_HEARTBEAT_INTERVAL_SECS=0.375 7 | $GINKGO -cover -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ioctl.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import "syscall" 4 | 5 | func ioctl(fd, cmd, ptr uintptr) error { 6 | _, _, e := syscall.Syscall(syscall.SYS_IOCTL, fd, cmd, ptr) 7 | if e != 0 { 8 | return e 9 | } 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /hook/hook_suite_test.go: -------------------------------------------------------------------------------- 1 | package hook_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestHook(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Hook Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/linux_backend/src/Makefile: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | # Proxy any target to the Makefiles in the per-tool directories 4 | %: 5 | cd wsh && $(MAKE) $@ 6 | cd oom && $(MAKE) $@ 7 | cd nstar && $(MAKE) $@ 8 | cd repquota && $(MAKE) $@ 9 | 10 | .PHONY: default 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/emitter/responding_byte_emitter.go: -------------------------------------------------------------------------------- 1 | package emitter 2 | 3 | import "github.com/cloudfoundry/dropsonde/control" 4 | 5 | type RespondingByteEmitter interface { 6 | ByteEmitter 7 | Respond(*control.ControlMessage) 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/v7.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/v7.tar -------------------------------------------------------------------------------- /integration/test-images/preexisting_users/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox:latest 2 | 3 | RUN adduser -D alice && \ 4 | adduser -D bob 5 | 6 | USER alice 7 | RUN echo "hi from Alice" > /home/alice/alicesfile 8 | 9 | USER bob 10 | RUN echo "hi from Bob" > /home/bob/bobsfile 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/api/README.md: -------------------------------------------------------------------------------- 1 | This directory contains code pertaining to the Docker API: 2 | 3 | - Used by the docker client when communicating with the docker daemon 4 | 5 | - Used by third party tools wishing to interface with the docker daemon 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/engine/helpers_test.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | var globalTestID string 8 | 9 | func mkJob(t *testing.T, name string, args ...string) *Job { 10 | return New().Job(name, args...) 11 | } 12 | -------------------------------------------------------------------------------- /old/rootfs_provider/getuid_linux.go: -------------------------------------------------------------------------------- 1 | package rootfs_provider 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | ) 7 | 8 | func getuidgid(info os.FileInfo) (int, int, error) { 9 | return int(info.Sys().(*syscall.Stat_t).Uid), int(info.Sys().(*syscall.Stat_t).Gid), nil 10 | } 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | 6 | matrix: 7 | allow_failures: 8 | - go: tip 9 | 10 | install: 11 | - go get -v launchpad.net/gocheck 12 | - go get -v ./... 13 | - go build -v ./... 14 | -------------------------------------------------------------------------------- /network/network_suite_test.go: -------------------------------------------------------------------------------- 1 | package network_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestNetwork(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Network Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/logging/logging_suite_test.go: -------------------------------------------------------------------------------- 1 | package logging_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLogging(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Logging Suite") 13 | } 14 | -------------------------------------------------------------------------------- /process/process_suite_test.go: -------------------------------------------------------------------------------- 1 | package process_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestProcess(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Process Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big.tar -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Buf *byte 13 | } 14 | -------------------------------------------------------------------------------- /network/subnets/subnets_suite_test.go: -------------------------------------------------------------------------------- 1 | package subnets_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSubnets(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Subnets Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/transport/message_writer.go: -------------------------------------------------------------------------------- 1 | package transport 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | ) 7 | 8 | func WriteMessage(writer io.Writer, req interface{}) error { 9 | return json.NewEncoder(writer).Encode(req) 10 | } 11 | -------------------------------------------------------------------------------- /network/iptables/iptables_suite_test.go: -------------------------------------------------------------------------------- 1 | package iptables_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestIptables(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Iptables Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/port_pool/port_pool_suite_test.go: -------------------------------------------------------------------------------- 1 | package port_pool_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestPort_pool(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Port_pool Suite") 13 | } 14 | -------------------------------------------------------------------------------- /process_tracker/writer/writer_suite_test.go: -------------------------------------------------------------------------------- 1 | package writer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWriter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Writer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/image/graph.go: -------------------------------------------------------------------------------- 1 | package image 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver" 5 | ) 6 | 7 | type Graph interface { 8 | Get(id string) (*Image, error) 9 | ImageRoot(id string) string 10 | Driver() graphdriver.Driver 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/registry/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Sam Alba (@samalba) 2 | Joffrey Fuhrer (@shin-) 3 | Ken Cochrane (@kencochrane) 4 | Vincent Batts (@vbatts) 5 | Olivier Gambier (@dmp42) 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big-long.tar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/b/garden-linux/master/Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/testdata/writer-big-long.tar -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/backend.go: -------------------------------------------------------------------------------- 1 | package garden 2 | 3 | import "time" 4 | 5 | //go:generate counterfeiter . Backend 6 | 7 | type Backend interface { 8 | Client 9 | 10 | Start() error 11 | Stop() 12 | 13 | GraceTime(Container) time.Duration 14 | } 15 | -------------------------------------------------------------------------------- /linux_container/container_suite_test.go: -------------------------------------------------------------------------------- 1 | package linux_container_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestContainer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Container Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/system_info/system_info_suite_test.go: -------------------------------------------------------------------------------- 1 | package system_info_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSystemInfo(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "SystemInfo Suite") 13 | } 14 | -------------------------------------------------------------------------------- /packer/rootfs/fuse/provision.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | apt-get update && apt-get -y install \ 5 | fuse \ 6 | libfuse-dev \ 7 | pkg-config 8 | 9 | cd /usr/share/doc/libfuse-dev/examples && \ 10 | bash -c "gcc -Wall hello.c $(pkg-config fuse --cflags --libs) -o /usr/bin/hellofs" 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/.drone.yml: -------------------------------------------------------------------------------- 1 | image: cloudfoundry/garden-ci 2 | 3 | env: 4 | - COVERALLS_TOKEN={{coveralls_token}} 5 | - GOROOT=/usr/local/go 6 | - GOPATH=/var/cache/drone 7 | - PATH=$GOPATH/bin:$PATH 8 | 9 | script: 10 | - ./scripts/drone-test 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | cookbooks/ 3 | tmp/ 4 | .DS_Store 5 | out/ 6 | root/ 7 | *.coverprofile 8 | .rootfs/ 9 | linux_backend/bin/repquota 10 | linux_backend/skeleton/bin/* 11 | garden-test-rootfs.tar 12 | *.test 13 | .idea/* 14 | *.iml 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/rata/router_suite_test.go: -------------------------------------------------------------------------------- 1 | package rata_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRouter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Rata Suite") 13 | } 14 | -------------------------------------------------------------------------------- /linux_backend/linux_backend_suite_test.go: -------------------------------------------------------------------------------- 1 | package linux_backend_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLinuxbackend(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Linux Backend Suite") 13 | } 14 | -------------------------------------------------------------------------------- /network/bridgemgr/bridgemgr_suite_test.go: -------------------------------------------------------------------------------- 1 | package bridgemgr_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBridgeManager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Bridge Manager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gorilla/mux/README.md: -------------------------------------------------------------------------------- 1 | mux 2 | === 3 | [![Build Status](https://travis-ci.org/gorilla/mux.png?branch=master)](https://travis-ci.org/gorilla/mux) 4 | 5 | gorilla/mux is a powerful URL router and dispatcher. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/mux 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/internal/testingtsupport/testing_t_support_test.go: -------------------------------------------------------------------------------- 1 | package testingtsupport_test 2 | 3 | import ( 4 | . "github.com/onsi/gomega" 5 | 6 | "testing" 7 | ) 8 | 9 | func TestTestingT(t *testing.T) { 10 | RegisterTestingT(t) 11 | Ω(true).Should(BeTrue()) 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/ifrit_suite_test.go: -------------------------------------------------------------------------------- 1 | package ifrit_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestIfrit(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Ifrit Suite") 13 | } 14 | -------------------------------------------------------------------------------- /container_pool/container_pool_suite_test.go: -------------------------------------------------------------------------------- 1 | package container_pool_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestContainerPool(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Container Pool Suite") 13 | } 14 | -------------------------------------------------------------------------------- /integration/performance/performance_suite_test.go: -------------------------------------------------------------------------------- 1 | package performance_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestPerformance(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Performance Suite") 13 | } 14 | -------------------------------------------------------------------------------- /iodaemon/child_darwin.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | ) 7 | 8 | func child(executablePath string, argv []string) *exec.Cmd { 9 | return &exec.Cmd{ 10 | Path: executablePath, 11 | Args: argv, 12 | SysProcAttr: &syscall.SysProcAttr{}, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /network/hostname_notlinux.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package network 4 | 5 | type hostNameSetter struct{} 6 | 7 | func newHostname() *hostNameSetter { 8 | return &hostNameSetter{} 9 | } 10 | 11 | func (*hostNameSetter) SetHostname(hostName string) error { 12 | panic("not supported on this OS") 13 | } 14 | -------------------------------------------------------------------------------- /old/linux_backend/src/nstar/Makefile: -------------------------------------------------------------------------------- 1 | OPTIMIZATION?=-O0 2 | DEBUG?=-g -ggdb -rdynamic 3 | 4 | all: nstar 5 | 6 | clean: 7 | rm -f *.o nstar 8 | 9 | .PHONY: all clean 10 | 11 | nstar: nstar.o pwd.o 12 | $(CC) -static -o $@ $^ 13 | 14 | %.o: %.c 15 | $(CC) -c -Wall $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $< 16 | -------------------------------------------------------------------------------- /old/linux_backend/src/oom/Makefile: -------------------------------------------------------------------------------- 1 | OPTIMIZATION?=-O0 2 | DEBUG?=-g -ggdb -rdynamic 3 | 4 | all: oom 5 | 6 | clean: 7 | rm -f *.o oom 8 | 9 | .PHONY: all clean 10 | 11 | oom: oom.o 12 | $(CC) -o $@ $^ -lutil 13 | 14 | %.o: %.c 15 | $(CC) -c -Wall -D_GNU_SOURCE $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $< 16 | -------------------------------------------------------------------------------- /old/quota_manager/quota_manager_suite_test.go: -------------------------------------------------------------------------------- 1 | package quota_manager_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestQuota_manager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Quota Manager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-debug-server/README.md: -------------------------------------------------------------------------------- 1 | cf-debug-server 2 | =============== 3 | 4 | A helper function for running a pre-configured 5 | [pprof](http://golang.org/pkg/net/http/pprof/) server in go. 6 | 7 | ## License 8 | 9 | cf-debug-server is licensed under Apache 2.0. 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/spec/spec_suite_test.go: -------------------------------------------------------------------------------- 1 | package spec_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSpec(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Spec Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/types/types_suite_test.go: -------------------------------------------------------------------------------- 1 | package types_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTypes(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Types Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/lager/chug/chug_suite_test.go: -------------------------------------------------------------------------------- 1 | package chug_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestChug(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Chug Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/lager/lager_suite_test.go: -------------------------------------------------------------------------------- 1 | package lager_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Lager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/proxy/proxy_suite_test.go: -------------------------------------------------------------------------------- 1 | package proxy_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestProxy(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Proxy Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/un.h: -------------------------------------------------------------------------------- 1 | #ifndef UN_H 2 | #define UN_H 1 3 | 4 | int un_listen(const char *path); 5 | int un_connect(const char *path); 6 | int un_send_fds(int fd, char *data, int datalen, int *fds, int fdslen); 7 | int un_recv_fds(int fd, char *data, int datalen, int *fds, int fdslen); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/logs/logs_suite_test.go: -------------------------------------------------------------------------------- 1 | package logs_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestMetrics(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Logs Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/sigar_suite_test.go: -------------------------------------------------------------------------------- 1 | package sigar_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGosigar(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Gosigar Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/format/format_suite_test.go: -------------------------------------------------------------------------------- 1 | package format_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFormat(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Format Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/gbytes/gbuffer_suite_test.go: -------------------------------------------------------------------------------- 1 | package gbytes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGbytes(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Gbytes Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/ghttp/test_server_suite_test.go: -------------------------------------------------------------------------------- 1 | package ghttp_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGHTTP(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "GHTTP Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/grouper/group_suite_test.go: -------------------------------------------------------------------------------- 1 | package grouper_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGroup(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Grouper Suite") 13 | } 14 | -------------------------------------------------------------------------------- /network/hostname_linux.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | import "syscall" 4 | 5 | type hostNameSetter struct{} 6 | 7 | func newHostname() *hostNameSetter { 8 | return &hostNameSetter{} 9 | } 10 | 11 | func (*hostNameSetter) SetHostname(hostname string) error { 12 | return syscall.Sethostname([]byte(hostname)) 13 | } 14 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/untar_rootfses.sh: -------------------------------------------------------------------------------- 1 | set -e -x 2 | 3 | cd /opt/warden 4 | 5 | tars=$(find . -name '*.tar') 6 | for path in $tars; do 7 | dirname=$(echo $path | sed 's/\.\/\([a-zA-Z_\-]*\)\.tar/\1/') 8 | mkdir $dirname 9 | tar -xf $path -C ${PWD}/${dirname} 10 | done 11 | rm *.tar 12 | 13 | cd - 14 | 15 | -------------------------------------------------------------------------------- /process_tracker/process_tracker_suite_test.go: -------------------------------------------------------------------------------- 1 | package process_tracker_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestProcess_tracker(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Process Tracker Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/graph/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | Victor Vieux (@vieux) 3 | Michael Crosby (@crosbymichael) 4 | Cristian Staretu (@unclejack) 5 | Tibor Vass (@tiborvass) 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/ztypes_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs types_freebsd.go 3 | 4 | package pty 5 | 6 | const ( 7 | _C_SPECNAMELEN = 0x3f 8 | ) 9 | 10 | type fiodgnameArg struct { 11 | Len int32 12 | Pad_cgo_0 [4]byte 13 | Buf *byte 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/failer/failer_suite_test.go: -------------------------------------------------------------------------------- 1 | package failer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFailer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Failer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/writer/writer_suite_test.go: -------------------------------------------------------------------------------- 1 | package writer_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWriter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Writer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/restart/restart_suite_test.go: -------------------------------------------------------------------------------- 1 | package restart_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRestart(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Restart Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/garden_suite_test.go: -------------------------------------------------------------------------------- 1 | package garden_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGarden(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Garden Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/types_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build ignore 2 | 3 | package pty 4 | 5 | /* 6 | #include 7 | #include 8 | */ 9 | import "C" 10 | 11 | const ( 12 | _C_SPECNAMELEN = C.SPECNAMELEN /* max length of devicename */ 13 | ) 14 | 15 | type fiodgnameArg C.struct_fiodgname_arg 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | 5 | install: 6 | - go get -v ./... 7 | - go get github.com/onsi/ginkgo 8 | - go install github.com/onsi/ginkgo/ginkgo 9 | 10 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race 11 | -------------------------------------------------------------------------------- /old/bandwidth_manager/bandwidth_manager_suite_test.go: -------------------------------------------------------------------------------- 1 | package bandwidth_manager_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBandwidth_manager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Bandwidth_manager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /old/cgroups_manager/cgroups_manager_suite_test.go: -------------------------------------------------------------------------------- 1 | package cgroups_manager_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCgroups_manager(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Container Cgroups Manager Suite") 13 | } 14 | -------------------------------------------------------------------------------- /packer/rootfs/fuse/fuse.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "docker", 5 | "image": "ubuntu:14.04", 6 | "export_path": "rootfs/fuse/fuse.tar" 7 | } 8 | ], 9 | "provisioners": [ 10 | { 11 | "type": "shell", 12 | "script": "rootfs/fuse/provision.sh" 13 | } 14 | ] 15 | } 16 | 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/client/client_suite_test.go: -------------------------------------------------------------------------------- 1 | package client_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestClient(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Client Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/server/server_suite_test.go: -------------------------------------------------------------------------------- 1 | package server_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestServer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Server Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/emitter/emitter_suite_test.go: -------------------------------------------------------------------------------- 1 | package emitter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestEmitter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Emitter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/metrics/metrics_suite_test.go: -------------------------------------------------------------------------------- 1 | package metrics_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestMetrics(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Metrics Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func fromStatT(s *syscall.Stat_t) (*Stat, error) { 8 | return &Stat{size: s.Size, 9 | mode: s.Mode, 10 | uid: s.Uid, 11 | gid: s.Gid, 12 | rdev: s.Rdev, 13 | mtim: s.Mtim}, nil 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "errors" 7 | "syscall" 8 | ) 9 | 10 | func fromStatT(s *syscall.Win32FileAttributeData) (*Stat, error) { 11 | return nil, errors.New("fromStatT should not be called on windows path") 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/reporters_suite_test.go: -------------------------------------------------------------------------------- 1 | package reporters_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestReporters(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Reporters Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/test/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This package contains integration tests for the 6 | // golang.org/x/crypto/ssh package. 7 | package test 8 | -------------------------------------------------------------------------------- /iodaemon/child_linux.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | ) 7 | 8 | func child(executablePath string, argv []string) *exec.Cmd { 9 | return &exec.Cmd{ 10 | Path: executablePath, 11 | Args: argv, 12 | SysProcAttr: &syscall.SysProcAttr{ 13 | Pdeathsig: syscall.SIGKILL, 14 | }, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /old/linux_backend/src/repquota/Makefile: -------------------------------------------------------------------------------- 1 | OPTIMIZATION?=-O0 2 | DEBUG?=-g -ggdb -rdynamic 3 | 4 | all: repquota 5 | 6 | clean: 7 | rm -f *.o repquota 8 | 9 | .PHONY: all clean 10 | 11 | repquota: repquota.o 12 | $(CC) -o $@ $^ -lutil 13 | 14 | %.o: %.c 15 | $(CC) -c -Wall -D_GNU_SOURCE $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $< 16 | -------------------------------------------------------------------------------- /old/repository_fetcher/repository_fetcher_suite_test.go: -------------------------------------------------------------------------------- 1 | package repository_fetcher_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRepositoryFetcher(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "RepositoryFetcher Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testsuite/testsuite_suite_test.go: -------------------------------------------------------------------------------- 1 | package testsuite_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTestsuite(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Testsuite Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/leaf_node_suite_test.go: -------------------------------------------------------------------------------- 1 | package leafnodes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLeafNode(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "LeafNode Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/internal/assertion/assertion_suite_test.go: -------------------------------------------------------------------------------- 1 | package assertion_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAssertion(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Assertion Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/clock/fakeclock/fakeclock_suite_test.go: -------------------------------------------------------------------------------- 1 | package fakeclock_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFakeClock(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "FakeClock Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/http_server/http_server_suite_test.go: -------------------------------------------------------------------------------- 1 | package http_server_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestHttpServer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "HttpServer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/factories/factories_suite_test.go: -------------------------------------------------------------------------------- 1 | package factories_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestFactories(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Factories Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/signature/signature_suite_test.go: -------------------------------------------------------------------------------- 1 | package signature_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestUnmarshaller(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Signature Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount_linux.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import "syscall" 4 | 5 | const MsRemount = syscall.MS_REMOUNT 6 | 7 | func mount(source string, target string, fstype string, flags uintptr, data string) error { 8 | return syscall.Mount(source, target, fstype, flags, data) 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/remote_suite_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRemote(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Remote Spec Forwarding Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/emitter/logemitter/emitter_suite_test.go: -------------------------------------------------------------------------------- 1 | package logemitter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestEmitter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Log Emitter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/log_sender/log_sender_suite_test.go: -------------------------------------------------------------------------------- 1 | package log_sender_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestMetricSender(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "LogSender Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Lstat(path string) (*Stat, error) { 10 | s := &syscall.Stat_t{} 11 | err := syscall.Lstat(path, s) 12 | if err != nil { 13 | return nil, err 14 | } 15 | return fromStatT(s) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | func LUtimesNano(path string, ts []syscall.Timespec) error { 6 | return ErrNotSupportedPlatform 7 | } 8 | 9 | func UtimesNano(path string, ts []syscall.Timespec) error { 10 | return syscall.UtimesNano(path, ts) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/specrunner/spec_runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package specrunner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestSpecRunner(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Spec Runner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 4 | *.o 5 | *.a 6 | *.so 7 | 8 | # Folders 9 | _obj 10 | _test 11 | 12 | *.exe 13 | 14 | *.iml 15 | *.zpi 16 | *.zwi 17 | 18 | *.go-e 19 | 20 | # Log files 21 | *.log 22 | 23 | # IDE 24 | .idea/ 25 | 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4.1 5 | 6 | script: ./bin/test -skip="wshd Suite" -skipMeasurements -skip=Lifecycle 7 | 8 | env: 9 | global: 10 | - secure: PBR1JWF0XnZG8vHGGKVAHZ++Pgso9k2AYdPGAKF9qN1cv4Kc/b09R2yEIMgvZdPL25fmAkb6O2R6NNwmNUBwpuNGpI2fVEOFgsPWaYuj2Kk31DMqMDC9arWbyFE2+2cocj5r5fF+QDsKgQa7VHJ1Gge5145f3qjPlg2JUgmjXpQ= 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/server/timebomb/timebomb_suite_test.go: -------------------------------------------------------------------------------- 1 | package timebomb_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestTimeBomb(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "TimeBomb Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package btrfs 4 | 5 | import ( 6 | "testing" 7 | ) 8 | 9 | func TestBuildVersion(t *testing.T) { 10 | if len(BtrfsBuildVersion()) == 0 { 11 | t.Errorf("expected output from btrfs build version, but got empty string") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/passwordless_sudo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | if [ -z `getent group admin` ]; then 6 | groupadd -r admin 7 | fi 8 | usermod -a -G admin root 9 | 10 | sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers 11 | sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/server/bomberman/bomberman_suite_test.go: -------------------------------------------------------------------------------- 1 | package bomberman_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestBomberman(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Bomberman Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/metric_sender/metric_sender_suite_test.go: -------------------------------------------------------------------------------- 1 | package metric_sender_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestMetricSender(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "MetricSender Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/runtime_stats/runtime_stats_suite_test.go: -------------------------------------------------------------------------------- 1 | package runtime_stats_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestRuntimeStats(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "RuntimeStats Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mounter_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | func mount(device, target, mType string, flag uintptr, data string) error { 6 | panic("Not implemented") 7 | } 8 | 9 | func unmount(target string, flag int) error { 10 | panic("Not implemented") 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/codelocation/code_location_suite_test.go: -------------------------------------------------------------------------------- 1 | package codelocation_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCodelocation(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "CodeLocation Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package aufs 4 | 5 | import "errors" 6 | 7 | const MsRemount = 0 8 | 9 | func mount(source string, target string, fstype string, flags uintptr, data string) (err error) { 10 | return errors.New("mount is not implemented on darwin") 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/kernel/uname_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package kernel 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | type Utsname struct { 10 | Release [65]byte 11 | } 12 | 13 | func uname() (*Utsname, error) { 14 | return nil, errors.New("Kernel version detection is available only on linux") 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/xattrs_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package system 4 | 5 | func Lgetxattr(path string, attr string) ([]byte, error) { 6 | return nil, ErrNotSupportedPlatform 7 | } 8 | 9 | func Lsetxattr(path string, attr string, data []byte, flags int) error { 10 | return ErrNotSupportedPlatform 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/containernode/container_node_suite_test.go: -------------------------------------------------------------------------------- 1 | package containernode_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestContainernode(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Containernode Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/lager/ginkgoreporter/ginkgoreporter_suite_test.go: -------------------------------------------------------------------------------- 1 | package ginkgoreporter_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestGinkgoReporter(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "GinkgoReporter Suite") 13 | } 14 | -------------------------------------------------------------------------------- /scripts/test_from_vim: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | ARGS=$@ 6 | 7 | if egrep -q integration <(echo "$ARGS"); then 8 | scripts/remote-fly -nodes 4 $ARGS 9 | elif [ -d $ARGS ] && 10 | [ "$(find $ARGS -maxdepth 1 -name '*_linux_test.go')" != "" ]; then 11 | scripts/test-in-docker $ARGS 12 | else 13 | ginkgo -r -race $ARGS 14 | fi 15 | 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-debug-server/cf_debug_server_suite_test.go: -------------------------------------------------------------------------------- 1 | package cf_debug_server_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestCfDebugServer(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "CfDebugServer Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mountinfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | ) 9 | 10 | func parseMountTable() ([]*MountInfo, error) { 11 | return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/parsers/kernel/uname_linux.go: -------------------------------------------------------------------------------- 1 | package kernel 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | type Utsname syscall.Utsname 8 | 9 | func uname() (*syscall.Utsname, error) { 10 | uts := &syscall.Utsname{} 11 | 12 | if err := syscall.Uname(uts); err != nil { 13 | return nil, err 14 | } 15 | return uts, nil 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/specrunner/random_id.go: -------------------------------------------------------------------------------- 1 | package specrunner 2 | 3 | import ( 4 | "crypto/rand" 5 | "fmt" 6 | ) 7 | 8 | func randomID() string { 9 | b := make([]byte, 8) 10 | _, err := rand.Read(b) 11 | if err != nil { 12 | return "" 13 | } 14 | return fmt.Sprintf("%x-%x-%x-%x", b[0:2], b[2:4], b[4:6], b[6:8]) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/internal/asyncassertion/async_assertion_suite_test.go: -------------------------------------------------------------------------------- 1 | package asyncassertion_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestAsyncAssertion(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "AsyncAssertion Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go: -------------------------------------------------------------------------------- 1 | // +build freebsd openbsd netbsd dragonfly darwin linux 2 | 3 | package interrupthandler 4 | 5 | import ( 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | ) 10 | 11 | func SwallowSigQuit() { 12 | c := make(chan os.Signal, 1024) 13 | signal.Notify(c, syscall.SIGQUIT) 14 | } 15 | -------------------------------------------------------------------------------- /scripts/run-garden-linux: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | # vim: set ft=sh 3 | 4 | set -e 5 | 6 | cd $(dirname $0)/.. 7 | 8 | go build -o out/garden 9 | 10 | sudo ./out/garden \ 11 | -depot=/opt/garden/containers \ 12 | -bin=$PWD/linux_backend/bin \ 13 | -rootfs=/opt/warden/rootfs \ 14 | -snapshots=/opt/garden/snapshots \ 15 | -overlays=/opt/garden/overlays \ 16 | "$@" 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Vagrantfile 2 | .vagrant/ 3 | cookbooks/ 4 | tmp/ 5 | .DS_Store 6 | out/ 7 | root/ 8 | *.coverprofile* 9 | *.trace 10 | .rootfs/ 11 | old/linux_backend/bin/repquota 12 | old/linux_backend/skeleton/bin/* 13 | old/linux_backend/skeleton/lib/hook 14 | scripts/amimgr/amimgr 15 | scripts/awsreaper/awsreaper 16 | garden-test-rootfs.tar 17 | *.test 18 | .idea/* 19 | *.iml 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/time_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package archive 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 11 | nsec := int64(0) 12 | if !time.IsZero() { 13 | nsec = time.UnixNano() 14 | } 15 | return syscall.NsecToTimespec(nsec) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/utils/random.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "crypto/rand" 5 | "encoding/hex" 6 | "io" 7 | ) 8 | 9 | func RandomString() string { 10 | id := make([]byte, 32) 11 | 12 | if _, err := io.ReadFull(rand.Reader, id); err != nil { 13 | panic(err) // This shouldn't happen 14 | } 15 | return hex.EncodeToString(id) 16 | } 17 | -------------------------------------------------------------------------------- /old/integration/wshd/wshd_suite_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package wshd_test 4 | 5 | import ( 6 | "os" 7 | 8 | . "github.com/onsi/ginkgo" 9 | . "github.com/onsi/gomega" 10 | 11 | "testing" 12 | ) 13 | 14 | func TestWshd(t *testing.T) { 15 | if os.Getenv("GARDEN_TEST_ROOTFS") != "" { 16 | RegisterFailHandler(Fail) 17 | RunSpecs(t, "wshd Suite") 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /old/rootfs_provider/uid_mapper.go: -------------------------------------------------------------------------------- 1 | package rootfs_provider 2 | 3 | type Mapping struct { 4 | FromID int 5 | ToID int 6 | Size int 7 | } 8 | 9 | type MappingList []Mapping 10 | 11 | func (m MappingList) Map(id int) int { 12 | for _, m := range m { 13 | if delta := id - m.FromID; delta < m.Size { 14 | return m.ToID + delta 15 | } 16 | } 17 | 18 | return id 19 | } 20 | -------------------------------------------------------------------------------- /packer/rootfs/empty/scripts/compile_binary: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DOCKER_IMAGE=${DOCKER_IMAGE:-cloudfoundry/garden-ci-ubuntu} 4 | 5 | docker run -it \ 6 | --rm \ 7 | -v $GOPATH:/root/go \ 8 | $DOCKER_IMAGE \ 9 | /bin/bash -l -c "cd /root/go/src/github.com/cloudfoundry-incubator/garden-linux/packer/rootfs/empty && go build hello.go" 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/dropsonde_marshaller/dropsonde_marshaller_suite_test.go: -------------------------------------------------------------------------------- 1 | package dropsonde_marshaller_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestUnmarshaller(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Dropsonde Marshaller Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/envelope_extensions/envelope_extensions_suite_test.go: -------------------------------------------------------------------------------- 1 | package envelope_extensions_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestEnvelopeExtensions(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "EnvelopeExtensions Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version_none.go: -------------------------------------------------------------------------------- 1 | // +build linux,btrfs_noversion 2 | 3 | package btrfs 4 | 5 | // TODO(vbatts) remove this work-around once supported linux distros are on 6 | // btrfs utililties of >= 3.16.1 7 | 8 | func BtrfsBuildVersion() string { 9 | return "-" 10 | } 11 | func BtrfsLibVersion() int { 12 | return -1 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/types/code_location.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | type CodeLocation struct { 8 | FileName string 9 | LineNumber int 10 | FullStackTrace string 11 | } 12 | 13 | func (codeLocation CodeLocation) String() string { 14 | return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/clock/ticker.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Ticker interface { 6 | C() <-chan time.Time 7 | Stop() 8 | } 9 | 10 | type realTicker struct { 11 | t *time.Ticker 12 | } 13 | 14 | func (t *realTicker) C() <-chan time.Time { 15 | return t.t.C 16 | } 17 | 18 | func (t *realTicker) Stop() { 19 | t.t.Stop() 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/instrumented_handler/instrumented_handler_suite_test.go: -------------------------------------------------------------------------------- 1 | package instrumented_handler_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestInstrumentedHandler(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "InstrumentedHandler Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gunk/command_runner/command_runner.go: -------------------------------------------------------------------------------- 1 | package command_runner 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | ) 7 | 8 | type CommandRunner interface { 9 | Run(*exec.Cmd) error 10 | Start(*exec.Cmd) error 11 | Background(*exec.Cmd) error 12 | 13 | Wait(*exec.Cmd) error 14 | Kill(*exec.Cmd) error 15 | Signal(*exec.Cmd, os.Signal) error 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd,!darwin 2 | 3 | package system 4 | 5 | import "syscall" 6 | 7 | func LUtimesNano(path string, ts []syscall.Timespec) error { 8 | return ErrNotSupportedPlatform 9 | } 10 | 11 | func UtimesNano(path string, ts []syscall.Timespec) error { 12 | return ErrNotSupportedPlatform 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor.go: -------------------------------------------------------------------------------- 1 | package remote 2 | 3 | /* 4 | The OutputInterceptor is used by the ForwardingReporter to 5 | intercept and capture all stdin and stderr output during a test run. 6 | */ 7 | type OutputInterceptor interface { 8 | StartInterceptingOutput() error 9 | StopInterceptingAndReturnOutput() (string, error) 10 | } 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/dropsonde_suite_test.go: -------------------------------------------------------------------------------- 1 | package dropsonde_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "io/ioutil" 8 | "log" 9 | "testing" 10 | ) 11 | 12 | func TestDropsonde(t *testing.T) { 13 | log.SetOutput(ioutil.Discard) 14 | RegisterFailHandler(Fail) 15 | RunSpecs(t, "Dropsonde Suite") 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/dropsonde_unmarshaller/dropsonde_unmarshaller_suite_test.go: -------------------------------------------------------------------------------- 1 | package dropsonde_unmarshaller_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestUnmarshaller(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Dropsonde Unmarshaller Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/promise/promise.go: -------------------------------------------------------------------------------- 1 | package promise 2 | 3 | // Go is a basic promise implementation: it wraps calls a function in a goroutine, 4 | // and returns a channel which will later return the function's return value. 5 | func Go(f func() error) chan error { 6 | ch := make(chan error, 1) 7 | go func() { 8 | ch <- f() 9 | }() 10 | return ch 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func fromStatT(s *syscall.Stat_t) (*Stat, error) { 10 | return &Stat{size: s.Size, 11 | mode: uint32(s.Mode), 12 | uid: s.Uid, 13 | gid: s.Gid, 14 | rdev: uint64(s.Rdev), 15 | mtim: s.Mtimespec}, nil 16 | } 17 | -------------------------------------------------------------------------------- /scripts/test-in-docker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DOCKER_IMAGE=${DOCKER_IMAGE:-cloudfoundry/garden-ci-ubuntu} 4 | 5 | ARGS="$@" 6 | docker run --privileged \ 7 | -it \ 8 | --rm \ 9 | -v $GOPATH:/root/go \ 10 | $DOCKER_IMAGE \ 11 | /bin/bash -l -c "cd /root/go/src/github.com/cloudfoundry-incubator/garden-linux && scripts/drone-test $ARGS" 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gunk/command_runner/linux_command_runner/linux_command_runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package linux_command_runner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestLinuxCommandRunner(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Linux Command Runner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_darwin.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/time_linux.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "syscall" 5 | "time" 6 | ) 7 | 8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) { 9 | if time.IsZero() { 10 | // Return UTIME_OMIT special value 11 | ts.Sec = 0 12 | ts.Nsec = ((1 << 30) - 2) 13 | return 14 | } 15 | return syscall.NsecToTimespec(time.UnixNano()) 16 | } 17 | -------------------------------------------------------------------------------- /packer/rootfs/ubuntu/ubuntu.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "docker", 5 | "image": "ubuntu:14.04", 6 | "export_path": "rootfs/ubuntu/ubuntu.tar" 7 | } 8 | ], 9 | "provisioners": [ 10 | { 11 | "type": "shell", 12 | "inline": [ 13 | "apt-get update && apt-get -y install iptables quota && apt-get clean" 14 | ] 15 | } 16 | ] 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/syslog/syslog_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package syslog provides a simple interface to the system log service. 6 | package syslog 7 | 8 | // BUG(brainman): This package is not implemented on Windows yet. 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gunk/command_runner/windows_command_runner/windows_command_runner_suite_test.go: -------------------------------------------------------------------------------- 1 | package windows_command_runner_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestWindowsCommandRunner(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Windows Command Runner Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/mknod_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | func Mknod(path string, mode uint32, dev int) error { 6 | // should not be called on cli code path 7 | return ErrNotSupportedPlatform 8 | } 9 | 10 | func Mkdev(major int64, minor int64) uint32 { 11 | panic("Mkdev not implemented on windows, should not be called on cli code") 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4 4 | 5 | install: 6 | - go get -v ./... 7 | - go get golang.org/x/tools/cmd/cover 8 | - go get github.com/onsi/gomega 9 | - go install github.com/onsi/ginkgo/ginkgo 10 | - export PATH=$PATH:$HOME/gopath/bin 11 | 12 | script: $HOME/gopath/bin/ginkgo -r --randomizeAllSpecs --failOnPending --randomizeSuites --race 13 | -------------------------------------------------------------------------------- /scripts/concourse-test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # vim: set ft=sh 3 | 4 | export GOROOT=/usr/local/go 5 | export PATH=$GOROOT/bin:$PATH 6 | 7 | export GOPATH=$PWD/gopath 8 | export PATH=$GOPATH/bin:$PATH 9 | 10 | mkdir -p $GOPATH/src/github.com/cloudfoundry-incubator 11 | cp -r garden-linux $GOPATH/src/github.com/cloudfoundry-incubator/garden-linux 12 | 13 | cd $(dirname $0)/.. 14 | 15 | ./scripts/drone-test "$@" 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/instrumented_round_tripper/instrumented_round_tripper_suite_test.go: -------------------------------------------------------------------------------- 1 | package instrumented_round_tripper_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestInstrumentedRoundTripper(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "InstrumentedRoundTripper Suite") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/client/connection/connection_suite_test.go: -------------------------------------------------------------------------------- 1 | package connection_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func TestConnection(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Connection Suite") 13 | } 14 | 15 | func uint64ptr(n uint64) *uint64 { 16 | return &n 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/writercloser.go: -------------------------------------------------------------------------------- 1 | package tarsum 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | type writeCloseFlusher interface { 8 | io.WriteCloser 9 | Flush() error 10 | } 11 | 12 | type nopCloseFlusher struct { 13 | io.Writer 14 | } 15 | 16 | func (n *nopCloseFlusher) Close() error { 17 | return nil 18 | } 19 | 20 | func (n *nopCloseFlusher) Flush() error { 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-lager/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/server/helpers_test.go: -------------------------------------------------------------------------------- 1 | package server_test 2 | 3 | import ( 4 | "net" 5 | ) 6 | 7 | func ErrorDialing(network, addr string) func() error { 8 | return func() error { 9 | conn, err := net.Dial(network, addr) 10 | if err == nil { 11 | conn.Close() 12 | } 13 | 14 | return err 15 | } 16 | } 17 | 18 | func uint64ptr(n uint64) *uint64 { 19 | return &n 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.coverprofile 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/integration_test/integration_test_suite_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "io/ioutil" 8 | "log" 9 | "testing" 10 | ) 11 | 12 | func TestIntegrationTest(t *testing.T) { 13 | log.SetOutput(ioutil.Discard) 14 | RegisterFailHandler(Fail) 15 | RunSpecs(t, "IntegrationTest Suite") 16 | } 17 | -------------------------------------------------------------------------------- /packer/garden-ci/Vagrantfile.template: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vim: set ft=ruby : 3 | 4 | Vagrant.configure(2) do |config| 5 | config.vm.box = "cloudfoundry/garden-ci-ubuntu" 6 | 7 | go_path = ENV['GOPATH'] 8 | config.vm.synced_folder(go_path, "/home/vagrant/go") if go_path 9 | 10 | config.vm.provider "virtualbox" do |vb| 11 | vb.memory = "8192" #We need quite a bit of memory 12 | vb.cpus = "4" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/testdata/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata 9 | -------------------------------------------------------------------------------- /network/configure_linux.go: -------------------------------------------------------------------------------- 1 | package network 2 | 3 | import "github.com/pivotal-golang/lager" 4 | 5 | import "github.com/cloudfoundry-incubator/garden-linux/network/devices" 6 | 7 | func NewConfigurer(log lager.Logger) Configurer { 8 | return &NetworkConfigurer{ 9 | Hostname: newHostname(), 10 | Link: devices.Link{}, 11 | Bridge: devices.Bridge{}, 12 | Veth: devices.VethCreator{}, 13 | Logger: log, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/mktypes.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GOOSARCH="${GOOS}_${GOARCH}" 4 | case "$GOOSARCH" in 5 | _* | *_ | _) 6 | echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 7 | exit 1 8 | ;; 9 | esac 10 | 11 | GODEFS="go tool cgo -godefs" 12 | 13 | $GODEFS types.go |gofmt > ztypes_$GOARCH.go 14 | 15 | case $GOOS in 16 | freebsd) 17 | $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go 18 | ;; 19 | esac 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "syscall" 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | const ioctlWriteTermios = syscall.TIOCSETA 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-lager/README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/cloudfoundry-incubator/cf-lager.svg?branch=master)](https://travis-ci.org/cloudfoundry-incubator/cf-lager) 2 | cf-lager 3 | ======== 4 | 5 | A thin CF-specific wrapper around [github.com/pivotal-golang/lager](https://github.com/pivotal-golang/lager) 6 | 7 | To use: simply import in your main.go and call cf_lager.New(COMPONENT_NAME) to get a logger. 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/client/connection/stdin_writer.go: -------------------------------------------------------------------------------- 1 | package connection 2 | 3 | type stdinWriter struct { 4 | stream *processStream 5 | } 6 | 7 | func (w *stdinWriter) Write(d []byte) (int, error) { 8 | err := w.stream.WriteStdin(d) 9 | if err != nil { 10 | return 0, err 11 | } 12 | 13 | return len(d), nil 14 | } 15 | 16 | func (w *stdinWriter) Close() error { 17 | return w.stream.CloseStdin() 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/sigar_util.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 VMware, Inc. 2 | 3 | package sigar 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | func bytePtrToString(ptr *int8) string { 10 | bytes := (*[10000]byte)(unsafe.Pointer(ptr)) 11 | 12 | n := 0 13 | for bytes[n] != 0 { 14 | n++ 15 | } 16 | 17 | return string(bytes[0:n]) 18 | } 19 | 20 | func chop(buf []byte) []byte { 21 | return buf[0 : len(buf)-1] 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go: -------------------------------------------------------------------------------- 1 | package leafnodes 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/types" 5 | ) 6 | 7 | type BasicNode interface { 8 | Type() types.SpecComponentType 9 | Run() (types.SpecState, types.SpecFailure) 10 | CodeLocation() types.CodeLocation 11 | } 12 | 13 | type SubjectNode interface { 14 | BasicNode 15 | 16 | Text() string 17 | Flag() types.FlagType 18 | Samples() int 19 | } 20 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #define fcntl_mix_cloexec(fd) fcntl_set_cloexec((fd), 1) 5 | #define fcntl_mix_nonblock(fd) fcntl_set_nonblock((fd), 1) 6 | 7 | void fcntl_set_cloexec(int fd, int on); 8 | void fcntl_set_nonblock(int fd, int on); 9 | int hook(const char *p1, const char *p2); 10 | int run(const char *p1, const char *p2); 11 | void setproctitle(char **argv, const char *title); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/doc.go: -------------------------------------------------------------------------------- 1 | // Package pty provides functions for working with Unix terminals. 2 | package pty 3 | 4 | import ( 5 | "errors" 6 | "os" 7 | ) 8 | 9 | // ErrUnsupported is returned if a function is not 10 | // available on the current platform. 11 | var ErrUnsupported = errors.New("unsupported") 12 | 13 | // Opens a pty and its corresponding tty. 14 | func Open() (pty, tty *os.File, err error) { 15 | return open() 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/archive/archive_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package archive 4 | 5 | import ( 6 | "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar" 7 | ) 8 | 9 | func setHeaderForSpecialDevice(hdr *tar.Header, ta *tarAppender, name string, stat interface{}) (nlink uint32, inode uint64, err error) { 10 | // do nothing. no notion of Rdev, Inode, Nlink in stat on Windows 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /scripts/remote-fly-hijack: -------------------------------------------------------------------------------- 1 | # Run fly on our remote garden-ci server 2 | 3 | if [ -n "$ATC_URL" ]; then 4 | echo "ATC_URL already set, this script will ignore this." 5 | fi 6 | 7 | if [ -z "$GARDEN_REMOTE_ATC_URL" ]; then 8 | echo "Need GARDEN_REMOTE_ATC_URL to be set" 9 | exit 1 10 | fi 11 | 12 | # GARDEN_REMOTE_ATC_URL is set 13 | 14 | echo "Using GARDEN_REMOTE_ATC_URL..." 15 | echo "fly hijack $*" 16 | ATC_URL=$GARDEN_REMOTE_ATC_URL fly hijack $* 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/utils/tmpdir.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | ) 7 | 8 | // TempDir returns the default directory to use for temporary files. 9 | func TempDir(rootDir string) (string, error) { 10 | var tmpDir string 11 | if tmpDir = os.Getenv("DOCKER_TMPDIR"); tmpDir == "" { 12 | tmpDir = filepath.Join(rootDir, "tmp") 13 | } 14 | err := os.MkdirAll(tmpDir, 0700) 15 | return tmpDir, err 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/json_codec.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type JsonCodec struct { 8 | } 9 | 10 | func NewJsonCodec() Codec { 11 | return new(JsonCodec) 12 | } 13 | 14 | func (j *JsonCodec) EncodeRecord(record *Record) ([]byte, error) { 15 | b, err := json.Marshal(record) 16 | if err != nil { 17 | return json.Marshal(map[string]string{"error": err.Error()}) 18 | } 19 | 20 | return b, err 21 | } 22 | -------------------------------------------------------------------------------- /scripts/add-route: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Adding the following route entry to your local route table to enable direct container access. Your sudo password may be required." 4 | echo " - net 10.254.0.0/19 via 192.168.50.5" 5 | if [ `uname` = "Darwin" ]; then 6 | sudo route delete -net 10.254.0.0/19 192.168.50.5 > /dev/null 2>&1 7 | sudo route add -net 10.254.0.0/19 192.168.50.5 8 | elif [ `uname` = "Linux" ]; then 9 | sudo route add -net 10.254.0.0/19 gw 192.168.50.5 10 | fi 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/api/api_unit_test.go: -------------------------------------------------------------------------------- 1 | package garden 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestJsonContentType(t *testing.T) { 8 | if !MatchesContentType("application/json", "application/json") { 9 | t.Fail() 10 | } 11 | 12 | if !MatchesContentType("application/json; charset=utf-8", "application/json") { 13 | t.Fail() 14 | } 15 | 16 | if MatchesContentType("dockerapplication/json", "application/json") { 17 | t.Fail() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /site-cookbooks/garden/recipes/dev.rb: -------------------------------------------------------------------------------- 1 | file "/etc/profile.d/gopath.sh" do 2 | content <<-EOF 3 | export GOPATH=/go 4 | export PATH=/go/bin:$PATH 5 | 6 | function goto { 7 | local p 8 | local f 9 | 10 | for p in `echo $GOPATH | tr ':' '\n'`; do 11 | f=`find ${p}/src -maxdepth 3 -type d | grep ${1} | head -n 1` 12 | if [ -n "$f" ]; then 13 | cd $f 14 | return 15 | fi 16 | done 17 | } 18 | 19 | export GARDEN_TEST_ROOTFS=/opt/warden/rootfs 20 | EOF 21 | end 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/aufs/mount.go: -------------------------------------------------------------------------------- 1 | package aufs 2 | 3 | import ( 4 | "os/exec" 5 | "syscall" 6 | 7 | log "github.com/Sirupsen/logrus" 8 | ) 9 | 10 | func Unmount(target string) error { 11 | if err := exec.Command("auplink", target, "flush").Run(); err != nil { 12 | log.Errorf("[warning]: couldn't run auplink before unmount: %s", err) 13 | } 14 | if err := syscall.Unmount(target, 0); err != nil { 15 | return err 16 | } 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /old/rootfs_provider/rootfs_provider_suite_test.go: -------------------------------------------------------------------------------- 1 | package rootfs_provider_test 2 | 3 | import ( 4 | "net/url" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | 9 | "testing" 10 | ) 11 | 12 | func parseURL(str string) *url.URL { 13 | parsedURL, err := url.Parse(str) 14 | Expect(err).ToNot(HaveOccurred()) 15 | 16 | return parsedURL 17 | } 18 | 19 | func TestRootfsProvider(t *testing.T) { 20 | RegisterFailHandler(Fail) 21 | RunSpecs(t, "RootfsProvider Suite") 22 | } 23 | -------------------------------------------------------------------------------- /scripts/clean-aws-instances: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | set -x 4 | 5 | if [ -z $GOPATH ]; then 6 | export GOROOT=/usr/local/go 7 | export GOPATH=$HOME/go 8 | export PATH=$GOROOT/bin:$PATH 9 | export PATH=$GOPATH/bin:$PATH 10 | fi 11 | 12 | go get github.com/awslabs/aws-sdk-go/aws 13 | go get github.com/awslabs/aws-sdk-go/service/ec2 14 | 15 | cd $(dirname $0)/.. 16 | 17 | go build -o scripts/awsreaper/awsreaper scripts/awsreaper/main.go 18 | 19 | ./scripts/awsreaper/awsreaper 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/config_test.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | import ( 4 | . "launchpad.net/gocheck" 5 | ) 6 | 7 | type ConfigSuite struct { 8 | } 9 | 10 | var _ = Suite(&ConfigSuite{}) 11 | 12 | func (s *ConfigSuite) TestReInitLevel(c *C) { 13 | levels := []LogLevel{LOG_INFO, LOG_DEBUG, LOG_WARN} 14 | 15 | for _, level := range levels { 16 | Init(&Config{Level: level}) 17 | 18 | l := NewLogger("reinit") 19 | c.Assert(l.Level(), Equals, level) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /old/linux_backend/src/repquota/README.md: -------------------------------------------------------------------------------- 1 | # repquota 2 | 3 | This program has similar functionality to `repquota` provided by the standard 4 | quota packages. One difference is that it does not require you to `sync` the 5 | filesystem before calling it, and always returns up-to-date quota usage and 6 | limits. 7 | 8 | Another difference is that it allows the user to specify a list of UIDs for 9 | which to query the quota usage and limits, and does not print out the quota 10 | usage and limits for all users. -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/engine/hack.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | type Hack map[string]interface{} 4 | 5 | func (eng *Engine) Hack_GetGlobalVar(key string) interface{} { 6 | if eng.hack == nil { 7 | return nil 8 | } 9 | val, exists := eng.hack[key] 10 | if !exists { 11 | return nil 12 | } 13 | return val 14 | } 15 | 16 | func (eng *Engine) Hack_SetGlobalVar(key string, val interface{}) { 17 | if eng.hack == nil { 18 | eng.hack = make(Hack) 19 | } 20 | eng.hack[key] = val 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/bmizerany/pat/bench_test.go: -------------------------------------------------------------------------------- 1 | package pat 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | ) 7 | 8 | func BenchmarkPatternMatching(b *testing.B) { 9 | p := New() 10 | p.Get("/hello/:name", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})) 11 | for n := 0; n < b.N; n++ { 12 | b.StopTimer() 13 | r, err := http.NewRequest("GET", "/hello/blake", nil) 14 | if err != nil { 15 | panic(err) 16 | } 17 | b.StartTimer() 18 | p.ServeHTTP(nil, r) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/meminfo.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | // MemInfo contains memory statistics of the host system. 4 | type MemInfo struct { 5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the 6 | // kernel binary code). 7 | MemTotal int64 8 | 9 | // Amount of free memory. 10 | MemFree int64 11 | 12 | // Total amount of swap space available. 13 | SwapTotal int64 14 | 15 | // Amount of swap space that is currently unused. 16 | SwapFree int64 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libtrust/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package libtrust provides an interface for managing authentication and 3 | authorization using public key cryptography. Authentication is handled 4 | using the identity attached to the public key and verified through TLS 5 | x509 certificates, a key challenge, or signature. Authorization and 6 | access control is managed through a trust graph distributed between 7 | both remote trust servers and locally cached and managed data. 8 | */ 9 | package libtrust 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/clock/timer.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Timer interface { 6 | C() <-chan time.Time 7 | Reset(d time.Duration) bool 8 | Stop() bool 9 | } 10 | 11 | type realTimer struct { 12 | t *time.Timer 13 | } 14 | 15 | func (t *realTimer) C() <-chan time.Time { 16 | return t.t.C 17 | } 18 | 19 | func (t *realTimer) Reset(d time.Duration) bool { 20 | return t.t.Reset(d) 21 | } 22 | 23 | func (t *realTimer) Stop() bool { 24 | return t.t.Stop() 25 | } 26 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/pwd.h: -------------------------------------------------------------------------------- 1 | #ifndef PWD_H 2 | #define PWD_H 3 | 4 | #include 5 | 6 | #define getpwnam __wshd_getpwnam 7 | 8 | struct passwd { 9 | char *pw_name; /* Username. */ 10 | char *pw_passwd; /* Password. */ 11 | uint32_t pw_uid; /* User ID. */ 12 | uint32_t pw_gid; /* Group ID. */ 13 | char *pw_gecos; /* Real name. */ 14 | char *pw_dir; /* Home directory. */ 15 | char *pw_shell; /* Shell program. */ 16 | }; 17 | 18 | struct passwd *getpwnam(const char *name); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) [2009-2011] VMware, Inc. All Rights Reserved. 2 | 3 | This product is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this product except in compliance with the License. 5 | 6 | This product includes a number of subcomponents with 7 | separate copyright notices and license terms. Your use of these 8 | subcomponents is subject to the terms and conditions of the 9 | subcomponent's license, as noted in the LICENSE file. -------------------------------------------------------------------------------- /old/linux_backend/bin/create.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o xtrace 5 | set -o nounset 6 | set -o errexit 7 | shopt -s nullglob 8 | 9 | cd $(dirname "${0}")/.. 10 | 11 | if [ $# -ne 1 ]; then 12 | echo "Usage: ${0} " 13 | exit 1 14 | fi 15 | 16 | target=${1} 17 | 18 | if [ ! -d ${target} ]; then 19 | echo "\"${target}\" does not exist, aborting..." 20 | exit 1 21 | fi 22 | 23 | cp -r skeleton/* "${target}"/. 24 | unshare -m "${target}"/setup.sh 25 | echo ${target} 26 | -------------------------------------------------------------------------------- /old/linux_backend/bin/destroy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o nounset 5 | set -o errexit 6 | shopt -s nullglob 7 | 8 | if [ $# -ne 1 ] 9 | then 10 | echo "Usage: $0 " 11 | exit 1 12 | fi 13 | 14 | target=$1 15 | 16 | # Ignore tmp directory 17 | if [ $(basename $target) == "tmp" ] 18 | then 19 | exit 0 20 | fi 21 | 22 | if [ -d $target ] 23 | then 24 | if [ -f $target/destroy.sh ] 25 | then 26 | $target/destroy.sh 27 | fi 28 | 29 | rm -rf $target 30 | fi 31 | -------------------------------------------------------------------------------- /old/linux_backend/src/nstar/pwd.h: -------------------------------------------------------------------------------- 1 | #ifndef PWD_H 2 | #define PWD_H 3 | 4 | #include 5 | 6 | #define getpwnam __wshd_getpwnam 7 | 8 | struct passwd { 9 | char *pw_name; /* Username. */ 10 | char *pw_passwd; /* Password. */ 11 | uint32_t pw_uid; /* User ID. */ 12 | uint32_t pw_gid; /* Group ID. */ 13 | char *pw_gecos; /* Real name. */ 14 | char *pw_dir; /* Home directory. */ 15 | char *pw_shell; /* Shell program. */ 16 | }; 17 | 18 | struct passwd *getpwnam(const char *name); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /network/devices/devices_suite_test.go: -------------------------------------------------------------------------------- 1 | package devices_test 2 | 3 | import ( 4 | "net" 5 | 6 | "github.com/docker/libcontainer/netlink" 7 | . "github.com/onsi/ginkgo" 8 | . "github.com/onsi/gomega" 9 | 10 | "testing" 11 | ) 12 | 13 | func TestDevices(t *testing.T) { 14 | RegisterFailHandler(Fail) 15 | RunSpecs(t, "Devices Suite") 16 | } 17 | 18 | func cleanup(intfName string) error { 19 | if _, err := net.InterfaceByName(intfName); err == nil { 20 | return netlink.NetworkLinkDel(intfName) 21 | } 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /packer/rootfs/busybox/busybox.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | { 4 | "type": "docker", 5 | "image": "busybox:latest", 6 | "export_path": "rootfs/busybox/busybox.tar", 7 | "run_command": ["-d", "-i", "-t", "{{.Image}}", "/bin/sh"] 8 | } 9 | ], 10 | "provisioners": [ 11 | { 12 | "type": "file", 13 | "source": "rootfs/busybox/seed", 14 | "destination": "/etc/seed" 15 | }, 16 | { 17 | "type": "shell", 18 | "inline": "chmod 0644 /etc/seed" 19 | } 20 | ] 21 | } 22 | 23 | -------------------------------------------------------------------------------- /old/integration/wshd/fake_hook/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "os/exec" 7 | "path" 8 | 9 | "github.com/onsi/gomega/gbytes" 10 | ) 11 | 12 | func main() { 13 | os.Chdir(path.Dir(os.Args[0])) 14 | cmd := exec.Command(fmt.Sprintf("./hook-%s.sh", os.Args[1])) 15 | cmd.Stdin = gbytes.NewBuffer() // avoid errors due to /dev/null not existing in fake container 16 | cmd.Stdout = gbytes.NewBuffer() 17 | cmd.Stderr = gbytes.NewBuffer() 18 | if err := cmd.Run(); err != nil { 19 | panic(err) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /old/rootfs_provider/rootfs_provider.go: -------------------------------------------------------------------------------- 1 | package rootfs_provider 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/cloudfoundry-incubator/garden-linux/process" 7 | "github.com/pivotal-golang/lager" 8 | ) 9 | 10 | //go:generate counterfeiter -o fake_rootfs_provider/fake_rootfs_provider.go . RootFSProvider 11 | type RootFSProvider interface { 12 | ProvideRootFS(logger lager.Logger, id string, rootfs *url.URL, namespaced bool) (mountpoint string, envvar process.Env, err error) 13 | CleanupRootFS(logger lager.Logger, id string) error 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libtrust/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to libtrust 2 | 3 | Want to hack on libtrust? Awesome! Here are instructions to get you 4 | started. 5 | 6 | libtrust is a part of the [Docker](https://www.docker.com) project, and follows 7 | the same rules and principles. If you're already familiar with the way 8 | Docker does things, you'll feel right at home. 9 | 10 | Otherwise, go read 11 | [Docker's contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md). 12 | 13 | Happy hacking! 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | // These constants are declared here, rather than importing 8 | // them from the syscall package as some syscall packages, even 9 | // on linux, for example gccgo, do not declare them. 10 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 12 | -------------------------------------------------------------------------------- /scripts/oneoff/move_pkg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e +x 4 | 5 | echo "Sanity check" 6 | #git reset --hard 7 | #go generate ./... 8 | #ginkgo -r 9 | 10 | for target_pkg in uid_pool; do 11 | 12 | echo "renaming $target_pkg" 13 | 14 | git mv old{/linux_backend,}/$target_pkg 15 | 16 | for i in $(find . -iname '*.go'); 17 | do 18 | sed -i '' "s!linux_backend/$target_pkg!$target_pkg!g" $i; 19 | done 20 | 21 | go fmt ./... 22 | 23 | go generate ./... 24 | ginkgo -r 25 | done 26 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/install_vbox_guest_additions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | ## install the vbox guest additions 6 | mkdir -p /mnt/VBoxGuestAdditions 7 | mount /home/vagrant/VBoxGuestAdditions.iso /mnt/VBoxGuestAdditions 8 | 9 | set +e 10 | #TODO: this runs but reports a failure due to x11. Find a better way to handle this 11 | /mnt/VBoxGuestAdditions/VBoxLinuxAdditions.run 12 | set -e 13 | 14 | ## cleanup the vbox guest additions 15 | umount /mnt/VBoxGuestAdditions 16 | rmdir /mnt/VBoxGuestAdditions 17 | rm /home/vagrant/VBoxGuestAdditions.iso 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/reporters/reporter.go: -------------------------------------------------------------------------------- 1 | package reporters 2 | 3 | import ( 4 | "github.com/onsi/ginkgo/config" 5 | "github.com/onsi/ginkgo/types" 6 | ) 7 | 8 | type Reporter interface { 9 | SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) 10 | BeforeSuiteDidRun(setupSummary *types.SetupSummary) 11 | SpecWillRun(specSummary *types.SpecSummary) 12 | SpecDidComplete(specSummary *types.SpecSummary) 13 | AfterSuiteDidRun(setupSummary *types.SetupSummary) 14 | SpecSuiteDidEnd(summary *types.SuiteSummary) 15 | } 16 | -------------------------------------------------------------------------------- /old/linux_backend/bin/rootfs/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o nounset 5 | set -o errexit 6 | shopt -s nullglob 7 | shopt -s globstar 8 | 9 | if [ ! -f /etc/issue ] 10 | then 11 | echo "/etc/issue doesn't exist; cannot determine distribution" 12 | exit 1 13 | fi 14 | 15 | if grep -q -i ubuntu /etc/issue 16 | then 17 | exec $(dirname $0)/ubuntu.sh $@ 18 | fi 19 | 20 | if grep -q -i centos /etc/issue 21 | then 22 | exec $(dirname $0)/centos.sh $@ 23 | fi 24 | 25 | echo "Unknown distribution: $(head -1 /etc/issue)" 26 | exit 1 27 | -------------------------------------------------------------------------------- /scripts/remote-fly: -------------------------------------------------------------------------------- 1 | # Run fly on our remote garden-ci server 2 | 3 | if [ -n "$ATC_URL" ]; then 4 | echo "ATC_URL already set, this script will ignore this." 5 | fi 6 | 7 | if [ -z "$GARDEN_REMOTE_ATC_URL" ]; then 8 | echo "Need GARDEN_REMOTE_ATC_URL to be set" 9 | exit 1 10 | fi 11 | 12 | # GARDEN_REMOTE_ATC_URL is set 13 | 14 | echo "Using GARDEN_REMOTE_ATC_URL..." 15 | echo "fly --exclude-ignored --privileged -- -slowSpecThreshold=15 $*" 16 | ATC_URL=$GARDEN_REMOTE_ATC_URL fly --exclude-ignored --privileged -- -slowSpecThreshold=15 $* | sed -e 's/\\n/\'$'\n/g' 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/matcher_tests_suite_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | "testing" 5 | . "github.com/onsi/ginkgo" 6 | . "github.com/onsi/gomega" 7 | ) 8 | 9 | type myStringer struct { 10 | a string 11 | } 12 | 13 | func (s *myStringer) String() string { 14 | return s.a 15 | } 16 | 17 | type StringAlias string 18 | 19 | type myCustomType struct { 20 | s string 21 | n int 22 | f float32 23 | arr []string 24 | } 25 | 26 | func Test(t *testing.T) { 27 | RegisterFailHandler(Fail) 28 | RunSpecs(t, "Gomega") 29 | } 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/Sirupsen/logrus" 9 | "github.com/Sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/error.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | // An APIError is an error returned by an AWS API. 4 | type APIError struct { 5 | StatusCode int // HTTP status code e.g. 200 6 | Code string 7 | Message string 8 | RequestID string 9 | } 10 | 11 | func (e APIError) Error() string { 12 | return e.Code + ": " + e.Message 13 | } 14 | 15 | func Error(e error) *APIError { 16 | if err, ok := e.(*APIError); ok { 17 | return err 18 | } else if err, ok := e.(APIError); ok { 19 | return &err 20 | } else { 21 | return nil 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /iodaemon/winsize.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | "unsafe" 7 | ) 8 | 9 | type ttySize struct { 10 | Rows uint16 11 | Cols uint16 12 | Xpixel uint16 13 | Ypixel uint16 14 | } 15 | 16 | func setWinSize(f *os.File, cols int, rows int) error { 17 | _, _, e := syscall.Syscall6( 18 | syscall.SYS_IOCTL, 19 | uintptr(f.Fd()), 20 | uintptr(syscall.TIOCSWINSZ), 21 | uintptr(unsafe.Pointer(&ttySize{uint16(rows), uint16(cols), 0, 0})), 22 | 0, 0, 0, 23 | ) 24 | 25 | if e != 0 { 26 | return syscall.ENOTTY 27 | } 28 | 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/Makefile: -------------------------------------------------------------------------------- 1 | OPTIMIZATION?=-O0 2 | DEBUG?=-g -ggdb -rdynamic 3 | 4 | all: wshd wsh 5 | 6 | clean: 7 | rm -f *.o clone wshd wsh 8 | 9 | install: all 10 | cp wshd wsh ../../skeleton/bin/ 11 | 12 | .PHONY: all clean 13 | 14 | wshd: wshd.o barrier.o un.o util.o msg.o pwd.o pty.o 15 | $(CC) -static -o $@ $^ -lutil 16 | 17 | wsh: wsh.o pump.o un.o util.o msg.o pwd.o 18 | $(CC) -static -o $@ $^ -lutil 19 | 20 | %.o: %.c 21 | $(CC) -c -Wall $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $< 22 | 23 | -include Makefile.dep 24 | 25 | dep: 26 | $(CC) -MM *.c > Makefile.dep 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/version.go: -------------------------------------------------------------------------------- 1 | // +build linux,!btrfs_noversion 2 | 3 | package btrfs 4 | 5 | /* 6 | #include 7 | 8 | // because around version 3.16, they did not define lib version yet 9 | int my_btrfs_lib_version() { 10 | #ifdef BTRFS_LIB_VERSION 11 | return BTRFS_LIB_VERSION; 12 | #else 13 | return -1; 14 | #endif 15 | } 16 | */ 17 | import "C" 18 | 19 | func BtrfsBuildVersion() string { 20 | return string(C.BTRFS_BUILD_VERSION) 21 | } 22 | func BtrfsLibVersion() int { 23 | return int(C.BTRFS_LIB_VERSION) 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/version_command.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "github.com/onsi/ginkgo/config" 7 | ) 8 | 9 | func BuildVersionCommand() *Command { 10 | return &Command{ 11 | Name: "version", 12 | FlagSet: flag.NewFlagSet("version", flag.ExitOnError), 13 | UsageCommand: "ginkgo version", 14 | Usage: []string{ 15 | "Print Ginkgo's version", 16 | }, 17 | Command: printVersion, 18 | } 19 | } 20 | 21 | func printVersion([]string, []string) { 22 | fmt.Printf("Ginkgo Version %s\n", config.VERSION) 23 | } 24 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o nounset 5 | set -o errexit 6 | shopt -s nullglob 7 | 8 | cd $(dirname $0) 9 | 10 | source ./etc/config 11 | 12 | if [ -f ./run/wshd.pid ] 13 | then 14 | echo "wshd is already running..." 15 | exit 1 16 | fi 17 | 18 | ./net.sh setup 19 | 20 | if [ "$root_uid" -eq 0 ] 21 | then 22 | ./bin/wshd --run ./run --lib ./lib --root $rootfs_path --title "wshd: $id" --userns disabled 23 | else 24 | ./bin/wshd --run ./run --lib ./lib --root $rootfs_path --title "wshd: $id" --userns enabled 25 | fi 26 | -------------------------------------------------------------------------------- /scripts/test-in-aws: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | repoPath=$(cd $(dirname $BASH_SOURCE)/.. && pwd) 7 | 8 | if [ -z $GOROOT ]; then 9 | export GOROOT=/usr/local/go 10 | export PATH=$GOROOT/bin:$PATH 11 | fi 12 | 13 | if [ -z $GOPATH ]; then 14 | export GOPATH=$repoPath/Godeps/_workspace:$HOME/go 15 | export PATH=$GOPATH/bin:$PATH 16 | fi 17 | 18 | cd $repoPath 19 | 20 | go build -o scripts/amimgr/amimgr scripts/amimgr/main.go 21 | 22 | ./scripts/amimgr/amimgr --commit `git rev-parse HEAD` \ 23 | --imageID `cat packer/garden-ci/AMI_IMAGE_ID` 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/null_sink_test.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | type nullSink struct { 4 | records []*Record 5 | } 6 | 7 | func newNullSink() *nullSink { 8 | nSink := new(nullSink) 9 | nSink.records = make([]*Record, 0, 10) 10 | return nSink 11 | } 12 | 13 | func (nSink *nullSink) AddRecord(record *Record) { 14 | nSink.records = append(nSink.records, record) 15 | } 16 | 17 | func (nSink *nullSink) Flush() { 18 | 19 | } 20 | 21 | func (nSink *nullSink) SetCodec(codec Codec) { 22 | 23 | } 24 | 25 | func (nSink *nullSink) GetCodec() Codec { 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/stat_atim.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux dragonfly openbsd solaris 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atim.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctim.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_true_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/matchers" 7 | ) 8 | 9 | var _ = Describe("BeTrue", func() { 10 | It("should handle true and false correctly", func() { 11 | Ω(true).Should(BeTrue()) 12 | Ω(false).ShouldNot(BeTrue()) 13 | }) 14 | 15 | It("should only support booleans", func() { 16 | success, err := (&BeTrueMatcher{}).Match("foo") 17 | Ω(success).Should(BeFalse()) 18 | Ω(err).Should(HaveOccurred()) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /iodaemon/winsizereporter/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "os" 7 | "os/signal" 8 | "syscall" 9 | 10 | "github.com/kr/pty" 11 | ) 12 | 13 | func main() { 14 | winsize := make(chan os.Signal, 1) 15 | 16 | signal.Notify(winsize, syscall.SIGWINCH) 17 | 18 | printSize() 19 | 20 | <-winsize 21 | 22 | printSize() 23 | 24 | os.Exit(0) 25 | } 26 | 27 | func printSize() { 28 | rows, cols, err := pty.Getsize(os.Stdin) 29 | if err != nil { 30 | log.Fatalln("failed to get window size:", err) 31 | } 32 | 33 | fmt.Printf("rows: %d, cols: %d\n", rows, cols) 34 | } 35 | -------------------------------------------------------------------------------- /packer/garden-ci/scripts/add_insecure_vagrant_ssh_keys.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | apt-get install -y wget 6 | ssh_dir=/home/vagrant/.ssh 7 | 8 | mkdir -p $ssh_dir 9 | chmod 0700 $ssh_dir 10 | 11 | wget 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O $ssh_dir/id_rsa.pub 12 | chmod 0644 $ssh_dir/id_rsa.pub 13 | 14 | wget 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant' -O $ssh_dir/id_rsa 15 | chmod 0600 $ssh_dir/id_rsa 16 | 17 | cp $ssh_dir/{id_rsa.pub,authorized_keys} 18 | chmod 0600 $ssh_dir/authorized_keys 19 | 20 | chown -R vagrant:vagrant $ssh_dir 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar/stat_atimespec.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin freebsd netbsd 6 | 7 | package tar 8 | 9 | import ( 10 | "syscall" 11 | "time" 12 | ) 13 | 14 | func statAtime(st *syscall.Stat_t) time.Time { 15 | return time.Unix(st.Atimespec.Unix()) 16 | } 17 | 18 | func statCtime(st *syscall.Stat_t) time.Time { 19 | return time.Unix(st.Ctimespec.Unix()) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_false_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | . "github.com/onsi/gomega/matchers" 7 | ) 8 | 9 | var _ = Describe("BeFalse", func() { 10 | It("should handle true and false correctly", func() { 11 | Ω(true).ShouldNot(BeFalse()) 12 | Ω(false).Should(BeFalse()) 13 | }) 14 | 15 | It("should only support booleans", func() { 16 | success, err := (&BeFalseMatcher{}).Match("foo") 17 | Ω(success).Should(BeFalse()) 18 | Ω(err).Should(HaveOccurred()) 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_nil_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import "github.com/onsi/gomega/format" 4 | 5 | type BeNilMatcher struct { 6 | } 7 | 8 | func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { 9 | return isNil(actual), nil 10 | } 11 | 12 | func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { 13 | return format.Message(actual, "to be nil") 14 | } 15 | 16 | func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { 17 | return format.Message(actual, "not to be nil") 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/gexec/gexec_suite_test.go: -------------------------------------------------------------------------------- 1 | package gexec_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | "github.com/onsi/gomega/gexec" 7 | 8 | "testing" 9 | ) 10 | 11 | var fireflyPath string 12 | 13 | func TestGexec(t *testing.T) { 14 | BeforeSuite(func() { 15 | var err error 16 | fireflyPath, err = gexec.Build("./_fixture/firefly") 17 | Ω(err).ShouldNot(HaveOccurred()) 18 | }) 19 | 20 | AfterSuite(func() { 21 | gexec.CleanupBuildArtifacts() 22 | }) 23 | 24 | RegisterFailHandler(Fail) 25 | RunSpecs(t, "Gexec Suite") 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/opts/ip.go: -------------------------------------------------------------------------------- 1 | package opts 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | ) 7 | 8 | type IpOpt struct { 9 | *net.IP 10 | } 11 | 12 | func NewIpOpt(ref *net.IP, defaultVal string) *IpOpt { 13 | o := &IpOpt{ 14 | IP: ref, 15 | } 16 | o.Set(defaultVal) 17 | return o 18 | } 19 | 20 | func (o *IpOpt) Set(val string) error { 21 | ip := net.ParseIP(val) 22 | if ip == nil { 23 | return fmt.Errorf("%s is not an ip address", val) 24 | } 25 | (*o.IP) = net.ParseIP(val) 26 | return nil 27 | } 28 | 29 | func (o *IpOpt) String() string { 30 | return (*o.IP).String() 31 | } 32 | -------------------------------------------------------------------------------- /Cheffile.lock: -------------------------------------------------------------------------------- 1 | SITE 2 | remote: http://community.opscode.com/api/v1 3 | specs: 4 | apt (1.7.0) 5 | build-essential (1.4.2) 6 | chef_handler (1.1.4) 7 | dmg (2.0.4) 8 | git (2.7.0) 9 | build-essential (>= 0.0.0) 10 | dmg (>= 0.0.0) 11 | runit (>= 1.0.0) 12 | windows (>= 0.0.0) 13 | yum (>= 0.0.0) 14 | golang (1.4.0) 15 | runit (1.3.0) 16 | build-essential (>= 0.0.0) 17 | yum (>= 0.0.0) 18 | windows (1.11.0) 19 | chef_handler (>= 0.0.0) 20 | yum (2.4.0) 21 | 22 | DEPENDENCIES 23 | apt (= 1.7.0) 24 | git (>= 0) 25 | golang (>= 0) 26 | 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/client/fake_api_client/fake_client.go: -------------------------------------------------------------------------------- 1 | package fake_api_client 2 | 3 | import ( 4 | "github.com/cloudfoundry-incubator/garden" 5 | "github.com/cloudfoundry-incubator/garden/client" 6 | "github.com/cloudfoundry-incubator/garden/client/connection/fakes" 7 | ) 8 | 9 | type FakeClient struct { 10 | garden.Client 11 | 12 | Connection *fakes.FakeConnection 13 | } 14 | 15 | func New() *FakeClient { 16 | connection := new(fakes.FakeConnection) 17 | 18 | return &FakeClient{ 19 | Connection: connection, 20 | 21 | Client: client.New(connection), 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/lstat_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestLstat(t *testing.T) { 8 | file, invalid, _ := prepareFiles(t) 9 | 10 | statFile, err := Lstat(file) 11 | if err != nil { 12 | t.Fatal(err) 13 | } 14 | if statFile == nil { 15 | t.Fatal("returned empty stat for existing file") 16 | } 17 | 18 | statInvalid, err := Lstat(invalid) 19 | if err == nil { 20 | t.Fatal("did not return error for non-existing file") 21 | } 22 | if statInvalid != nil { 23 | t.Fatal("returned non-nil stat for non-existing file") 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/server/chanwriter.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | type chanWriter struct { 4 | ch chan<- []byte 5 | } 6 | 7 | func (w *chanWriter) Write(d []byte) (int, error) { 8 | // prevent buffer reuse from clobbering the data 9 | data := make([]byte, len(d)) 10 | copy(data, d) 11 | 12 | select { 13 | case w.ch <- data: 14 | default: 15 | // assumption is that writes never block; channel should have buffer to 16 | // account for slow consumers 17 | } 18 | 19 | return len(d), nil 20 | } 21 | 22 | func (w *chanWriter) Close() error { 23 | close(w.ch) 24 | return nil 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/nat/sort.go: -------------------------------------------------------------------------------- 1 | package nat 2 | 3 | import "sort" 4 | 5 | type portSorter struct { 6 | ports []Port 7 | by func(i, j Port) bool 8 | } 9 | 10 | func (s *portSorter) Len() int { 11 | return len(s.ports) 12 | } 13 | 14 | func (s *portSorter) Swap(i, j int) { 15 | s.ports[i], s.ports[j] = s.ports[j], s.ports[i] 16 | } 17 | 18 | func (s *portSorter) Less(i, j int) bool { 19 | ip := s.ports[i] 20 | jp := s.ports[j] 21 | 22 | return s.by(ip, jp) 23 | } 24 | 25 | func Sort(ports []Port, predicate func(i, j Port) bool) { 26 | s := &portSorter{ports, predicate} 27 | sort.Sort(s) 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/mknod.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func Mknod(path string, mode uint32, dev int) error { 10 | return syscall.Mknod(path, mode, dev) 11 | } 12 | 13 | // Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes. 14 | // They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major, 15 | // then the top 12 bits of the minor 16 | func Mkdev(major int64, minor int64) uint32 { 17 | return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff)) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/tcpip_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gorilla/mux/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Gorilla Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package mux 6 | 7 | import ( 8 | "net/http" 9 | "testing" 10 | ) 11 | 12 | func BenchmarkMux(b *testing.B) { 13 | router := new(Router) 14 | handler := func(w http.ResponseWriter, r *http.Request) {} 15 | router.HandleFunc("/v1/{v1}", handler) 16 | 17 | request, _ := http.NewRequest("GET", "/v1/anything", nil) 18 | for i := 0; i < b.N; i++ { 19 | router.ServeHTTP(nil, request) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/fake_output_interceptor_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | type fakeOutputInterceptor struct { 4 | DidStartInterceptingOutput bool 5 | DidStopInterceptingOutput bool 6 | InterceptedOutput string 7 | } 8 | 9 | func (interceptor *fakeOutputInterceptor) StartInterceptingOutput() error { 10 | interceptor.DidStartInterceptingOutput = true 11 | return nil 12 | } 13 | 14 | func (interceptor *fakeOutputInterceptor) StopInterceptingAndReturnOutput() (string, error) { 15 | interceptor.DidStopInterceptingOutput = true 16 | return interceptor.InterceptedOutput, nil 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go: -------------------------------------------------------------------------------- 1 | package logrus_papertrail 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/Sirupsen/logrus" 8 | "github.com/stvp/go-udp-testing" 9 | ) 10 | 11 | func TestWritingToUDP(t *testing.T) { 12 | port := 16661 13 | udp.SetAddr(fmt.Sprintf(":%d", port)) 14 | 15 | hook, err := NewPapertrailHook("localhost", port, "test") 16 | if err != nil { 17 | t.Errorf("Unable to connect to local UDP server.") 18 | } 19 | 20 | log := logrus.New() 21 | log.Hooks.Add(hook) 22 | 23 | udp.ShouldReceive(t, "foo", func() { 24 | log.Info("foo") 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "time" 7 | ) 8 | 9 | type JSONFormatter struct{} 10 | 11 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { 12 | prefixFieldClashes(entry) 13 | entry.Data["time"] = entry.Time.Format(time.RFC3339) 14 | entry.Data["msg"] = entry.Message 15 | entry.Data["level"] = entry.Level.String() 16 | 17 | serialized, err := json.Marshal(entry.Data) 18 | if err != nil { 19 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) 20 | } 21 | return append(serialized, '\n'), nil 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/testing_sink_test.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | import ( 4 | . "launchpad.net/gocheck" 5 | ) 6 | 7 | type TestingSinkSuite struct { 8 | } 9 | 10 | var _ = Suite(&TestingSinkSuite{}) 11 | 12 | func (s *TestingSinkSuite) TestAddRecord(c *C) { 13 | sink := NewTestingSink() 14 | 15 | data := map[string]interface{}{"a": "b"} 16 | record := NewRecord("source", LOG_INFO, "Hello, world!", data) 17 | sink.AddRecord(record) 18 | 19 | c.Assert(sink.Records(), HasLen, 1) 20 | c.Check(sink.Records()[0].Message, Equals, "Hello, world!") 21 | c.Check(sink.Records()[0].Data, DeepEquals, data) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/utils/timeoutconn.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "net" 5 | "time" 6 | ) 7 | 8 | func NewTimeoutConn(conn net.Conn, timeout time.Duration) net.Conn { 9 | return &TimeoutConn{conn, timeout} 10 | } 11 | 12 | // A net.Conn that sets a deadline for every Read or Write operation 13 | type TimeoutConn struct { 14 | net.Conn 15 | timeout time.Duration 16 | } 17 | 18 | func (c *TimeoutConn) Read(b []byte) (int, error) { 19 | if c.timeout > 0 { 20 | err := c.Conn.SetReadDeadline(time.Now().Add(c.timeout)) 21 | if err != nil { 22 | return 0, err 23 | } 24 | } 25 | return c.Conn.Read(b) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/flags_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!freebsd freebsd,!cgo 2 | 3 | package mount 4 | 5 | const ( 6 | BIND = 0 7 | DIRSYNC = 0 8 | MANDLOCK = 0 9 | NOATIME = 0 10 | NODEV = 0 11 | NODIRATIME = 0 12 | NOEXEC = 0 13 | NOSUID = 0 14 | UNBINDABLE = 0 15 | RUNBINDABLE = 0 16 | PRIVATE = 0 17 | RPRIVATE = 0 18 | SHARED = 0 19 | RSHARED = 0 20 | SLAVE = 0 21 | RSLAVE = 0 22 | RBIND = 0 23 | RELATIME = 0 24 | RELATIVE = 0 25 | REMOUNT = 0 26 | STRICTATIME = 0 27 | SYNCHRONOUS = 0 28 | RDONLY = 0 29 | ) 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/README.md: -------------------------------------------------------------------------------- 1 | # Go sigar 2 | 3 | ## Overview 4 | 5 | Go sigar is a golang implementation of the 6 | [sigar API](https://github.com/hyperic/sigar). The Go version of 7 | sigar has a very similar interface, but is being written from scratch 8 | in pure go/cgo, rather than cgo bindings for libsigar. 9 | 10 | ## Test drive 11 | 12 | $ go get github.com/cloudfoundry/gosigar 13 | $ cd $GOPATH/src/github.com/cloudfoundry/gosigar/examples 14 | $ go run uptime.go 15 | 16 | ## Supported platforms 17 | 18 | Currently targeting modern flavors of darwin and linux. 19 | 20 | ## License 21 | 22 | Apache 2.0 23 | -------------------------------------------------------------------------------- /network/devices/bridgetest/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net" 6 | "os" 7 | 8 | "github.com/cloudfoundry-incubator/garden-linux/network/devices" 9 | ) 10 | 11 | func main() { 12 | b := devices.Bridge{} 13 | 14 | for i := 0; i < 10; i++ { 15 | _, subnet, _ := net.ParseCIDR("2.3.4.5/30") 16 | if _, err := b.Create("testbridge"+os.Args[1], net.ParseIP("1.2.3.4"), subnet); err != nil { 17 | fmt.Println(os.Stderr, "create bridge: ", err) 18 | os.Exit(2) 19 | } 20 | 21 | if err := b.Destroy("testbridge" + os.Args[1]); err != nil { 22 | fmt.Println(os.Stderr, "destroy bridge: ", err) 23 | os.Exit(3) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/examples/uptime.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 VMware, Inc. 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "github.com/cloudfoundry/gosigar" 8 | "os" 9 | "time" 10 | ) 11 | 12 | func main() { 13 | concreteSigar := sigar.ConcreteSigar{} 14 | 15 | uptime := sigar.Uptime{} 16 | uptime.Get() 17 | avg, err := concreteSigar.GetLoadAverage() 18 | if err != nil { 19 | fmt.Printf("Failed to get load average") 20 | return 21 | } 22 | 23 | fmt.Fprintf(os.Stdout, " %s up %s load average: %.2f, %.2f, %.2f\n", 24 | time.Now().Format("15:04:05"), 25 | uptime.Format(), 26 | avg.One, avg.Five, avg.Fifteen) 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | var _path *byte 10 | _path, err := syscall.BytePtrFromString(path) 11 | if err != nil { 12 | return err 13 | } 14 | 15 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS { 16 | return err 17 | } 18 | 19 | return nil 20 | } 21 | 22 | func UtimesNano(path string, ts []syscall.Timespec) error { 23 | return syscall.UtimesNano(path, ts) 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/lager/models.go: -------------------------------------------------------------------------------- 1 | package lager 2 | 3 | import "encoding/json" 4 | 5 | type LogLevel int 6 | 7 | const ( 8 | DEBUG LogLevel = iota 9 | INFO 10 | ERROR 11 | FATAL 12 | ) 13 | 14 | type Data map[string]interface{} 15 | 16 | type LogFormat struct { 17 | Timestamp string `json:"timestamp"` 18 | Source string `json:"source"` 19 | Message string `json:"message"` 20 | LogLevel LogLevel `json:"log_level"` 21 | Data Data `json:"data"` 22 | } 23 | 24 | func (log LogFormat) ToJSON() []byte { 25 | content, err := json.Marshal(log) 26 | if err != nil { 27 | panic(err) 28 | } 29 | return content 30 | } 31 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/README.md: -------------------------------------------------------------------------------- 1 | # pty 2 | 3 | Pty is a Go package for using unix pseudo-terminals. 4 | 5 | ## Install 6 | 7 | go get github.com/kr/pty 8 | 9 | ## Example 10 | 11 | ```go 12 | package main 13 | 14 | import ( 15 | "github.com/kr/pty" 16 | "io" 17 | "os" 18 | "os/exec" 19 | ) 20 | 21 | func main() { 22 | c := exec.Command("grep", "--color=auto", "bar") 23 | f, err := pty.Start(c) 24 | if err != nil { 25 | panic(err) 26 | } 27 | 28 | go func() { 29 | f.Write([]byte("foo\n")) 30 | f.Write([]byte("bar\n")) 31 | f.Write([]byte("baz\n")) 32 | f.Write([]byte{4}) // EOT 33 | }() 34 | io.Copy(os.Stdout, f) 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/restart/strategies.go: -------------------------------------------------------------------------------- 1 | package restart 2 | 3 | import "github.com/tedsuo/ifrit" 4 | 5 | /* 6 | OnError is a restart strategy for Safely Restartable Runners. It will restart the 7 | Runner only if it exits with a matching error. 8 | */ 9 | func OnError(runner ifrit.Runner, err error, errors ...error) ifrit.Runner { 10 | errors = append(errors, err) 11 | return &Restarter{ 12 | Runner: runner, 13 | Load: func(runner ifrit.Runner, err error) ifrit.Runner { 14 | for _, restartableError := range errors { 15 | if err == restartableError { 16 | return runner 17 | } 18 | } 19 | return nil 20 | }, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/mounter_linux.go: -------------------------------------------------------------------------------- 1 | package mount 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | func mount(device, target, mType string, flag uintptr, data string) error { 8 | if err := syscall.Mount(device, target, mType, flag, data); err != nil { 9 | return err 10 | } 11 | 12 | // If we have a bind mount or remount, remount... 13 | if flag&syscall.MS_BIND == syscall.MS_BIND && flag&syscall.MS_RDONLY == syscall.MS_RDONLY { 14 | return syscall.Mount(device, target, mType, flag|syscall.MS_REMOUNT, data) 15 | } 16 | return nil 17 | } 18 | 19 | func unmount(target string, flag int) error { 20 | return syscall.Unmount(target, flag) 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/tarsum/testdata/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/json: -------------------------------------------------------------------------------- 1 | {"id":"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158","comment":"Imported from -","created":"2013-06-13T14:03:50.821769-07:00","container_config":{"Hostname":"","Domainname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"ExposedPorts":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":null,"Image":"","Volumes":null,"WorkingDir":"","Entrypoint":null,"NetworkDisabled":false,"OnBuild":null},"docker_version":"0.4.0","architecture":"x86_64","Size":0} -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/watch/delta.go: -------------------------------------------------------------------------------- 1 | package watch 2 | 3 | import "sort" 4 | 5 | type Delta struct { 6 | ModifiedPackages []string 7 | 8 | NewSuites []*Suite 9 | RemovedSuites []*Suite 10 | modifiedSuites []*Suite 11 | } 12 | 13 | type DescendingByDelta []*Suite 14 | 15 | func (a DescendingByDelta) Len() int { return len(a) } 16 | func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] } 17 | func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() } 18 | 19 | func (d Delta) ModifiedSuites() []*Suite { 20 | sort.Sort(DescendingByDelta(d.modifiedSuites)) 21 | return d.modifiedSuites 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/types/types.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type GomegaFailHandler func(message string, callerSkip ...int) 4 | 5 | //A simple *testing.T interface wrapper 6 | type GomegaTestingT interface { 7 | Errorf(format string, args ...interface{}) 8 | } 9 | 10 | //All Gomega matchers must implement the GomegaMatcher interface 11 | // 12 | //For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding_your_own_matchers 13 | type GomegaMatcher interface { 14 | Match(actual interface{}) (success bool, err error) 15 | FailureMessage(actual interface{}) (message string) 16 | NegatedFailureMessage(actual interface{}) (message string) 17 | } 18 | -------------------------------------------------------------------------------- /old/integration/wshd/rlimit_consts_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package wshd_test 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | const ( 10 | RLIMIT_AS = syscall.RLIMIT_AS 11 | RLIMIT_CORE = syscall.RLIMIT_CORE 12 | RLIMIT_CPU = syscall.RLIMIT_CPU 13 | RLIMIT_DATA = syscall.RLIMIT_DATA 14 | RLIMIT_FSIZE = syscall.RLIMIT_FSIZE 15 | RLIMIT_LOCKS = 10 16 | RLIMIT_MEMLOCK = 8 17 | RLIMIT_MSGQUEUE = 12 18 | RLIMIT_NICE = 13 19 | RLIMIT_NOFILE = syscall.RLIMIT_NOFILE 20 | RLIMIT_NPROC = 6 21 | RLIMIT_RSS = 5 22 | RLIMIT_RTPRIO = 14 23 | RLIMIT_SIGPENDING = 11 24 | RLIMIT_STACK = syscall.RLIMIT_STACK 25 | ) 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/types/synchronization.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type RemoteBeforeSuiteState int 8 | 9 | const ( 10 | RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota 11 | 12 | RemoteBeforeSuiteStatePending 13 | RemoteBeforeSuiteStatePassed 14 | RemoteBeforeSuiteStateFailed 15 | RemoteBeforeSuiteStateDisappeared 16 | ) 17 | 18 | type RemoteBeforeSuiteData struct { 19 | Data []byte 20 | State RemoteBeforeSuiteState 21 | } 22 | 23 | func (r RemoteBeforeSuiteData) ToJSON() []byte { 24 | data, _ := json.Marshal(r) 25 | return data 26 | } 27 | 28 | type RemoteAfterSuiteData struct { 29 | CanRun bool 30 | } 31 | -------------------------------------------------------------------------------- /integration/runner/tmpfs_mounter_linux.go: -------------------------------------------------------------------------------- 1 | package runner 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | ) 7 | 8 | func MustMountTmpfs(destination string) { 9 | if _, err := os.Stat(destination); os.IsNotExist(err) { 10 | must(os.MkdirAll(destination, 0755)) 11 | must(syscall.Mount("tmpfs", destination, "tmpfs", 0, "")) 12 | } 13 | } 14 | 15 | func MustUnmountTmpfs(destination string) { 16 | if _, err := os.Stat(destination); os.IsNotExist(err) { 17 | return 18 | } 19 | 20 | for i := 0; i < 10; i++ { 21 | syscall.Unmount(destination, syscall.MNT_DETACH) 22 | os.Remove(destination) 23 | } 24 | } 25 | 26 | func must(err error) { 27 | if err != nil { 28 | panic(err) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/run.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "syscall" 7 | ) 8 | 9 | // Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, 10 | // and c.Stderr, calls c.Start, and returns the File of the tty's 11 | // corresponding pty. 12 | func Start(c *exec.Cmd) (pty *os.File, err error) { 13 | pty, tty, err := Open() 14 | if err != nil { 15 | return nil, err 16 | } 17 | defer tty.Close() 18 | c.Stdout = tty 19 | c.Stdin = tty 20 | c.Stderr = tty 21 | c.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true} 22 | err = c.Start() 23 | if err != nil { 24 | pty.Close() 25 | return nil, err 26 | } 27 | return pty, err 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux,!appengine darwin freebsd 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go: -------------------------------------------------------------------------------- 1 | package fakematcher 2 | 3 | import "fmt" 4 | 5 | type FakeMatcher struct { 6 | ReceivedActual interface{} 7 | MatchesToReturn bool 8 | ErrToReturn error 9 | } 10 | 11 | func (matcher *FakeMatcher) Match(actual interface{}) (bool, error) { 12 | matcher.ReceivedActual = actual 13 | 14 | return matcher.MatchesToReturn, matcher.ErrToReturn 15 | } 16 | 17 | func (matcher *FakeMatcher) FailureMessage(actual interface{}) string { 18 | return fmt.Sprintf("positive: %v", actual) 19 | } 20 | 21 | func (matcher *FakeMatcher) NegatedFailureMessage(actual interface{}) string { 22 | return fmt.Sprintf("negative: %v", actual) 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package logrus_syslog 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "log/syslog" 6 | "testing" 7 | ) 8 | 9 | func TestLocalhostAddAndPrint(t *testing.T) { 10 | log := logrus.New() 11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 12 | 13 | if err != nil { 14 | t.Errorf("Unable to connect to local syslog.") 15 | } 16 | 17 | log.Hooks.Add(hook) 18 | 19 | for _, level := range hook.Levels() { 20 | if len(log.Hooks[level]) != 1 { 21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 22 | } 23 | } 24 | 25 | log.Info("Congratulations!") 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libtrust/util_test.go: -------------------------------------------------------------------------------- 1 | package libtrust 2 | 3 | import ( 4 | "encoding/pem" 5 | "reflect" 6 | "testing" 7 | ) 8 | 9 | func TestAddPEMHeadersToKey(t *testing.T) { 10 | pk := &rsaPublicKey{nil, map[string]interface{}{}} 11 | blk := &pem.Block{Headers: map[string]string{"hosts": "localhost,127.0.0.1"}} 12 | addPEMHeadersToKey(blk, pk) 13 | 14 | val := pk.GetExtendedField("hosts") 15 | hosts, ok := val.([]string) 16 | if !ok { 17 | t.Fatalf("hosts type(%v), expected []string", reflect.TypeOf(val)) 18 | } 19 | expected := []string{"localhost", "127.0.0.1"} 20 | if !reflect.DeepEqual(hosts, expected) { 21 | t.Errorf("hosts(%v), expected %v", hosts, expected) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/nu7hatch/gouuid/README.md: -------------------------------------------------------------------------------- 1 | # Pure Go UUID implementation 2 | 3 | This package provides immutable UUID structs and the functions 4 | NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 5 | and 5 UUIDs as specified in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt). 6 | 7 | ## Installation 8 | 9 | Use the `go` tool: 10 | 11 | $ go get github.com/nu7hatch/gouuid 12 | 13 | ## Usage 14 | 15 | See [documentation and examples](http://godoc.org/github.com/nu7hatch/gouuid) 16 | for more information. 17 | 18 | ## Copyright 19 | 20 | Copyright (C) 2011 by Krzysztof Kowalik . See [COPYING](https://github.com/nu7hatch/gouuid/tree/master/COPYING) 21 | file for details. 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/nu7hatch/gouuid/example_test.go: -------------------------------------------------------------------------------- 1 | package uuid_test 2 | 3 | import ( 4 | "fmt" 5 | "github.com/nu7hatch/gouuid" 6 | ) 7 | 8 | func ExampleNewV4() { 9 | u4, err := uuid.NewV4() 10 | if err != nil { 11 | fmt.Println("error:", err) 12 | return 13 | } 14 | fmt.Println(u4) 15 | } 16 | 17 | func ExampleNewV5() { 18 | u5, err := uuid.NewV5(uuid.NamespaceURL, []byte("nu7hat.ch")) 19 | if err != nil { 20 | fmt.Println("error:", err) 21 | return 22 | } 23 | fmt.Println(u5) 24 | } 25 | 26 | func ExampleParseHex() { 27 | u, err := uuid.ParseHex("6ba7b810-9dad-11d1-80b4-00c04fd430c8") 28 | if err != nil { 29 | fmt.Println("error:", err) 30 | return 31 | } 32 | fmt.Println(u) 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go: -------------------------------------------------------------------------------- 1 | package testrunner 2 | 3 | type RunResult struct { 4 | Passed bool 5 | HasProgrammaticFocus bool 6 | } 7 | 8 | func PassingRunResult() RunResult { 9 | return RunResult{ 10 | Passed: true, 11 | HasProgrammaticFocus: false, 12 | } 13 | } 14 | 15 | func FailingRunResult() RunResult { 16 | return RunResult{ 17 | Passed: false, 18 | HasProgrammaticFocus: false, 19 | } 20 | } 21 | 22 | func (r RunResult) Merge(o RunResult) RunResult { 23 | return RunResult{ 24 | Passed: r.Passed && o.Passed, 25 | HasProgrammaticFocus: r.HasProgrammaticFocus || o.HasProgrammaticFocus, 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /site-cookbooks/garden/recipes/rootfs.rb: -------------------------------------------------------------------------------- 1 | root_fs_url = "http://cf-runtime-stacks.s3.amazonaws.com/lucid64.dev.tgz" 2 | root_fs_checksum = "b2633b2ab4964f91402bb2d889f2f12449a8b828" 3 | 4 | src_filename = File.basename(root_fs_url) 5 | src_filepath = "#{Chef::Config['file_cache_path']}/#{src_filename}" 6 | 7 | remote_file src_filepath do 8 | source root_fs_url 9 | checksum root_fs_checksum 10 | owner "root" 11 | group "root" 12 | mode 0644 13 | end 14 | 15 | bash "extract rootfs" do 16 | cwd ::File.dirname(src_filepath) 17 | 18 | code <<-EOH 19 | mkdir -p /opt/warden/rootfs 20 | tar xzf #{src_filename} -C /opt/warden/rootfs 21 | EOH 22 | 23 | not_if { ::File.directory?("/opt/warden/rootfs") } 24 | end 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/bmizerany/pat/example/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "log" 6 | "net/http" 7 | 8 | "github.com/bmizerany/pat" 9 | ) 10 | 11 | // hello world, the web server 12 | func HelloServer(w http.ResponseWriter, req *http.Request) { 13 | io.WriteString(w, "hello, "+req.URL.Query().Get(":name")+"!\n") 14 | } 15 | 16 | func main() { 17 | m := pat.New() 18 | m.Get("/hello/:name", http.HandlerFunc(HelloServer)) 19 | 20 | // Register this pat with the default serve mux so that other packages 21 | // may also be exported. (i.e. /debug/pprof/*) 22 | http.Handle("/", m) 23 | err := http.ListenAndServe(":12345", nil) 24 | if err != nil { 25 | log.Fatal("ListenAndServe: ", err) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/sigar_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 VMware, Inc. 2 | 3 | // +build darwin freebsd linux netbsd openbsd 4 | 5 | package sigar 6 | 7 | import "syscall" 8 | 9 | func (self *FileSystemUsage) Get(path string) error { 10 | stat := syscall.Statfs_t{} 11 | err := syscall.Statfs(path, &stat) 12 | if err != nil { 13 | return err 14 | } 15 | 16 | bsize := stat.Bsize / 512 17 | 18 | self.Total = (uint64(stat.Blocks) * uint64(bsize)) >> 1 19 | self.Free = (uint64(stat.Bfree) * uint64(bsize)) >> 1 20 | self.Avail = (uint64(stat.Bavail) * uint64(bsize)) >> 1 21 | self.Used = self.Total - self.Free 22 | self.Files = stat.Files 23 | self.FreeFiles = stat.Ffree 24 | 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_nil_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | ) 7 | 8 | var _ = Describe("BeNil", func() { 9 | It("should succeed when passed nil", func() { 10 | Ω(nil).Should(BeNil()) 11 | }) 12 | 13 | It("should succeed when passed a typed nil", func() { 14 | var a []int 15 | Ω(a).Should(BeNil()) 16 | }) 17 | 18 | It("should succeed when passing nil pointer", func() { 19 | var f *struct{} 20 | Ω(f).Should(BeNil()) 21 | }) 22 | 23 | It("should not succeed when not passed nil", func() { 24 | Ω(0).ShouldNot(BeNil()) 25 | Ω(false).ShouldNot(BeNil()) 26 | Ω("").ShouldNot(BeNil()) 27 | }) 28 | }) 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/aws/handlers_test.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestHandlerList(t *testing.T) { 10 | s := "" 11 | r := &Request{} 12 | l := HandlerList{} 13 | l.PushBack(func(r *Request) { 14 | s += "a" 15 | r.Data = s 16 | }) 17 | l.Run(r) 18 | assert.Equal(t, "a", s) 19 | assert.Equal(t, "a", r.Data) 20 | } 21 | 22 | func TestMultipleHandlers(t *testing.T) { 23 | r := &Request{} 24 | l := HandlerList{} 25 | l.PushBack(func(r *Request) { r.Data = nil }) 26 | l.PushFront(func(r *Request) { r.Data = Boolean(true) }) 27 | l.Run(r) 28 | if r.Data != nil { 29 | t.Error("Expected handler to execute") 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /old/system_info/fake_system_info/provider.go: -------------------------------------------------------------------------------- 1 | package fake_system_info 2 | 3 | type FakeProvider struct { 4 | TotalMemoryResult uint64 5 | TotalMemoryError error 6 | 7 | TotalDiskResult uint64 8 | TotalDiskError error 9 | } 10 | 11 | func NewFakeProvider() *FakeProvider { 12 | return &FakeProvider{} 13 | } 14 | 15 | func (provider *FakeProvider) TotalMemory() (uint64, error) { 16 | if provider.TotalMemoryError != nil { 17 | return 0, provider.TotalMemoryError 18 | } 19 | 20 | return provider.TotalMemoryResult, nil 21 | } 22 | 23 | func (provider *FakeProvider) TotalDisk() (uint64, error) { 24 | if provider.TotalDiskError != nil { 25 | return 0, provider.TotalDiskError 26 | } 27 | 28 | return provider.TotalDiskResult, nil 29 | } 30 | -------------------------------------------------------------------------------- /old/system_info/system_info_test.go: -------------------------------------------------------------------------------- 1 | package system_info_test 2 | 3 | import ( 4 | . "github.com/cloudfoundry-incubator/garden-linux/old/system_info" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | var _ = Describe("SystemInfo", func() { 11 | var provider Provider 12 | 13 | BeforeEach(func() { 14 | provider = NewProvider("/") 15 | }) 16 | 17 | It("provides nonzero memory and disk information", func() { 18 | totalMemory, err := provider.TotalMemory() 19 | Expect(err).ToNot(HaveOccurred()) 20 | 21 | totalDisk, err := provider.TotalDisk() 22 | Expect(err).ToNot(HaveOccurred()) 23 | 24 | Expect(totalMemory).To(BeNumerically(">", 0)) 25 | Expect(totalDisk).To(BeNumerically(">", 0)) 26 | }) 27 | }) 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/cf-lager/integration/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "errors" 5 | "flag" 6 | 7 | "github.com/cloudfoundry-incubator/cf-lager" 8 | "github.com/pivotal-golang/lager" 9 | ) 10 | 11 | func main() { 12 | cf_lager.AddFlags(flag.CommandLine) 13 | flag.Parse() 14 | 15 | logger, _ := cf_lager.New("cf-lager-integration") 16 | 17 | logger.Debug("component-does-action", lager.Data{"debug-detail": "foo"}) 18 | logger.Info("another-component-action", lager.Data{"info-detail": "bar"}) 19 | logger.Error("component-failed-something", errors.New("error"), lager.Data{"error-detail": "baz"}) 20 | logger.Fatal("component-failed-badly", errors.New("fatal"), lager.Data{"fatal-detail": "quux"}) 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat_test.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "testing" 6 | ) 7 | 8 | func TestFromStatT(t *testing.T) { 9 | file, _, _ := prepareFiles(t) 10 | 11 | stat := &syscall.Stat_t{} 12 | err := syscall.Lstat(file, stat) 13 | 14 | s, err := fromStatT(stat) 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | 19 | if stat.Mode != s.Mode() { 20 | t.Fatal("got invalid mode") 21 | } 22 | if stat.Uid != s.Uid() { 23 | t.Fatal("got invalid uid") 24 | } 25 | if stat.Gid != s.Gid() { 26 | t.Fatal("got invalid gid") 27 | } 28 | if stat.Rdev != s.Rdev() { 29 | t.Fatal("got invalid rdev") 30 | } 31 | if stat.Mtim != s.Mtim() { 32 | t.Fatal("got invalid mtim") 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/suite/suite_suite_test.go: -------------------------------------------------------------------------------- 1 | package suite_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | 7 | "testing" 8 | ) 9 | 10 | func Test(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Suite") 13 | } 14 | 15 | var numBeforeSuiteRuns = 0 16 | var numAfterSuiteRuns = 0 17 | 18 | var _ = BeforeSuite(func() { 19 | numBeforeSuiteRuns++ 20 | }) 21 | 22 | var _ = AfterSuite(func() { 23 | numAfterSuiteRuns++ 24 | Ω(numBeforeSuiteRuns).Should(Equal(1)) 25 | Ω(numAfterSuiteRuns).Should(Equal(1)) 26 | }) 27 | 28 | //Fakes 29 | type fakeTestingT struct { 30 | didFail bool 31 | } 32 | 33 | func (fakeT *fakeTestingT) Fail() { 34 | fakeT.didFail = true 35 | } 36 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/dockerversion/dockerversion.go: -------------------------------------------------------------------------------- 1 | package dockerversion 2 | 3 | // FIXME: this should be embedded in the docker/docker.go, 4 | // but we can't because distro policy requires us to 5 | // package a separate dockerinit binary, and that binary needs 6 | // to know its version too. 7 | 8 | var ( 9 | GITCOMMIT string 10 | VERSION string 11 | 12 | IAMSTATIC bool // whether or not Docker itself was compiled statically via ./hack/make.sh binary 13 | INITSHA1 string // sha1sum of separate static dockerinit, if Docker itself was compiled dynamically via ./hack/make.sh dynbinary 14 | INITPATH string // custom location to search for a valid dockerinit binary (available for packagers as a last resort escape hatch) 15 | ) 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/mount/flags_freebsd.go: -------------------------------------------------------------------------------- 1 | // +build freebsd,cgo 2 | 3 | package mount 4 | 5 | /* 6 | #include 7 | */ 8 | import "C" 9 | 10 | const ( 11 | RDONLY = C.MNT_RDONLY 12 | NOSUID = C.MNT_NOSUID 13 | NOEXEC = C.MNT_NOEXEC 14 | SYNCHRONOUS = C.MNT_SYNCHRONOUS 15 | NOATIME = C.MNT_NOATIME 16 | 17 | BIND = 0 18 | DIRSYNC = 0 19 | MANDLOCK = 0 20 | NODEV = 0 21 | NODIRATIME = 0 22 | UNBINDABLE = 0 23 | RUNBINDABLE = 0 24 | PRIVATE = 0 25 | RPRIVATE = 0 26 | SHARED = 0 27 | RSHARED = 0 28 | SLAVE = 0 29 | RSLAVE = 0 30 | RBIND = 0 31 | RELATIVE = 0 32 | RELATIME = 0 33 | REMOUNT = 0 34 | STRICTATIME = 0 35 | ) 36 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/stat.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | type Stat struct { 8 | mode uint32 9 | uid uint32 10 | gid uint32 11 | rdev uint64 12 | size int64 13 | mtim syscall.Timespec 14 | } 15 | 16 | func (s Stat) Mode() uint32 { 17 | return s.mode 18 | } 19 | 20 | func (s Stat) Uid() uint32 { 21 | return s.uid 22 | } 23 | 24 | func (s Stat) Gid() uint32 { 25 | return s.gid 26 | } 27 | 28 | func (s Stat) Rdev() uint64 { 29 | return s.rdev 30 | } 31 | 32 | func (s Stat) Size() int64 { 33 | return s.size 34 | } 35 | 36 | func (s Stat) Mtim() syscall.Timespec { 37 | return s.mtim 38 | } 39 | 40 | func (s Stat) GetLastModification() syscall.Timespec { 41 | return s.Mtim() 42 | } 43 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_true_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeTrueMatcher struct { 9 | } 10 | 11 | func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { 12 | if !isBool(actual) { 13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 14 | } 15 | 16 | return actual.(bool), nil 17 | } 18 | 19 | func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { 20 | return format.Message(actual, "to be true") 21 | } 22 | 23 | func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return format.Message(actual, "not to be true") 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_false_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeFalseMatcher struct { 9 | } 10 | 11 | func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { 12 | if !isBool(actual) { 13 | return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) 14 | } 15 | 16 | return actual == false, nil 17 | } 18 | 19 | func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { 20 | return format.Message(actual, "to be false") 21 | } 22 | 23 | func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { 24 | return format.Message(actual, "not to be false") 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/fake_poster_test.go: -------------------------------------------------------------------------------- 1 | package remote_test 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | "net/http" 7 | ) 8 | 9 | type post struct { 10 | url string 11 | bodyType string 12 | bodyContent []byte 13 | } 14 | 15 | type fakePoster struct { 16 | posts []post 17 | } 18 | 19 | func newFakePoster() *fakePoster { 20 | return &fakePoster{ 21 | posts: make([]post, 0), 22 | } 23 | } 24 | 25 | func (poster *fakePoster) Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error) { 26 | bodyContent, _ := ioutil.ReadAll(body) 27 | poster.posts = append(poster.posts, post{ 28 | url: url, 29 | bodyType: bodyType, 30 | bodyContent: bodyContent, 31 | }) 32 | return nil, nil 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/proxy/proxy.go: -------------------------------------------------------------------------------- 1 | package proxy 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/tedsuo/ifrit" 7 | ) 8 | 9 | func New(proxySignals <-chan os.Signal, runner ifrit.Runner) ifrit.Runner { 10 | return ifrit.RunFunc(func(signals <-chan os.Signal, ready chan<- struct{}) error { 11 | process := ifrit.Background(runner) 12 | <-process.Ready() 13 | close(ready) 14 | go forwardSignals(proxySignals, process) 15 | go forwardSignals(signals, process) 16 | return <-process.Wait() 17 | }) 18 | } 19 | 20 | func forwardSignals(signals <-chan os.Signal, process ifrit.Process) { 21 | exit := process.Wait() 22 | for { 23 | select { 24 | case sig := <-signals: 25 | process.Signal(sig) 26 | case <-exit: 27 | return 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /old/linux_backend/skeleton/lib/hook-parent-before-clone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -n "$DEBUG" ] && set -o xtrace 4 | set -o nounset 5 | set -o errexit 6 | shopt -s nullglob 7 | 8 | cd $(dirname $0)/../ 9 | 10 | source ./etc/config 11 | 12 | mkdir -p $rootfs_path/sbin 13 | cp bin/wshd $rootfs_path/sbin/wshd 14 | cp lib/hook $rootfs_path/sbin/hook 15 | cp etc/config $rootfs_path/etc/config 16 | chown $root_uid:$root_uid $rootfs_path/sbin/wshd 17 | chown $root_uid:$root_uid $rootfs_path/sbin/hook 18 | chown $root_uid:$root_uid $rootfs_path/etc/config 19 | chmod 700 $rootfs_path/sbin/wshd 20 | 21 | mkdir -p $rootfs_path/dev/pts 22 | chown $root_uid:$root_uid $rootfs_path/dev/pts 23 | mount -n -t devpts -o newinstance,ptmxmode=0666 devpts $rootfs_path/dev/pts 24 | mkdir -p $rootfs_path/dev/shm 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | //go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go 4 | 5 | import "strings" 6 | 7 | func EndpointForRegion(svcName, region string) (endpoint, signingRegion string) { 8 | derivedKeys := []string{ 9 | region + "/" + svcName, 10 | region + "/*", 11 | "*/" + svcName, 12 | "*/*", 13 | } 14 | 15 | for _, key := range derivedKeys { 16 | if val, ok := endpointsMap.Endpoints[key]; ok { 17 | ep := val.Endpoint 18 | ep = strings.Replace(ep, "{region}", region, -1) 19 | ep = strings.Replace(ep, "{service}", svcName, -1) 20 | 21 | endpoint = ep 22 | signingRegion = val.SigningRegion 23 | return 24 | } 25 | } 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /linux_backend/container_initializer_linux.go: -------------------------------------------------------------------------------- 1 | package linux_backend 2 | 3 | import ( 4 | "fmt" 5 | "syscall" 6 | ) 7 | 8 | type containerInitializer struct{} 9 | 10 | func NewContainerInitializer() ContainerInitializer { 11 | return &containerInitializer{} 12 | } 13 | 14 | // Pre-condition: /proc must exist. 15 | func (*containerInitializer) MountProc() error { 16 | if err := syscall.Mount("proc", "/proc", "proc", uintptr(0), ""); err != nil { 17 | return fmt.Errorf("linux_backend: MountProc: %s", err) 18 | } 19 | return nil 20 | } 21 | 22 | func (*containerInitializer) MountTmp() error { 23 | if err := syscall.Mount("tmpfs", "/dev/shm", "tmpfs", uintptr(syscall.MS_NODEV), ""); err != nil { 24 | return fmt.Errorf("linux_backend: MountTmp: %s", err) 25 | } 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/io_sink_test.go: -------------------------------------------------------------------------------- 1 | package gosteno 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | . "launchpad.net/gocheck" 7 | ) 8 | 9 | type IOSinkSuite struct { 10 | } 11 | 12 | var _ = Suite(&IOSinkSuite{}) 13 | 14 | func (s *IOSinkSuite) TestAddRecord(c *C) { 15 | pReader, pWriter := io.Pipe() 16 | sink := NewIOSink(nil) 17 | sink.writer = bufio.NewWriter(pWriter) 18 | sink.SetCodec(NewJsonCodec()) 19 | 20 | go func(msg string) { 21 | record := NewRecord("source", LOG_INFO, msg, nil) 22 | sink.AddRecord(record) 23 | sink.Flush() 24 | pWriter.Close() 25 | }("Hello, \nworld") 26 | 27 | bufReader := bufio.NewReader(pReader) 28 | msg, err := bufReader.ReadString('\n') 29 | c.Assert(err, IsNil) 30 | c.Assert(msg, Matches, `{.*"Hello, \\nworld".*}\n`) 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/registry/endpoint_test.go: -------------------------------------------------------------------------------- 1 | package registry 2 | 3 | import "testing" 4 | 5 | func TestEndpointParse(t *testing.T) { 6 | testData := []struct { 7 | str string 8 | expected string 9 | }{ 10 | {IndexServerAddress(), IndexServerAddress()}, 11 | {"http://0.0.0.0:5000", "http://0.0.0.0:5000/v1/"}, 12 | {"0.0.0.0:5000", "https://0.0.0.0:5000/v1/"}, 13 | } 14 | for _, td := range testData { 15 | e, err := newEndpoint(td.str, insecureRegistries) 16 | if err != nil { 17 | t.Errorf("%q: %s", td.str, err) 18 | } 19 | if e == nil { 20 | t.Logf("something's fishy, endpoint for %q is nil", td.str) 21 | continue 22 | } 23 | if e.String() != td.expected { 24 | t.Errorf("expected %q, got %q", td.expected, e.String()) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if the given file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stdout 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/vfs/vfs_test.go: -------------------------------------------------------------------------------- 1 | package vfs 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestVfsSetup and TestVfsTeardown 10 | func TestVfsSetup(t *testing.T) { 11 | graphtest.GetDriver(t, "vfs") 12 | } 13 | 14 | func TestVfsCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "vfs") 16 | } 17 | 18 | func TestVfsCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "vfs") 20 | } 21 | 22 | func TestVfsCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "vfs") 24 | } 25 | 26 | func TestVfsTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/kr/pty/util.go: -------------------------------------------------------------------------------- 1 | package pty 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | "unsafe" 7 | ) 8 | 9 | // Getsize returns the number of rows (lines) and cols (positions 10 | // in each line) in terminal t. 11 | func Getsize(t *os.File) (rows, cols int, err error) { 12 | var ws winsize 13 | err = windowrect(&ws, t.Fd()) 14 | return int(ws.ws_row), int(ws.ws_col), err 15 | } 16 | 17 | type winsize struct { 18 | ws_row uint16 19 | ws_col uint16 20 | ws_xpixel uint16 21 | ws_ypixel uint16 22 | } 23 | 24 | func windowrect(ws *winsize, fd uintptr) error { 25 | _, _, errno := syscall.Syscall( 26 | syscall.SYS_IOCTL, 27 | fd, 28 | syscall.TIOCGWINSZ, 29 | uintptr(unsafe.Pointer(ws)), 30 | ) 31 | if errno != 0 { 32 | return syscall.Errno(errno) 33 | } 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_zero_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/onsi/gomega/format" 5 | "reflect" 6 | ) 7 | 8 | type BeZeroMatcher struct { 9 | } 10 | 11 | func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { 12 | if actual == nil { 13 | return true, nil 14 | } 15 | zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() 16 | 17 | return reflect.DeepEqual(zeroValue, actual), nil 18 | 19 | } 20 | 21 | func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { 22 | return format.Message(actual, "to be zero-valued") 23 | } 24 | 25 | func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { 26 | return format.Message(actual, "not to be zero-valued") 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pivotal-golang/clock/clock.go: -------------------------------------------------------------------------------- 1 | package clock 2 | 3 | import "time" 4 | 5 | type Clock interface { 6 | Now() time.Time 7 | Sleep(d time.Duration) 8 | 9 | NewTimer(d time.Duration) Timer 10 | NewTicker(d time.Duration) Ticker 11 | } 12 | 13 | type realClock struct{} 14 | 15 | func NewClock() Clock { 16 | return &realClock{} 17 | } 18 | 19 | func (clock *realClock) Now() time.Time { 20 | return time.Now() 21 | } 22 | 23 | func (clock *realClock) Sleep(d time.Duration) { 24 | <-clock.NewTimer(d).C() 25 | } 26 | 27 | func (clock *realClock) NewTimer(d time.Duration) Timer { 28 | return &realTimer{ 29 | t: time.NewTimer(d), 30 | } 31 | } 32 | 33 | func (clock *realClock) NewTicker(d time.Duration) Ticker { 34 | return &realTicker{ 35 | t: time.NewTicker(d), 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /old/rootfs_provider/namespaced_rootfs_provider.go: -------------------------------------------------------------------------------- 1 | package rootfs_provider 2 | 3 | import ( 4 | "path/filepath" 5 | 6 | "github.com/pivotal-golang/lager" 7 | ) 8 | 9 | //go:generate counterfeiter -o fake_namespacer/fake_namespacer.go . Namespacer 10 | type Namespacer interface { 11 | Namespace(rootfsPath string) error 12 | } 13 | 14 | type UidNamespacer struct { 15 | Translator filepath.WalkFunc 16 | Logger lager.Logger 17 | } 18 | 19 | func (n *UidNamespacer) Namespace(rootfsPath string) error { 20 | log := n.Logger.Session("namespace-rootfs", lager.Data{ 21 | "path": rootfsPath, 22 | }) 23 | 24 | log.Info("namespace") 25 | 26 | if err := filepath.Walk(rootfsPath, n.Translator); err != nil { 27 | log.Error("walk-failed", err) 28 | } 29 | 30 | log.Info("namespaced") 31 | 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/dropsonde/control/heartbeatrequest.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-gogo. 2 | // source: heartbeatrequest.proto 3 | // DO NOT EDIT! 4 | 5 | package control 6 | 7 | import proto "code.google.com/p/gogoprotobuf/proto" 8 | import math "math" 9 | 10 | // Reference imports to suppress errors if they are not otherwise used. 11 | var _ = proto.Marshal 12 | var _ = math.Inf 13 | 14 | // / A HeartbeatRequest command elicits a heartbeat from a component or app 15 | type HeartbeatRequest struct { 16 | XXX_unrecognized []byte `json:"-"` 17 | } 18 | 19 | func (m *HeartbeatRequest) Reset() { *m = HeartbeatRequest{} } 20 | func (m *HeartbeatRequest) String() string { return proto.CompactTextString(m) } 21 | func (*HeartbeatRequest) ProtoMessage() {} 22 | 23 | func init() { 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/sigar_windows_test.go: -------------------------------------------------------------------------------- 1 | package sigar_test 2 | 3 | import ( 4 | "os" 5 | 6 | . "github.com/onsi/ginkgo" 7 | . "github.com/onsi/gomega" 8 | 9 | sigar "github.com/cloudfoundry/gosigar" 10 | ) 11 | 12 | var _ = Describe("SigarWindows", func() { 13 | Describe("Memory", func() { 14 | It("gets the total memory", func() { 15 | mem := sigar.Mem{} 16 | err := mem.Get() 17 | 18 | Ω(err).ShouldNot(HaveOccurred()) 19 | Ω(mem.Total).Should(BeNumerically(">", 0)) 20 | }) 21 | }) 22 | 23 | Describe("Disk", func() { 24 | It("gets the total disk space", func() { 25 | usage := sigar.FileSystemUsage{} 26 | err := usage.Get(os.TempDir()) 27 | 28 | Ω(err).ShouldNot(HaveOccurred()) 29 | Ω(usage.Total).Should(BeNumerically(">", 0)) 30 | }) 31 | }) 32 | }) 33 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package remote 4 | 5 | import ( 6 | "errors" 7 | ) 8 | 9 | func NewOutputInterceptor() OutputInterceptor { 10 | return &outputInterceptor{} 11 | } 12 | 13 | type outputInterceptor struct { 14 | intercepting bool 15 | } 16 | 17 | func (interceptor *outputInterceptor) StartInterceptingOutput() error { 18 | if interceptor.intercepting { 19 | return errors.New("Already intercepting output!") 20 | } 21 | interceptor.intercepting = true 22 | 23 | // not working on windows... 24 | 25 | return nil 26 | } 27 | 28 | func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) { 29 | // not working on windows... 30 | interceptor.intercepting = false 31 | 32 | return "", nil 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosteno/gosteno-prettify/README.md: -------------------------------------------------------------------------------- 1 | # gosteno-prettify 2 | 3 | gosteno-prettify is a command line tool which parses json formatted log lines 4 | from file(s), or stdin, and displays a more human friendly version of each line 5 | to stdout. 6 | 7 | ## Setup 8 | 9 | go get -u github.com/cloudfoundry/gosteno 10 | cd $GOPATH/src/github.com/cloudfoundry/gosteno/gosteno-prettify 11 | go install 12 | 13 | Don't forget to add the $GOPATH/bin to the $PATH 14 | 15 | ## Usage 16 | 17 | gosteno-prettify [OPTS] [FILE(s)] 18 | 19 | Examples : 20 | 21 | gosteno-prettify f - g 22 | Prettify f's contents, then standard input, then g's contents. 23 | 24 | gosteno-prettify 25 | Prettify contents of stdin. 26 | 27 | Fire `gosteno-prettify -h` to see more options. 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/ginkgo/help_command.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | ) 7 | 8 | func BuildHelpCommand() *Command { 9 | return &Command{ 10 | Name: "help", 11 | FlagSet: flag.NewFlagSet("help", flag.ExitOnError), 12 | UsageCommand: "ginkgo help ", 13 | Usage: []string{ 14 | "Print usage information. If a command is passed in, print usage information just for that command.", 15 | }, 16 | Command: printHelp, 17 | } 18 | } 19 | 20 | func printHelp(args []string, additionalArgs []string) { 21 | if len(args) == 0 { 22 | usage() 23 | } else { 24 | command, found := commandMatching(args[0]) 25 | if !found { 26 | complainAndQuit(fmt.Sprintf("Unknown command: %s", args[0])) 27 | } 28 | 29 | usageForCommand(command, true) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tedsuo/ifrit/grouper/sliding_buffer.go: -------------------------------------------------------------------------------- 1 | package grouper 2 | 3 | import "container/list" 4 | 5 | type slidingBuffer struct { 6 | buffer *list.List 7 | capacity int 8 | } 9 | 10 | func newSlidingBuffer(capacity int) slidingBuffer { 11 | return slidingBuffer{list.New(), capacity} 12 | } 13 | 14 | func (b slidingBuffer) Append(item interface{}) { 15 | if b.capacity == 0 { 16 | return 17 | } 18 | 19 | b.buffer.PushBack(item) 20 | if b.buffer.Len() > b.capacity { 21 | b.buffer.Remove(b.buffer.Front()) 22 | } 23 | } 24 | 25 | func (b slidingBuffer) Range(callback func(item interface{})) { 26 | elem := b.buffer.Front() 27 | for elem != nil { 28 | callback(elem.Value) 29 | elem = elem.Next() 30 | } 31 | } 32 | 33 | func (b slidingBuffer) Length() int { 34 | return b.buffer.Len() 35 | } 36 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | func LUtimesNano(path string, ts []syscall.Timespec) error { 9 | // These are not currently available in syscall 10 | AT_FDCWD := -100 11 | AT_SYMLINK_NOFOLLOW := 0x100 12 | 13 | var _path *byte 14 | _path, err := syscall.BytePtrFromString(path) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(AT_FDCWD), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(AT_SYMLINK_NOFOLLOW), 0, 0); err != 0 && err != syscall.ENOSYS { 20 | return err 21 | } 22 | 23 | return nil 24 | } 25 | 26 | func UtimesNano(path string, ts []syscall.Timespec) error { 27 | return syscall.UtimesNano(path, ts) 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/libtrust/README.md: -------------------------------------------------------------------------------- 1 | # libtrust 2 | 3 | Libtrust is library for managing authentication and authorization using public key cryptography. 4 | 5 | Authentication is handled using the identity attached to the public key. 6 | Libtrust provides multiple methods to prove possession of the private key associated with an identity. 7 | - TLS x509 certificates 8 | - Signature verification 9 | - Key Challenge 10 | 11 | Authorization and access control is managed through a distributed trust graph. 12 | Trust servers are used as the authorities of the trust graph and allow caching portions of the graph for faster access. 13 | 14 | ## Copyright and license 15 | 16 | Code and documentation copyright 2014 Docker, inc. Code released under the Apache 2.0 license. 17 | Docs released under Creative commons. 18 | 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_empty_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | ) 7 | 8 | type BeEmptyMatcher struct { 9 | } 10 | 11 | func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) { 12 | length, ok := lengthOf(actual) 13 | if !ok { 14 | return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) 15 | } 16 | 17 | return length == 0, nil 18 | } 19 | 20 | func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) { 21 | return format.Message(actual, "to be empty") 22 | } 23 | 24 | func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) { 25 | return format.Message(actual, "not to be empty") 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/daemon/graphdriver/btrfs/btrfs_test.go: -------------------------------------------------------------------------------- 1 | package btrfs 2 | 3 | import ( 4 | "github.com/docker/docker/daemon/graphdriver/graphtest" 5 | "testing" 6 | ) 7 | 8 | // This avoids creating a new driver for each test if all tests are run 9 | // Make sure to put new tests between TestBtrfsSetup and TestBtrfsTeardown 10 | func TestBtrfsSetup(t *testing.T) { 11 | graphtest.GetDriver(t, "btrfs") 12 | } 13 | 14 | func TestBtrfsCreateEmpty(t *testing.T) { 15 | graphtest.DriverTestCreateEmpty(t, "btrfs") 16 | } 17 | 18 | func TestBtrfsCreateBase(t *testing.T) { 19 | graphtest.DriverTestCreateBase(t, "btrfs") 20 | } 21 | 22 | func TestBtrfsCreateSnap(t *testing.T) { 23 | graphtest.DriverTestCreateSnap(t, "btrfs") 24 | } 25 | 26 | func TestBtrfsTeardown(t *testing.T) { 27 | graphtest.PutDriver(t) 28 | } 29 | -------------------------------------------------------------------------------- /old/linux_backend/src/wsh/pump.h: -------------------------------------------------------------------------------- 1 | #ifndef PUMP_H 2 | #define PUMP_H 1 3 | 4 | #define PUMP_READ 1 5 | #define PUMP_WRITE 2 6 | #define PUMP_EXCEPT 4 7 | 8 | typedef struct pump_s pump_t; 9 | 10 | struct pump_s { 11 | int nfd; 12 | 13 | fd_set rfds; 14 | fd_set wfds; 15 | fd_set efds; 16 | }; 17 | 18 | typedef struct pump_pair_s pump_pair_t; 19 | 20 | struct pump_pair_s { 21 | pump_t *p; 22 | 23 | int rfd; 24 | int wfd; 25 | }; 26 | 27 | void pump_init(pump_t *p); 28 | int pump_add_fd(pump_t *p, int fd, int mode); 29 | int pump_add_pair(pump_t *p, pump_pair_t *pp); 30 | int pump_ready(pump_t *p, int fd, int mode); 31 | int pump_select(pump_t *p); 32 | 33 | void pump_pair_init(pump_pair_t *pp, pump_t *p, int rfd, int wfd); 34 | int pump_pair_splice(pump_pair_t *pp); 35 | int pump_pair_copy(pump_pair_t *pp); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/fileutils/fileutils.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | import ( 4 | log "github.com/Sirupsen/logrus" 5 | "path/filepath" 6 | ) 7 | 8 | // Matches returns true if relFilePath matches any of the patterns 9 | func Matches(relFilePath string, patterns []string) (bool, error) { 10 | for _, exclude := range patterns { 11 | matched, err := filepath.Match(exclude, relFilePath) 12 | if err != nil { 13 | log.Errorf("Error matching: %s (pattern: %s)", relFilePath, exclude) 14 | return false, err 15 | } 16 | if matched { 17 | if filepath.Clean(relFilePath) == "." { 18 | log.Errorf("Can't exclude whole path, excluding pattern: %s", exclude) 19 | continue 20 | } 21 | log.Debugf("Skipping excluded path: %s", relFilePath) 22 | return true, nil 23 | } 24 | } 25 | return false, nil 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/be_zero_matcher_test.go: -------------------------------------------------------------------------------- 1 | package matchers_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/gomega" 6 | ) 7 | 8 | var _ = Describe("BeZero", func() { 9 | It("should succeed if the passed in object is the zero value for its type", func() { 10 | Ω(nil).Should(BeZero()) 11 | 12 | Ω("").Should(BeZero()) 13 | Ω(" ").ShouldNot(BeZero()) 14 | 15 | Ω(0).Should(BeZero()) 16 | Ω(1).ShouldNot(BeZero()) 17 | 18 | Ω(0.0).Should(BeZero()) 19 | Ω(0.1).ShouldNot(BeZero()) 20 | 21 | // Ω([]int{}).Should(BeZero()) 22 | Ω([]int{1}).ShouldNot(BeZero()) 23 | 24 | // Ω(map[string]int{}).Should(BeZero()) 25 | Ω(map[string]int{"a": 1}).ShouldNot(BeZero()) 26 | 27 | Ω(myCustomType{}).Should(BeZero()) 28 | Ω(myCustomType{s: "a"}).ShouldNot(BeZero()) 29 | }) 30 | }) 31 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry/gosigar/examples/free.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 VMware, Inc. 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "github.com/cloudfoundry/gosigar" 8 | "os" 9 | ) 10 | 11 | func format(val uint64) uint64 { 12 | return val / 1024 13 | } 14 | 15 | func main() { 16 | mem := sigar.Mem{} 17 | swap := sigar.Swap{} 18 | 19 | mem.Get() 20 | swap.Get() 21 | 22 | fmt.Fprintf(os.Stdout, "%18s %10s %10s\n", 23 | "total", "used", "free") 24 | 25 | fmt.Fprintf(os.Stdout, "Mem: %10d %10d %10d\n", 26 | format(mem.Total), format(mem.Used), format(mem.Free)) 27 | 28 | fmt.Fprintf(os.Stdout, "-/+ buffers/cache: %10d %10d\n", 29 | format(mem.ActualUsed), format(mem.ActualFree)) 30 | 31 | fmt.Fprintf(os.Stdout, "Swap: %10d %10d %10d\n", 32 | format(swap.Total), format(swap.Used), format(swap.Free)) 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/awslabs/aws-sdk-go/internal/endpoints/endpoints_test.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestGlobalEndpoints(t *testing.T) { 10 | region := "mock-region-1" 11 | svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts"} 12 | 13 | for _, name := range svcs { 14 | ep, sr := EndpointForRegion(name, region) 15 | assert.Equal(t, name+".amazonaws.com", ep) 16 | assert.Equal(t, "us-east-1", sr) 17 | } 18 | } 19 | 20 | func TestServicesInCN(t *testing.T) { 21 | region := "cn-north-1" 22 | svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "s3"} 23 | 24 | for _, name := range svcs { 25 | ep, _ := EndpointForRegion(name, region) 26 | assert.Equal(t, name+"."+region+".amazonaws.com.cn", ep) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cloudfoundry-incubator/garden/scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # vim: set ft=sh 3 | 4 | set -e -x 5 | 6 | FIRST_GOPATH=`echo $GOPATH | cut -d':' -f1` 7 | 8 | mkdir -p $FIRST_GOPATH/bin 9 | export PATH=$FIRST_GOPATH/bin:$PATH 10 | 11 | go get -t -v ./... 12 | go get golang.org/x/tools/cmd/cover 13 | go get github.com/dustin/goveralls 14 | go install github.com/onsi/ginkgo/ginkgo 15 | 16 | ginkgo -cover -race -r -skipMeasurements -randomizeAllSpecs "$@" 17 | 18 | # don't leak coveralls token 19 | set +x 20 | 21 | if [ -n "$COVERALLS_TOKEN" ]; then 22 | profiles=$(find . -name '*.coverprofile' | grep -v fake) 23 | 24 | echo mode: set > all.coverprofile 25 | cat $profiles | grep -v mode: >> all.coverprofile 26 | 27 | goveralls -coverprofile=all.coverprofile $COVERALLS_TOKEN || \ 28 | echo "Coveralls failed. :(" 29 | fi 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | */ 18 | package ssh 19 | -------------------------------------------------------------------------------- /process_tracker/writer/fan_out.go: -------------------------------------------------------------------------------- 1 | package writer 2 | 3 | import ( 4 | "io" 5 | "sync" 6 | ) 7 | 8 | type FanOut interface { 9 | Write(data []byte) (int, error) 10 | AddSink(sink io.Writer) 11 | } 12 | 13 | func NewFanOut() FanOut { 14 | return &fanOut{} 15 | } 16 | 17 | type fanOut struct { 18 | sinks []io.Writer 19 | sinksL sync.Mutex 20 | } 21 | 22 | func (w *fanOut) Write(data []byte) (int, error) { 23 | w.sinksL.Lock() 24 | defer w.sinksL.Unlock() 25 | 26 | // the sinks should be nonblocking and never actually error; 27 | // we can assume lossiness here, and do this all within the lock 28 | for _, s := range w.sinks { 29 | s.Write(data) 30 | } 31 | 32 | return len(data), nil 33 | } 34 | 35 | func (w *fanOut) AddSink(sink io.Writer) { 36 | w.sinksL.Lock() 37 | defer w.sinksL.Unlock() 38 | 39 | w.sinks = append(w.sinks, sink) 40 | } 41 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/gomega/matchers/equal_matcher.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/onsi/gomega/format" 6 | "reflect" 7 | ) 8 | 9 | type EqualMatcher struct { 10 | Expected interface{} 11 | } 12 | 13 | func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { 14 | if actual == nil && matcher.Expected == nil { 15 | return false, fmt.Errorf("Refusing to compare to .") 16 | } 17 | return reflect.DeepEqual(actual, matcher.Expected), nil 18 | } 19 | 20 | func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) { 21 | return format.Message(actual, "to equal", matcher.Expected) 22 | } 23 | 24 | func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) { 25 | return format.Message(actual, "not to equal", matcher.Expected) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/onsi/ginkgo/internal/leafnodes/it_node_test.go: -------------------------------------------------------------------------------- 1 | package leafnodes_test 2 | 3 | import ( 4 | . "github.com/onsi/ginkgo" 5 | . "github.com/onsi/ginkgo/internal/leafnodes" 6 | . "github.com/onsi/gomega" 7 | 8 | "github.com/onsi/ginkgo/internal/codelocation" 9 | "github.com/onsi/ginkgo/types" 10 | ) 11 | 12 | var _ = Describe("It Nodes", func() { 13 | It("should report the correct type, text, flag, and code location", func() { 14 | codeLocation := codelocation.New(0) 15 | it := NewItNode("my it node", func() {}, types.FlagTypeFocused, codeLocation, 0, nil, 3) 16 | Ω(it.Type()).Should(Equal(types.SpecComponentTypeIt)) 17 | Ω(it.Flag()).Should(Equal(types.FlagTypeFocused)) 18 | Ω(it.Text()).Should(Equal("my it node")) 19 | Ω(it.CodeLocation()).Should(Equal(codeLocation)) 20 | Ω(it.Samples()).Should(Equal(1)) 21 | }) 22 | }) 23 | --------------------------------------------------------------------------------