summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-04-11 14:17:03 -0700
committerShentubot <shentubot@google.com>2019-04-11 14:18:01 -0700
commitefacb8d900cd7b5ca53e5a96b65ba78a368efc02 (patch)
tree0843157b5847839b95ab0f4e2dcabbdfb83d9cf4
parentfab6352ac8de0b2c1e1e01563602912b69bdb249 (diff)
CONTRIBUTING: add style guide pointer
Change-Id: I93a78a6b2bb2eaa69046c6cfecee2e4cfcf20e44 PiperOrigin-RevId: 243140359
-rw-r--r--CONTRIBUTING.md6
-rw-r--r--test/syscalls/README.md11
2 files changed, 9 insertions, 8 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b91244de8..d6dafc595 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -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/
diff --git a/test/syscalls/README.md b/test/syscalls/README.md
index c72aaf9bc..9e0991940 100644
--- a/test/syscalls/README.md
+++ b/test/syscalls/README.md
@@ -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