Skip to content

cmd/cgo: add a field errTextRegexp to all ptrTest that are expected to fail #76229

@ariel-anieli

Description

@ariel-anieli

This issue lays out the changes that will be done in pointer tests.

CL 711801 introduced the field errTextRegexp in the struct ptrTest; errTextRegexp contains the regexp that must be matched if a pointer test fails.

Below are the pointer tests that are expected to fail:

  • ptr1
  • ptr2
  • ptrfield
  • sliceptr1
  • sliceptr2
  • var1 CL 718900
  • barrier
  • barrierstruct
  • barrierslice
  • barriergcprogarray
  • barriergcprogarrayheap
  • barriergcprogstruct
  • barriergcprogstructheap
  • export1
  • passstringslice
  • retstring
  • defer1
  • union1
  • slicedata
  • arraypointer2 CL 718900
  • argmap CL 711801
  • retmap CL 711801

Roadmap

The changes will be done in two steps:

  1. Add errTextRegexp to each test (see CL 718900).
  2. When all tests will have their corresponding errTextRegexp, remove the default case introduced by CL 711801.

Verification

After errTextRegexp is added to a test, all pointer tests should succeed:

# pwd
/mnt/go

# cd src/
# ./run.bash cmd/cgo/internal/testerrors

##### Building packages and commands.

##### Test execution environment.
# GOARCH: amd64
# CPU: Intel(R) Core(TM) Ultra 7 155U
# GOOS: linux
# OS Version: Linux 6.16.3-76061603-generic #202508231538~1761055796~22.04~ba79424 SMP PREEMPT_DYNAMIC Tue O x86_64

##### Testing packages.
ok      cmd/cgo/internal/testerrors     2.495s

ALL TESTS PASSED (some were excluded)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImplementationIssues describing a semantics-preserving change to the Go implementation.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions