Skip to content

Commit bbe4f97

Browse files
authored
Merge pull request #46 from mdlayher/mdl-rewrite
vsock: rewrite on top of socket.Conn
2 parents 10d5918 + 6d7f2c5 commit bbe4f97

33 files changed

+539
-1548
lines changed

.builds/freebsd.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.builds/go-1.10.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.builds/go-1.11.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.builds/go-stable.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Linux Integration Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
go-version: [1.12, 1.17]
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go-version }}
23+
id: go
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Load the vhost_vsock kernel module
29+
run: sudo modprobe vhost_vsock
30+
31+
- name: Change the permissions of /dev/vsock for integration tests
32+
run: sudo chmod 666 /dev/vsock
33+
34+
- name: Run integration tests
35+
run: go test -v -race -run TestIntegration ./...
36+

.github/workflows/linux-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Linux Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
go-version: [1.12, 1.17]
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go-version }}
23+
id: go
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Run tests
29+
run: go test -v -race ./...

.github/workflows/macos-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: macOS Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
go-version: [1.12]
16+
runs-on: macos-latest
17+
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go-version }}
23+
id: go
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Run tests
29+
run: go test -v -race ./...
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
go-version: [1.17]
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Set up Go
20+
uses: actions/setup-go@v2
21+
with:
22+
go-version: ${{ matrix.go-version }}
23+
id: go
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Install staticcheck
29+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
30+
31+
- name: Print staticcheck version
32+
run: staticcheck -version
33+
34+
- name: Run staticcheck
35+
run: staticcheck ./...
36+
37+
- name: Run go vet
38+
run: go vet ./...

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# CHANGELOG
2+
3+
## Unreleased
4+
5+
## v1.0.0
6+
7+
**This is the first release of package vsock that only supports Go 1.12+.
8+
Users on older versions of Go must use an unstable release.**
9+
10+
- Initial stable commit!
11+
- [API change]: the `vsock.Dial` and `vsock.Listen` constructors now accept an
12+
optional `*vsock.Config` parameter to enable future expansion in v1.x.x
13+
without prompting further breaking API changes. Because `vsock.Config` has no
14+
options as of this release, `nil` may be passed in all call sites to fix
15+
existing code upon upgrading to v1.0.0.
16+
- [New API]: the `vsock.ListenContextID` function can be used to create a
17+
`*vsock.Listener` which is bound to an explicit context ID address, rather
18+
than inferring one automatically as `vsock.Listen` does.

LICENSE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
MIT License
2-
===========
1+
# MIT License
32

4-
Copyright (C) 2017 Matt Layher
3+
Copyright (C) 2017-2022 Matt Layher
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
76

0 commit comments

Comments
 (0)