Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions cmd/oci-runtime-tool/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var generateFlags = []cli.Flag{
cli.StringSliceFlag{Name: "linux-gidmappings", Usage: "add GIDMappings e.g HostID:ContainerID:Size"},
cli.StringSliceFlag{Name: "linux-hugepage-limits-add", Usage: "add hugepage resource limits"},
cli.StringSliceFlag{Name: "linux-hugepage-limits-drop", Usage: "drop hugepage resource limits"},
cli.StringFlag{Name: "linux-intelRdt-closid", Usage: "RDT Class of Service, i.e. group under the resctrl pseudo-filesystem which to associate the container with"},
cli.StringFlag{Name: "linux-intelRdt-l3CacheSchema", Usage: "specifies the schema for L3 cache id and capacity bitmask"},
cli.StringSliceFlag{Name: "linux-masked-paths", Usage: "specifies paths can not be read inside container"},
cli.Uint64Flag{Name: "linux-mem-kernel-limit", Usage: "kernel memory limit (in bytes)"},
Expand Down Expand Up @@ -740,6 +741,10 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
}
}

if context.IsSet("linux-intelRdt-closid") {
g.SetLinuxIntelRdtClosID(context.String("linux-intelRdt-closid"))
}

if context.IsSet("linux-intelRdt-l3CacheSchema") {
g.SetLinuxIntelRdtL3CacheSchema(context.String("linux-intelRdt-l3CacheSchema"))
}
Expand Down
1 change: 1 addition & 0 deletions completions/bash/oci-runtime-tool
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ _oci-runtime-tool_generate() {
--linux-gidmappings
--linux-hugepage-limits-add
--linux-hugepage-limits-drop
--linux-intelRdt-closid
--linux-intelRdt-l3CacheSchema
--linux-masked-paths
--linux-mem-kernel-limit
Expand Down
8 changes: 7 additions & 1 deletion generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func New(os string) (generator Generator, err error) {
Destination: "/dev",
Type: "tmpfs",
Source: "tmpfs",
Options: []string{"nosuid", "strictatime", "mode=755", "size=65536k"},
Options: []string{"nosuid", "noexec", "strictatime", "mode=755", "size=65536k"},
},
{
Destination: "/dev/pts",
Expand Down Expand Up @@ -604,6 +604,12 @@ func (g *Generator) SetLinuxCgroupsPath(path string) {
g.Config.Linux.CgroupsPath = path
}

// SetLinuxIntelRdtClosID sets g.Config.Linux.IntelRdt.ClosID
func (g *Generator) SetLinuxIntelRdtClosID(clos string) {
g.initConfigLinuxIntelRdt()
g.Config.Linux.IntelRdt.ClosID = clos
}

// SetLinuxIntelRdtL3CacheSchema sets g.Config.Linux.IntelRdt.L3CacheSchema
func (g *Generator) SetLinuxIntelRdtL3CacheSchema(schema string) {
g.initConfigLinuxIntelRdt()
Expand Down
26 changes: 10 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@ go 1.16

require (
github.com/blang/semver v3.5.0+incompatible
github.com/hashicorp/go-multierror v1.0.0
github.com/google/uuid v1.3.0
github.com/hashicorp/go-multierror v1.1.1
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058
github.com/mrunalp/fileutils v0.5.0
github.com/opencontainers/runtime-spec v1.0.3-0.20201121164853-7413a7f753e1
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01
github.com/satori/go.uuid v1.1.0
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8
github.com/opencontainers/selinux v1.9.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.3.0
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
github.com/urfave/cli v1.19.1
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/sys v0.0.0-20191115151921-52ab43148777
)

require (
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35 // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
require gopkg.in/yaml.v2 v2.4.0 // indirect
52 changes: 28 additions & 24 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388 h1:c9n+0y02ovmvU9O/gS/fqw6HRlUwG645A2AJckmQVy0=
github.com/davecgh/go-spew v1.1.1-0.20170829195320-a47672248388/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b h1:Ga1nclDSe8gOw37MVLMhfu2QKWtD6gvtQ298zsKVh8g=
github.com/mndrix/tap-go v0.0.0-20171203230836-629fa407e90b/go.mod h1:pzzDgJWZ34fGzaAZGFW22KVZDfyrYW+QABMrWnJBnSs=
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058 h1:A4y2IxU1GcIzlcmUlQ6yr/mrvYZhqo+HakAPwgwaa6s=
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4=
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
github.com/opencontainers/runtime-spec v1.0.3-0.20201121164853-7413a7f753e1 h1:UAfI7SOCo1CNIu3RevW9B4HQyf7SY5aSzcSeoC7OPs0=
github.com/opencontainers/runtime-spec v1.0.3-0.20201121164853-7413a7f753e1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01 h1:dnzLtetwnb+YigvM1T8m88Gvtum9Z+XA4r7WqWz+dlk=
github.com/opencontainers/selinux v1.0.1-0.20190118194646-2d93b96e1a01/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
github.com/opencontainers/selinux v1.9.1 h1:b4VPEF3O5JLZgdTDBmGepaaIbAo0GqoF6EBRq5f/g3Y=
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/satori/go.uuid v1.1.0 h1:B9KXyj+GzIpJbV7gmr873NsY6zpbxNy24CBtGrk7jHo=
github.com/satori/go.uuid v1.1.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235 h1:aPIH7fk87dLHot2nJ8bbakmAgwM4RZJtGEkwQ52pQCg=
github.com/sirupsen/logrus v1.0.2-0.20170713114250-a3f95b5c4235/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4 h1:c5DdG2to+wHgjlxcmknq5BnzaaJ0N0W842kLlOSurXc=
github.com/stretchr/testify v1.1.5-0.20170809224252-890a5c3458b4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8 h1:zLV6q4e8Jv9EHjNg/iHfzwDkCve6Ua5jCygptrtXHvI=
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/urfave/cli v1.19.1 h1:0mKm4ZoB74PxYmZVua162y1dGt1qc10MyymYRBf3lb8=
github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35 h1:0TnXeVP6mx+A4CBf8cQVkQfkhyGBQCmJcT4g6zKzm7M=
github.com/xeipuuv/gojsonpointer v0.0.0-20170225233418-6fe8760cad35/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c h1:XZWnr3bsDQWAZg4Ne+cPoXRPILrNlPNQfxBuwLl43is=
github.com/xeipuuv/gojsonreference v0.0.0-20150808065054-e02fc20de94c/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1 h1:p7SJSlzQ0w/wo+yjj+lnaOsAFlC0AL+t6QWkR2P7X18=
github.com/xeipuuv/gojsonschema v0.0.0-20170528113821-0c8571ac0ce1/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2 h1:niKkabq6kYToDafvvFw9MeTkT4ifSvpOCRP6pFxOCZE=
golang.org/x/sys v0.0.0-20170407050850-f3918c30c5c2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777 h1:wejkGHRTr38uaKRqECZlsCsJ1/TGxIyFbH32x5zUdu4=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
4 changes: 4 additions & 0 deletions man/oci-runtime-tool-generate.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ read the configuration from `config.json`.
Drop hugepage rsource limits. Just need to specify PAGESIZE. e.g. --linux-hugepage-limits-drop=4MB
This option can be specified multiple times.

**--linux-intelRdt-closid**=""
RDT Class of Service, i.e. group under the resctrl pseudo-filesystem, which
to associate the container with.

**--linux-intelRdt-l3CacheSchema**=""
Specifies the schema for L3 cache id and capacity bitmask.

Expand Down
5 changes: 2 additions & 3 deletions validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ func JSONSchemaURL(version string) (url string, err error) {
if err != nil {
return "", specerror.NewError(specerror.SpecVersionInSemVer, err, rspec.Version)
}
configRenamedToConfigSchemaVersion, _ := semver.Parse("1.0.0-rc2") // config.json became config-schema.json in 1.0.0-rc2
if ver.Compare(configRenamedToConfigSchemaVersion) == -1 {
return "", fmt.Errorf("unsupported configuration version (older than %s)", configRenamedToConfigSchemaVersion)
if ver.LT(semver.Version{Major: 1, Minor: 0, Patch: 2}) {
return "", errors.New("unsupported configuration version (older than 1.0.2)")
}
return fmt.Sprintf(configSchemaTemplate, version), nil
}
Expand Down
45 changes: 19 additions & 26 deletions validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,32 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.1-rc1",
Version: "1.0.99-rc1", // non-existent
},
error: "Could not read schema from HTTP, response status is 404 Not Found",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.0", // too old
},
error: "",
error: "1 error occurred:\n\t* unsupported configuration version (older than 1.0.2)\n\n",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Process: &rspec.Process{},
Version: "1.0.2",
},
error: "1 error occurred:\n\t* args: args is required\n\n",
error: "",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{},
},
error: "",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
RootfsPropagation: "",
},
Expand All @@ -82,7 +81,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
RootfsPropagation: "shared",
},
Expand All @@ -91,7 +90,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
RootfsPropagation: "rshared",
},
Expand All @@ -100,13 +99,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0-rc5",
},
error: "process: process is required",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Namespaces: []rspec.LinuxNamespace{
{
Expand All @@ -119,7 +112,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Namespaces: []rspec.LinuxNamespace{
{
Expand All @@ -132,7 +125,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand All @@ -147,7 +140,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand All @@ -162,7 +155,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand All @@ -179,7 +172,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand All @@ -192,11 +185,11 @@ func TestJSONSchema(t *testing.T) {
},
},
},
error: "linux.seccomp.syscalls.0.action: linux.seccomp.syscalls.0.action must be one of the following: \"SCMP_ACT_KILL\", \"SCMP_ACT_TRAP\", \"SCMP_ACT_ERRNO\", \"SCMP_ACT_TRACE\", \"SCMP_ACT_ALLOW\"",
error: "linux.seccomp.syscalls.0.action: linux.seccomp.syscalls.0.action must be one of the following: \"SCMP_ACT_KILL\", \"SCMP_ACT_TRAP\", \"SCMP_ACT_ERRNO\", \"SCMP_ACT_TRACE\", \"SCMP_ACT_ALLOW\", \"SCMP_ACT_LOG\"",
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand All @@ -220,7 +213,7 @@ func TestJSONSchema(t *testing.T) {
},
{
config: &rspec.Spec{
Version: "1.0.0",
Version: "1.0.2",
Linux: &rspec.Linux{
Seccomp: &rspec.LinuxSeccomp{
DefaultAction: "SCMP_ACT_ALLOW",
Expand Down Expand Up @@ -322,7 +315,7 @@ func TestCheckSemVer(t *testing.T) {
expected specerror.Code
}{
{rspec.Version, specerror.NonError},
//FIXME: validate currently only handles rpsec.Version
// FIXME: validate currently only handles rpsec.Version
{"0.0.1", specerror.NonRFCError},
{"invalid", specerror.SpecVersionInSemVer},
}
Expand Down
2 changes: 1 addition & 1 deletion validation/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/*.t
*/*.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"path/filepath"
"time"

"github.com/google/uuid"
tap "github.com/mndrix/tap-go"
"github.com/mrunalp/fileutils"
rspec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/opencontainers/runtime-tools/specerror"
"github.com/opencontainers/runtime-tools/validation/util"
uuid "github.com/satori/go.uuid"
)

func main() {
Expand All @@ -31,7 +31,7 @@ func main() {
}

testPath := filepath.Join(bundleDir, "test.json")
r.SetID(uuid.NewV4().String())
r.SetID(uuid.NewString())
// generate a config has all the testing properties
g, err := util.GetDefaultGenerator()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions validation/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/opencontainers/runtime-tools/generate"
"github.com/opencontainers/runtime-tools/specerror"
"github.com/opencontainers/runtime-tools/validation/util"
"github.com/satori/go.uuid"
"github.com/google/uuid"
)

func main() {
Expand Down Expand Up @@ -40,7 +40,7 @@ func main() {
util.Fatal(err)
}

containerID := uuid.NewV4().String()
containerID := uuid.NewString()
cases := []struct {
id string
errExpected bool
Expand Down
4 changes: 2 additions & 2 deletions validation/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/opencontainers/runtime-tools/generate"
"github.com/opencontainers/runtime-tools/specerror"
"github.com/opencontainers/runtime-tools/validation/util"
uuid "github.com/satori/go.uuid"
"github.com/google/uuid"
)

func main() {
Expand All @@ -34,7 +34,7 @@ func main() {
util.Fatal(err)
}
runningConfig.SetProcessArgs([]string{"sleep", "30"})
containerID := uuid.NewV4().String()
containerID := uuid.NewString()
testRuntime, _ := util.NewRuntime(util.RuntimeCommand, bundleDir)
cases := []struct {
config *generate.Generator
Expand Down
Loading