__ __ __
____ ___ / /_/ /_ ____ _/ /_
/ __ \/ _ \/ __/ __ \/ __ `/ __/
/ / / / __/ /_/ /_/ / /_/ / /_
/_/ /_/\___/\__/_.___/\__,_/\__/
A utility for issuing ICMP requests.
Send ICMP echo and receive response:
# Cloud Foundry Java Buildpack | |
# Copyright (c) 2013 the original author or authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
# yard doc A.rb does not document method B.a. | |
# yard stats --list-undoc A.rb reports 2 methods of which 0 are undocumented. | |
# A class. | |
class A | |
# a method. | |
def a | |
puts 'A.a' | |
end | |
end |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
defer func() { | |
if e := recover(); e != nil { | |
fmt.Printf("Recovered from '%v'\n", e) |
perl -e 'for ($i = 0; $i < 20; $i++ ) { $foo .= "A" x (1024 * 1024); }; print "Success\n"' |
Objectives: | |
1. Avoid file system implementation bias on libcontainer API | |
2. Make the caller of the API responsible for storing/persisting the state necessary to re-create | |
a container from the underlying cgroups, etc. | |
3. Ideally, clarify the notion of ownership in the API to avoid write conflicts due to misunderstanding. | |
At a minimum this needs to be clearly documented. | |
Current situation | |
Caller passes a file system path on Create. libcontainer stores a "memento" (file) there sufficient to |
package temp_test | |
import ( | |
. "github.com/onsi/ginkgo" | |
) | |
var _ = Describe("Blah", func() { | |
var f func() |
__ __ __
____ ___ / /_/ /_ ____ _/ /_
/ __ \/ _ \/ __/ __ \/ __ `/ __/
/ / / / __/ /_/ /_/ / /_/ / /_
/_/ /_/\___/\__/_.___/\__,_/\__/
A utility for issuing ICMP requests.
Send ICMP echo and receive response:
package cgo_ginkgo_test | |
import ( | |
. "github.com/onsi/ginkgo" | |
. "github.com/onsi/gomega" | |
"testing" | |
) | |
func TestCgoGinkgo(t *testing.T) { |
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/cloudfoundry-incubator/garden" | |
"github.com/cloudfoundry-incubator/garden/client" | |
"github.com/cloudfoundry-incubator/garden/client/connection" | |
) |
exec 1<&- | |
exec 1<>/tmp/somescript.log | |
exec 2>&1 |