Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMincoreErrorSign (0.65 sec)

  1. src/runtime/runtime_linux_test.go

    }
    
    func TestLockOSThread(t *testing.T) {
    	if pid != tid {
    		t.Fatalf("pid=%d but tid=%d", pid, tid)
    	}
    }
    
    // Test that error values are negative.
    // Use a misaligned pointer to get -EINVAL.
    func TestMincoreErrorSign(t *testing.T) {
    	var dst byte
    	v := Mincore(unsafe.Add(unsafe.Pointer(new(int32)), 1), 1, &dst)
    
    	const EINVAL = 0x16
    	if v != -EINVAL {
    		t.Errorf("mincore = %v, want %v", v, -EINVAL)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:20:01 UTC 2023
    - 1.8K bytes
    - Viewed (0)
Back to top