doc: fix typo

Signed-off-by: Yan Zhu <yanzhu@alauda.io>
This commit is contained in:
Yan Zhu 2018-09-07 11:37:40 +08:00
parent 70ca035aa6
commit feb90346e0
14 changed files with 16 additions and 16 deletions

View File

@ -73,7 +73,7 @@ __runc_to_extglob() {
# continue processing its completion. # continue processing its completion.
# #
# TODO if the preceding command has options that accept arguments and an # TODO if the preceding command has options that accept arguments and an
# argument is equal ot one of the subcommands, this is falsely detected as # argument is equal to one of the subcommands, this is falsely detected as
# a match. # a match.
__runc_subcommands() { __runc_subcommands() {
local subcommands="$1" local subcommands="$1"

View File

@ -77,7 +77,7 @@ func (s *CpusetGroup) ApplyDir(dir string, cgroup *configs.Cgroup, pid int) erro
// The logic is, if user specified cpuset configs, use these // The logic is, if user specified cpuset configs, use these
// specified configs, otherwise, inherit from parent. This makes // specified configs, otherwise, inherit from parent. This makes
// cpuset configs work correctly with 'cpuset.cpu_exclusive', and // cpuset configs work correctly with 'cpuset.cpu_exclusive', and
// keep backward compatbility. // keep backward compatibility.
if err := s.ensureCpusAndMems(dir, cgroup); err != nil { if err := s.ensureCpusAndMems(dir, cgroup); err != nil {
return err return err
} }

View File

@ -86,7 +86,7 @@ func expectMemoryStatEquals(t *testing.T, expected, actual cgroups.MemoryStats)
expectMemoryDataEquals(t, expected.KernelUsage, actual.KernelUsage) expectMemoryDataEquals(t, expected.KernelUsage, actual.KernelUsage)
if expected.UseHierarchy != actual.UseHierarchy { if expected.UseHierarchy != actual.UseHierarchy {
logrus.Printf("Expected memory use hiearchy %v, but found %v\n", expected.UseHierarchy, actual.UseHierarchy) logrus.Printf("Expected memory use hierarchy %v, but found %v\n", expected.UseHierarchy, actual.UseHierarchy)
t.Fail() t.Fail()
} }

View File

@ -13,7 +13,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/docker/go-units" units "github.com/docker/go-units"
) )
const ( const (
@ -103,7 +103,7 @@ func FindCgroupMountpointDir() (string, error) {
} }
if postSeparatorFields[0] == "cgroup" { if postSeparatorFields[0] == "cgroup" {
// Check that the mount is properly formated. // Check that the mount is properly formatted.
if numPostFields < 3 { if numPostFields < 3 {
return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text) return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text)
} }
@ -262,7 +262,7 @@ func getCgroupPathHelper(subsystem, cgroup string) (string, error) {
} }
// This is needed for nested containers, because in /proc/self/cgroup we // This is needed for nested containers, because in /proc/self/cgroup we
// see pathes from host, which don't exist in container. // see paths from host, which don't exist in container.
relCgroup, err := filepath.Rel(root, cgroup) relCgroup, err := filepath.Rel(root, cgroup)
if err != nil { if err != nil {
return "", err return "", err

View File

@ -159,7 +159,7 @@ func TestGetContainerStats(t *testing.T) {
t.Fatal("cgroup stats are nil") t.Fatal("cgroup stats are nil")
} }
if stats.CgroupStats.MemoryStats.Usage.Usage != 1024 { if stats.CgroupStats.MemoryStats.Usage.Usage != 1024 {
t.Fatalf("expected memory usage 1024 but recevied %d", stats.CgroupStats.MemoryStats.Usage.Usage) t.Fatalf("expected memory usage 1024 but received %d", stats.CgroupStats.MemoryStats.Usage.Usage)
} }
if intelrdt.IsEnabled() { if intelrdt.IsEnabled() {
if stats.IntelRdtStats == nil { if stats.IntelRdtStats == nil {

View File

@ -177,7 +177,7 @@ func findIntelRdtMountpointDir() (string, error) {
} }
if postSeparatorFields[0] == "resctrl" { if postSeparatorFields[0] == "resctrl" {
// Check that the mount is properly formated. // Check that the mount is properly formatted.
if numPostFields < 3 { if numPostFields < 3 {
return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text) return "", fmt.Errorf("Error found less than 3 fields post '-' in %q", text)
} }

View File

@ -211,7 +211,7 @@ static int try_mapping_tool(const char *app, int pid, char *map, size_t map_len)
/* /*
* If @app is NULL, execve will segfault. Just check it here and bail (if * If @app is NULL, execve will segfault. Just check it here and bail (if
* we're in this path, the caller is already getting desparate and there * we're in this path, the caller is already getting desperate and there
* isn't a backup to this failing). This usually would be a configuration * isn't a backup to this failing). This usually would be a configuration
* or programming issue. * or programming issue.
*/ */

View File

@ -537,7 +537,7 @@ func (p *Process) InitializeIO(rootuid, rootgid int) (i *IO, err error) {
} }
fds = append(fds, r.Fd(), w.Fd()) fds = append(fds, r.Fd(), w.Fd())
p.Stderr, i.Stderr = w, r p.Stderr, i.Stderr = w, r
// change ownership of the pipes incase we are in a user namespace // change ownership of the pipes in case we are in a user namespace
for _, fd := range fds { for _, fd := range fds {
if err := unix.Fchown(int(fd), rootuid, rootgid); err != nil { if err := unix.Fchown(int(fd), rootuid, rootgid); err != nil {
return nil, err return nil, err

View File

@ -19,7 +19,7 @@ func TestCaptureTestFunc(t *testing.T) {
// the first frame is the caller // the first frame is the caller
frame := stack.Frames[0] frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected { if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expected function %q but recevied %q", expected, frame.Function) t.Fatalf("expected function %q but received %q", expected, frame.Function)
} }
expected := "/runc/libcontainer/stacktrace" expected := "/runc/libcontainer/stacktrace"
if !strings.HasSuffix(frame.Package, expected) { if !strings.HasSuffix(frame.Package, expected) {

View File

@ -29,7 +29,7 @@ func newSignalHandler(enableSubreaper bool, notifySocket *notifySocket) *signalH
} }
} }
// ensure that we have a large buffer size so that we do not miss any signals // ensure that we have a large buffer size so that we do not miss any signals
// incase we are not processing them fast enough. // in case we are not processing them fast enough.
s := make(chan os.Signal, signalBufferSize) s := make(chan os.Signal, signalBufferSize)
// handle all signals for the process. // handle all signals for the process.
signal.Notify(s) signal.Notify(s)

View File

@ -36,7 +36,7 @@ function teardown() {
# spawn two sub processes (shells) # spawn two sub processes (shells)
# the first sub process is an event logger that sends stats events to events.log # the first sub process is an event logger that sends stats events to events.log
# the second sub process waits for an event that incudes test_busybox then # the second sub process waits for an event that includes test_busybox then
# kills the test_busybox container which causes the event logger to exit # kills the test_busybox container which causes the event logger to exit
(__runc events test_busybox > events.log) & (__runc events test_busybox > events.log) &
( (

View File

@ -121,7 +121,7 @@ function set_cgroups_path() {
sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "\/runc-cgroups-integration-test\/test-cgroup",/' "$bundle/config.json" sed -i 's/\("linux": {\)/\1\n "cgroupsPath": "\/runc-cgroups-integration-test\/test-cgroup",/' "$bundle/config.json"
} }
# Helper function to set a resouces limit # Helper function to set a resources limit
function set_resources_limit() { function set_resources_limit() {
bundle="${1:-.}" bundle="${1:-.}"
sed -i 's/\("linux": {\)/\1\n "resources": { "pids": { "limit": 100 } },/' "$bundle/config.json" sed -i 's/\("linux": {\)/\1\n "resources": { "pids": { "limit": 100 } },/' "$bundle/config.json"

View File

@ -123,7 +123,7 @@ function check_cgroup_value() {
[ "$status" -eq 0 ] [ "$status" -eq 0 ]
check_cgroup_value $CGROUP_MEMORY "memory.soft_limit_in_bytes" 33554432 check_cgroup_value $CGROUP_MEMORY "memory.soft_limit_in_bytes" 33554432
# Run swap memory tests if swap is avaialble # Run swap memory tests if swap is available
if [ -f "$CGROUP_MEMORY/memory.memsw.limit_in_bytes" ]; then if [ -f "$CGROUP_MEMORY/memory.memsw.limit_in_bytes" ]; then
# try to remove memory swap limit # try to remove memory swap limit
runc update test_update --memory-swap -1 runc update test_update --memory-swap -1

2
tty.go
View File

@ -135,7 +135,7 @@ func (t *tty) ClosePostStart() error {
return nil return nil
} }
// Close closes all open fds for the tty and/or restores the orignal // Close closes all open fds for the tty and/or restores the original
// stdin state to what it was prior to the container execution // stdin state to what it was prior to the container execution
func (t *tty) Close() error { func (t *tty) Close() error {
// ensure that our side of the fds are always closed // ensure that our side of the fds are always closed