You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
generate: Respect runtime.GOOS when generating default template
Don't fill in a bunch of Linux stuff if runtime.GOOS isn't Linux ;).
We don't have sensible defaults for other OSes yet, so error out in
those cases. This commit restores the --os argument which had
previously been removed in 597c7d4 (Remove platform, 2017-07-05,
#409).
The diff here is fairly large, because many callers depend (directly
or indirectly) on the generation code, and now all of those callers
need to be on the lookout for errors.
Generation will currently fail for all GOOS besides linux and solaris.
I doubt the Solaris default is particularly useful either; it has all
the POSIX settings from our Linux default, but I don't know enough
about Solaris to know which Solaris-specific properties should get
defaults. And while some rlimits are OS-specific, RLIMIT_NOFILE (the
only one we set in our default config) is in POSIX [1], so I've put
the rlimit config in the POSIX block.
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_resource.h.html
Signed-off-by: W. Trevor King <wking@tremily.us>
// err == nil means the 'delete' operation does NOT take effect
72
78
util.SpecErrorOK(t, err==nil, specerror.NewError(specerror.DeleteNonStopHaveNoEffect, fmt.Errorf("attempting to `delete` a container that is not `stopped` MUST have no effect on the container"), rspecs.Version), err)
0 commit comments