Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for testprogcgo (0.21 sec)

  1. src/runtime/crash_cgo_test.go

    	// Don't call t.Parallel, since too much work going on at the
    	// same time can cause the testprogcgo code to overrun its
    	// timeouts (issue #18598).
    
    	if testing.Short() && runtime.GOOS == "windows" {
    		t.Skip("Skipping in short mode") // takes up to 64 seconds
    	}
    	got := runTestProg(t, "testprogcgo", "CgoSignalDeadlock")
    	want := "OK\n"
    	if got != want {
    		t.Fatalf("expected %q, but got:\n%s", want, got)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 16:44:47 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  2. src/runtime/testdata/testprogcgo/bigstack1_windows.c

    // Copyright 2021 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 is not in bigstack_windows.c because it needs to be part of
    // testprogcgo but is not part of the DLL built from bigstack_windows.c.
    
    #include "_cgo_export.h"
    
    void CallGoBigStack1(char* p) {
    	goBigStack1(p);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 12 16:07:12 UTC 2021
    - 379 bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/dll_windows.go

    // license that can be found in the LICENSE file.
    
    package main
    
    /*
    #include <windows.h>
    
    DWORD getthread() {
    	return GetCurrentThreadId();
    }
    */
    import "C"
    import "runtime/testdata/testprogcgo/windows"
    
    func init() {
    	register("CgoDLLImportsMain", CgoDLLImportsMain)
    }
    
    func CgoDLLImportsMain() {
    	C.getthread()
    	windows.GetThread()
    	println("OK")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 18:56:19 UTC 2019
    - 459 bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/nooptcgolink_test.go

    	testenv.MustHaveCGO(t)
    	dir := t.TempDir()
    	cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-gcflags=-N -l", "-o", filepath.Join(dir, "a.out"))
    	cmd.Dir = filepath.Join(testenv.GOROOT(t), "src", "runtime", "testdata", "testprogcgo")
    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		t.Logf("go build output: %s", out)
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:22:14 UTC 2022
    - 733 bytes
    - Viewed (0)
  5. src/runtime/coro_test.go

    		"CoroCgoCallbackIterCallbackYield",
    		"CoroCgoCallbackAfterPull",
    		"CoroCgoStopCallback",
    		"CoroCgoStopCallbackIterNested",
    	} {
    		t.Run(test, func(t *testing.T) {
    			checkCoroTestProgOutput(t, runTestProg(t, "testprogcgo", test))
    		})
    	}
    }
    
    func checkCoroTestProgOutput(t *testing.T, output string) {
    	t.Helper()
    
    	c := strings.SplitN(output, "\n", 2)
    	if len(c) == 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 21:36:37 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. src/runtime/trace_cgo_test.go

    // tracefpunwindoff being set to 0 or 1.
    func TestTraceUnwindCGO(t *testing.T) {
    	if *flagQuick {
    		t.Skip("-quick")
    	}
    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    
    	exe, err := buildTestProg(t, "testprogcgo")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	wantLogs := []string{
    		"goCalledFromC",
    		"goCalledFromCThread",
    	}
    	logs := make(map[string]*trace.Event)
    	for _, category := range wantLogs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. src/cmd/link/dwarf_test.go

    		t.Skipf("skipping on %s/%s: no DWARF symbol table in executables", runtime.GOOS, runtime.GOARCH)
    	}
    
    	t.Parallel()
    
    	for _, prog := range []string{"testprog", "testprogcgo"} {
    		prog := prog
    		expectDWARF := expectDWARF
    		if runtime.GOOS == "aix" && prog == "testprogcgo" {
    			extld := os.Getenv("CC")
    			if extld == "" {
    				extld = "gcc"
    			}
    			extldArgs, err := quoted.Split(extld)
    			if err != nil {
    				t.Fatal(err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 17:05:14 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  8. src/runtime/crash_test.go

    	}
    }
    
    func testCrashHandler(t *testing.T, cgo bool) {
    	type crashTest struct {
    		Cgo bool
    	}
    	var output string
    	if cgo {
    		output = runTestProg(t, "testprogcgo", "Crash")
    	} else {
    		output = runTestProg(t, "testprog", "Crash")
    	}
    	want := "main: recovered done\nnew-thread: recovered done\nsecond-new-thread: recovered done\nmain-again: recovered done\n"
    	if output != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 27K bytes
    - Viewed (0)
  9. src/runtime/syscall_windows_test.go

    func TestBigStackCallbackSyscall(t *testing.T) {
    	if _, err := exec.LookPath("gcc"); err != nil {
    		t.Skip("skipping test: gcc is missing")
    	}
    
    	srcname, err := filepath.Abs("testdata/testprogcgo/bigstack_windows.c")
    	if err != nil {
    		t.Fatal("Abs failed: ", err)
    	}
    
    	tmpdir := t.TempDir()
    
    	outname := "mydll.dll"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/noder/lex_test.go

    	}
    
    	for _, tt := range tests {
    		got := pragmaFields(tt.in)
    		if !eq(got, tt.want) {
    			t.Errorf("pragmaFields(%q) = %v; want %v", tt.in, got, tt.want)
    			continue
    		}
    	}
    }
    
    func TestPragcgo(t *testing.T) {
    	type testStruct struct {
    		in   string
    		want []string
    	}
    
    	var tests = []testStruct{
    		{`go:cgo_export_dynamic local`, []string{`cgo_export_dynamic`, `local`}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:39:06 UTC 2020
    - 3.6K bytes
    - Viewed (0)
Back to top