diff --git a/.github/ISSUE_TEMPLATE/bug-report.yaml b/.github/ISSUE_TEMPLATE/bug-report.yaml index 8d982d1f9..6d4b0676c 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/bug-report.yaml @@ -65,6 +65,22 @@ body: - BSD validations: required: true + - type: input + id: os-version + attributes: + label: OS version + description: What's the specific version of OS? + placeholder: "Run `uname -srm` command to get the info, for example: Darwin 21.5.0 arm64, Linux 5.4.0-137-generic x86_64" + validations: + required: true + - type: input + id: go-version + attributes: + label: Go version + description: What's the specific version of Go? + placeholder: "Run `go version` command to get the info, for example: go1.20.5 linux/amd64" + validations: + required: true - type: textarea id: logs attributes: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dc36bf2d4..b2c12d4f4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,6 +8,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/codeql.yml' pull_request: branches: - master @@ -15,6 +18,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/codeql.yml' schedule: # ┌───────────── minute (0 - 59) # │ ┌───────────── hour (0 - 23) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 000000000..f9bf06351 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,19 @@ +name: Check pull request target +on: + pull_request: + types: + - opened + - reopened + - synchronize + branches: + - master +jobs: + check-branches: + runs-on: ubuntu-latest + steps: + - name: Check target branch + run: | + if [ ${{ github.head_ref }} != "dev" ]; then + echo "Only pull requests from dev branch are only allowed to be merged into master branch." + exit 1 + fi diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yml similarity index 100% rename from .github/workflows/release-drafter.yaml rename to .github/workflows/release-drafter.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a9b98950..776c3f0f4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test.yml' pull_request: branches: - master @@ -15,6 +18,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test.yml' env: GO111MODULE: on diff --git a/.github/workflows/test_gc_opt.yml b/.github/workflows/test_gc_opt.yml index d81287b78..c18da9b61 100644 --- a/.github/workflows/test_gc_opt.yml +++ b/.github/workflows/test_gc_opt.yml @@ -8,6 +8,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_gc_opt.yml' pull_request: branches: - master @@ -15,6 +18,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_gc_opt.yml' env: GO111MODULE: on diff --git a/.github/workflows/test_poll_opt.yml b/.github/workflows/test_poll_opt.yml index 665077ee9..8f1337d77 100644 --- a/.github/workflows/test_poll_opt.yml +++ b/.github/workflows/test_poll_opt.yml @@ -8,6 +8,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_poll_opt.yml' pull_request: branches: - master @@ -15,6 +18,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_poll_opt.yml' env: GO111MODULE: on diff --git a/.github/workflows/test_poll_opt_gc_opt.yml b/.github/workflows/test_poll_opt_gc_opt.yml index 7c0a09487..5af9f93aa 100644 --- a/.github/workflows/test_poll_opt_gc_opt.yml +++ b/.github/workflows/test_poll_opt_gc_opt.yml @@ -8,6 +8,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_poll_opt_gc_opt.yml' pull_request: branches: - master @@ -15,6 +18,9 @@ on: - 1.x paths-ignore: - '**.md' + - '**.yml' + - '**.yaml' + - '!.github/workflows/test_poll_opt_gc_opt.yml' env: GO111MODULE: on diff --git a/conn_matrix.go b/conn_matrix.go index 7293641ab..70ba4affa 100644 --- a/conn_matrix.go +++ b/conn_matrix.go @@ -107,6 +107,7 @@ func (cm *connMatrix) delConn(c *conn) { if cm.connCounts[row] == 0 { continue } + columnMin := -1 if row == cgfd.ConnMatrixRow() { columnMin = cgfd.ConnMatrixColumn() diff --git a/conn_matrix_test.go b/conn_matrix_test.go index 17487bb50..c081cfa67 100644 --- a/conn_matrix_test.go +++ b/conn_matrix_test.go @@ -105,9 +105,8 @@ func testConnMatrix(t *testing.T, n int) { if !ok { t.Fatalf("missing gfd for fd %d", c.fd) } - if i != gfd.ConnMatrixRow() || j != gfd.ConnMatrixColumn() { - t.Fatalf("unexpected row %d, column %d, expected row %d, column %d", - gfd.ConnMatrixRow(), gfd.ConnMatrixColumn(), i, j) + if gfd != c.gfd { + t.Fatalf("expected gfd: %v, but got gfd: %v", c.gfd, gfd) } } }