Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for gotFDs (0.15 sec)

  1. src/net/unixsock_readmsg_test.go

    	}
    	scm := scms[0]
    	gotFDs, err := syscall.ParseUnixRights(&scm)
    	if err != nil {
    		t.Fatalf("syscall.ParseUnixRights: %v", err)
    	}
    	if len(gotFDs) != 1 {
    		t.Fatalf("got FDs %#v: wanted only 1 fd", gotFDs)
    	}
    	defer func() {
    		if err := syscall.Close(gotFDs[0]); err != nil {
    			t.Fatalf("fail to close gotFDs: %v", err)
    		}
    	}()
    
    	flags, err := unix.Fcntl(gotFDs[0], syscall.F_GETFD, 0)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 09:15:25 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  2. src/syscall/syscall_unix_test.go

    		t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms)
    	}
    	scm := scms[0]
    	gotFds, err := syscall.ParseUnixRights(&scm)
    	if err != nil {
    		t.Fatalf("syscall.ParseUnixRights: %v", err)
    	}
    	if len(gotFds) != 1 {
    		t.Fatalf("wanted 1 fd; got %#v", gotFds)
    	}
    
    	f := os.NewFile(uintptr(gotFds[0]), "fd-from-child")
    	defer f.Close()
    
    	got, err := io.ReadAll(f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 9.4K bytes
    - Viewed (0)
  3. src/internal/types/testdata/check/gotos.go

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file is a modified copy of $GOROOT/test/goto.go.
    
    package gotos
    
    var (
    	i, n int
    	x    []int
    	c    chan int
    	m    map[int]int
    	s    string
    )
    
    // goto after declaration okay
    func _() {
    	x := 1
    	goto L
    L:
    	_ = x
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  4. pkg/model/fips.go

    // This should be called as the last policy.
    func EnforceGoCompliance(ctx *gotls.Config) {
    	switch common_features.CompliancePolicy {
    	case "":
    		return
    	case common_features.FIPS_140_2:
    		ctx.MinVersion = gotls.VersionTLS12
    		ctx.MaxVersion = gotls.VersionTLS12
    		ctx.CipherSuites = fipsGoCiphers
    		ctx.CurvePreferences = []gotls.CurveID{gotls.CurveP256}
    		return
    	default:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 22:11:02 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. pkg/kubelet/certificate/kubelet_test.go

    		t.Run(tt.name, func(t *testing.T) {
    			gotDNSNames, gotIPs := addressesToHostnamesAndIPs(tt.addresses)
    			if !reflect.DeepEqual(gotDNSNames, tt.wantDNSNames) {
    				t.Errorf("addressesToHostnamesAndIPs() gotDNSNames = %v, want %v", gotDNSNames, tt.wantDNSNames)
    			}
    			if !reflect.DeepEqual(gotIPs, tt.wantIPs) {
    				t.Errorf("addressesToHostnamesAndIPs() gotIPs = %v, want %v", gotIPs, tt.wantIPs)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 06 03:07:40 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. istioctl/pkg/cli/context_test.go

    			wantNamespace:    "default",
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.description, func(t *testing.T) {
    			gotNs := handleNamespace(tt.namespace, tt.defaultNamespace)
    			if gotNs != tt.wantNamespace {
    				t.Fatalf("unexpected namespace: wanted %v got %v", tt.wantNamespace, gotNs)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 09 18:17:49 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. src/go/types/check_test.go

    	var indices []int // list indices of matching errors, reused for each error
    	for _, err := range errlist {
    		gotPos, gotMsg := unpackError(fset, err)
    
    		// find list of errors for the respective error line
    		filename := gotPos.Filename
    		filemap := errmap[filename]
    		line := gotPos.Line
    		var errList []comment
    		if filemap != nil {
    			errList = filemap[line]
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/promise/promise_test.go

    	later := time.Now()
    	bval := &later
    	if wr.Set(bval) {
    		t.Error("Set of initialized promise returned true")
    	}
    	goGetAndExpect(t, wr, gots, aval)
    	cancel()
    	time.Sleep(time.Second) // give it a chance to misbehave
    	goGetAndExpect(t, wr, gots, aval)
    }
    
    func goGetExpectNotYet(t *testing.T, wr WriteOnce, gots chan interface{}, trigger string) {
    	go func() {
    		gots <- wr.Get()
    	}()
    	select {
    	case <-gots:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 21 19:19:31 UTC 2023
    - 3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/syntax/branches.go

    //   - invalid, unused, duplicate, and missing labels
    //   - gotos jumping over variable declarations and into blocks
    func checkBranches(body *BlockStmt, errh ErrorHandler) {
    	if body == nil {
    		return
    	}
    
    	// scope of all labels in this body
    	ls := &labelScope{errh: errh}
    	fwdGotos := ls.blockBranches(nil, targets{}, nil, body.Pos(), body.List)
    
    	// If there are any forward gotos left, no matching label was
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Jun 26 00:21:29 UTC 2022
    - 9.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/check_test.go

    	var indices []int // list indices of matching errors, reused for each error
    	for _, err := range errlist {
    		gotPos, gotMsg := unpackError(err)
    
    		// find list of errors for the respective error line
    		filename := gotPos.Base().Filename()
    		filemap := errmap[filename]
    		line := gotPos.Line()
    		var errList []syntax.Error
    		if filemap != nil {
    			errList = filemap[line]
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top