CONTRIBUTING: add style guide pointer
Change-Id: I93a78a6b2bb2eaa69046c6cfecee2e4cfcf20e44 PiperOrigin-RevId: 243140359
This commit is contained in:
parent
fab6352ac8
commit
efacb8d900
|
@ -32,7 +32,9 @@ directory tree.
|
|||
|
||||
### Coding Guidelines
|
||||
|
||||
All code should conform to the [Go style guidelines][gostyle].
|
||||
All Go code should conform to the [Go style guidelines][gostyle]. C++ code
|
||||
should conform to the [Google C++ Style Guide][cppstyle] and the guidelines
|
||||
described for [tests][teststyle].
|
||||
|
||||
As a secure runtime, we need to maintain the safety of all of code included in
|
||||
gVisor. The following rules help mitigate issues.
|
||||
|
@ -130,8 +132,10 @@ Contributions made by corporations are covered by a different agreement than the
|
|||
one above, the
|
||||
[Software Grant and Corporate Contributor License Agreement][gccla].
|
||||
|
||||
[cppstyle]: https://google.github.io/styleguide/cppguide.html
|
||||
[gcla]: https://cla.developers.google.com/about/google-individual
|
||||
[gccla]: https://cla.developers.google.com/about/google-corporate
|
||||
[gerrit]: https://gvisor-review.googlesource.com
|
||||
[gostyle]: https://github.com/golang/go/wiki/CodeReviewComments
|
||||
[repo]: https://gvisor.googlesource.com
|
||||
[teststyle]: ./test/
|
||||
|
|
|
@ -92,19 +92,16 @@ fixtures.
|
|||
A test utility should be created when there is more than one test that requires
|
||||
that same functionality, otherwise the class should be test local.
|
||||
|
||||
|
||||
## Save/Restore support in tests
|
||||
|
||||
gVisor supports save/restore, and our syscall tests are written in a way to
|
||||
enable saving/restoring at certain points. Hence, there are calls to
|
||||
`MaybeSave`, and certain tests that should not trigger saves are named with
|
||||
`NoSave`.
|
||||
|
||||
However, the current open-source test runner does not yet support triggering
|
||||
save/restore, so these functions and annotations have no effect on the
|
||||
open-source tests.
|
||||
|
||||
We plan on extending our open-source test runner to trigger save/restore. Until
|
||||
then, these functions and annotations should be ignored.
|
||||
|
||||
save/restore, so these functions and annotations have no effect on the tests. We
|
||||
plan on extending the test runner to trigger save/restore. Until then, these
|
||||
functions and annotations should be ignored.
|
||||
|
||||
[googletest]: https://github.com/abseil/googletest
|
||||
|
|
Loading…
Reference in New Issue