Fix a few typos

This commit is contained in:
Andrei Vagin
2025-01-29 21:16:51 -08:00
parent 8bdf76c5ca
commit f010ae01ac
116 changed files with 189 additions and 182 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ go_binary(
# The runsc-race target is a race-compatible BUILD target. This must be built
# via: bazel build --features=race :runsc-race
#
# This is neccessary because the race feature must apply to all dependencies
# This is necessary because the race feature must apply to all dependencies
# due a bug in gazelle file selection. The pure attribute must be off because
# the race detector requires linking with non-Go components, although we still
# require a static binary.
@@ -33,7 +33,7 @@ var (
)
// hostInetConn allows reading and writing to a local host socket for hostinet.
// hostInetConn implments proxyConn.
// hostInetConn implements proxyConn.
type hostInetConn struct {
// wq is the WaitQueue registered with fdnotifier for this fd.
wq waiter.Queue
@@ -64,7 +64,7 @@ func TestLocalHostSocket(t *testing.T) {
}
if !slices.Equal(data[:recLen], clientData) {
return fmt.Errorf("server mismatch data recieved: got: %s want: %s", data[:recLen], clientData)
return fmt.Errorf("server mismatch data received: got: %s want: %s", data[:recLen], clientData)
}
sentLen, err := conn.Write(serverData)
+1 -1
View File
@@ -96,7 +96,7 @@ type ProcessProcfsDump struct {
StartTime int64 `json:"clone_ts,omitempty"`
// Root is /proc/[pid]/root.
Root string `json:"root,omitempty"`
// Limits constains resource limits for this process. Currently only
// Limits constrains resource limits for this process. Currently only
// RLIMIT_NOFILE is supported.
Limits map[string]limits.Limit `json:"limits,omitempty"`
// Cgroup is /proc/[pid]/cgroup split into an array.
+1 -1
View File
@@ -1006,7 +1006,7 @@ func (c *containerMounter) mountTmp(ctx context.Context, spec *specs.Spec, conf
for _, m := range c.mounts {
// m.Destination has been cleaned, so it's to use equality here.
if m.Destination == "/tmp" {
log.Debugf(`Explict "/tmp" mount found, skipping internal tmpfs, mount: %+v`, m)
log.Debugf(`Explicit "/tmp" mount found, skipping internal tmpfs, mount: %+v`, m)
return nil
}
}
+1 -1
View File
@@ -56,7 +56,7 @@ func TestIsValidSlice(t *testing.T) {
err: ErrInvalidSlice,
},
{
name: "has path seperators",
name: "has path separators",
slice: "systemd.slice/child.slice",
err: ErrInvalidSlice,
},
+1 -1
View File
@@ -585,7 +585,7 @@ func (b *Boot) Execute(_ context.Context, f *flag.FlagSet, args ...any) subcomma
// prepareArgs returns the args that can be used to re-execute the current
// program. It manipulates the flags of the subcommands.Command identified by
// subCmdName and fSet is the flag.FlagSet of this subcommand. It applies the
// flags specified by override map. In case of conflict, flag is overriden.
// flags specified by override map. In case of conflict, flag is overridden.
//
// Postcondition: prepareArgs() takes ownership of override map.
func prepareArgs(subCmdName string, fSet *flag.FlagSet, override map[string]string) []string {
+1 -1
View File
@@ -147,7 +147,7 @@ func (d *Debug) Execute(_ context.Context, f *flag.FlagSet, args ...any) subcomm
pid := c.Sandbox.Getpid()
util.Infof("Sending signal %d to process: %d", d.signal, pid)
if err := unix.Kill(pid, unix.Signal(d.signal)); err != nil {
return util.Errorf("failed to send signal %d to processs %d", d.signal, pid)
return util.Errorf("failed to send signal %d to process %d", d.signal, pid)
}
}
if d.stacks {
+1 -1
View File
@@ -206,7 +206,7 @@ func (c *Do) Execute(_ context.Context, f *flag.FlagSet, args ...any) subcommand
conf.Network = config.NetworkHost
case nil:
// Setup successfull.
// Setup successful.
defer clean()
default:
+1 -1
View File
@@ -596,7 +596,7 @@ func shouldExposeNvidiaDevice(path string) bool {
}
// shouldExposeVfioDevice returns true if path refers to an VFIO device
// which shuold be exposed to the container.
// which should be exposed to the container.
func shouldExposeVFIODevice(path string) bool {
return strings.HasPrefix(path, filepath.Dir(vfio.VFIOPath))
}
+1 -1
View File
@@ -92,7 +92,7 @@ func (i *Install) Execute(_ context.Context, f *flag.FlagSet, _ ...any) subcomma
// Extract the executable.
path, err := os.Executable()
if err != nil {
log.Fatalf("Error reading current exectuable: %v", err)
log.Fatalf("Error reading current executable: %v", err)
}
i.executablePath = path
+1 -1
View File
@@ -88,7 +88,7 @@ func (m *Mitigate) Execute(_ context.Context, f *flag.FlagSet, args ...any) subc
return m.execute()
}
// execute executes mitigate operations. Seperate from Execute method for
// execute executes mitigate operations. Separate from Execute method for
// easier mocking.
func (m *Mitigate) execute() subcommands.ExitStatus {
beforeSet, err := m.control.getCPUs()
+1 -1
View File
@@ -79,7 +79,7 @@ OPTIONS:
// SetFlags implements subcommands.Command.SetFlags.
func (p *PortForward) SetFlags(f *flag.FlagSet) {
f.StringVar(&p.stream, "stream", "", "Stream mode - a Unix doman socket")
f.StringVar(&p.stream, "stream", "", "Stream mode - a Unix domain socket")
}
// Execute implements subcommands.Command.Execute.
+1 -1
View File
@@ -52,7 +52,7 @@ func (*Statefile) Usage() string {
// SetFlags implements subcommands.Command.
func (s *Statefile) SetFlags(f *flag.FlagSet) {
f.BoolVar(&s.list, "list", false, "lists the metdata in the statefile.")
f.BoolVar(&s.list, "list", false, "lists the metadata in the statefile.")
f.StringVar(&s.get, "get", "", "extracts the given metadata key.")
f.StringVar(&s.key, "key", "", "the integrity key for the file.")
f.StringVar(&s.output, "output", "", "target to write the result.")
+1 -1
View File
@@ -1139,7 +1139,7 @@ const (
// Linux network stack.
XDPModeRedirect
// XDPModeTunnel uses XDP_REDIRECT to redirect packets directy from the
// XDPModeTunnel uses XDP_REDIRECT to redirect packets directly from the
// host NIC to the VETH device inside the container's network
// namespace. Packets are read from the VETH via AF_XDP, as in
// XDPModeNS.
+1 -1
View File
@@ -33,7 +33,7 @@ import (
)
// socketPath creates a path inside bundleDir and ensures that the returned
// path is under 108 charactors (the unix socket path length limit),
// path is under 108 characters (the unix socket path length limit),
// relativizing the path if necessary.
func socketPath(bundleDir string) (string, error) {
num := rand.Intn(10000)
+2 -2
View File
@@ -885,7 +885,7 @@ func TestExec(t *testing.T) {
}
// TestExecProcList verifies that a container can exec a new program and it
// shows correcly in the process list.
// shows correctly in the process list.
func TestExecProcList(t *testing.T) {
for name, conf := range configs(t, false /* noOverlay */) {
t.Run(name, func(t *testing.T) {
@@ -2007,7 +2007,7 @@ func TestAbbreviatedIDs(t *testing.T) {
defer cont.Destroy()
}
// These should all be unambigious.
// These should all be unambiguous.
unambiguous := map[string]string{
"f": cids[0],
cids[0]: cids[0],
+1 -1
View File
@@ -83,7 +83,7 @@ func (rpc *goferToHostRPC) OpenMount(m *specs.Mount, res *OpenMountResult) error
rpc.openMountRequests = make(chan *openMountRequest)
go func() {
// This goroutine holds the current threads forever. It
// never exits, because child proccesses can set
// never exits, because child processes can set
// PDEATHSIG. It can't serve other go-routines, because
// it does unshare CLONE_FS.
runtime.LockOSThread()
+3 -3
View File
@@ -478,7 +478,7 @@ func TestMultiPIDNSKill(t *testing.T) {
// Wait until all processes are created.
for _, c := range containers {
if err := waitForProcessCount(c, processes); err != nil {
t.Fatalf("error waitting for processes: %v", err)
t.Fatalf("error waiting for processes: %v", err)
}
}
@@ -496,7 +496,7 @@ func TestMultiPIDNSKill(t *testing.T) {
}
// Wait for the process to get killed.
if err := waitForProcessCount(c, processes-1); err != nil {
t.Fatalf("error waitting for processes: %v", err)
t.Fatalf("error waiting for processes: %v", err)
}
procs, err = c.Processes()
if err != nil {
@@ -1038,7 +1038,7 @@ func TestMultiContainerKillAll(t *testing.T) {
// Wait until all processes are created.
rootProcCount := int(math.Pow(2, 3) - 1)
if err := waitForProcessCount(containers[0], rootProcCount); err != nil {
t.Fatalf("error waitting for processes: %v", err)
t.Fatalf("error waiting for processes: %v", err)
}
procCount := int(math.Pow(2, 5) - 1)
if err := waitForProcessCount(containers[1], procCount); err != nil {
+1 -1
View File
@@ -240,7 +240,7 @@ func TestSharedVolumeFile(t *testing.T) {
// read inside.
f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY, 0)
if err != nil {
t.Fatalf("Error openning file %q: %v", filename, err)
t.Fatalf("Error opening file %q: %v", filename, err)
}
defer f.Close()
if _, err := f.Write([]byte("host")); err != nil {

Some files were not shown because too many files have changed in this diff Show More