Commit Graph

6 Commits

Author SHA1 Message Date
Xavier Deguillard
a29d465ee8 fs: fix license header
Summary:
With Facebook having been renamed Meta Platforms, we need to change the license
headers.

Reviewed By: fanzeyi

Differential Revision: D33407812

fbshipit-source-id: b11bfbbf13a48873f0cea75f212cc7b07a68fb2e
2022-01-04 15:00:07 -08:00
Katie Mancini
85942cfaad use portable version of gtest
Summary:
gtest includes some windows headers that will have conflicts with the
folly portability versions. This caused some issues in my in-memory tree
cache diffs (D27050310 (8a1a529fcc)).

We should probably generally be using the folly portable gtests so we can
avoid such issues in the future.

see here for more details: bd600cd4e8/folly/portability/GTest.h (L19)

I ran this with codemod yes to all

- convert all the includes with quotes:
`codemod -d eden/fs --extensions cpp,h '\#include\ "gtest/gtest\.h"' '#include <folly/portability/GTest.h>'`

- convert all the includes with brackets
`codemod -d eden/fs --extensions cpp,h '\#include\ <gtest/gtest\.h>' '#include <folly/portability/GTest.h>'`

- convert the test template
`codemod -d eden/facebook --extensions template '\#include\ <gtest/gtest\.h>' '#include <folly/portability/GTest.h>'`

then used `arc lint` to clean up all the targets files

Reviewed By: genevievehelsel, xavierd

Differential Revision: D28035146

fbshipit-source-id: c3b88df5d4e7cdf4d1e51d9689987ce039f47fde
2021-05-12 15:58:27 -07:00
Xavier Deguillard
022613e90c nfs: add missing DirListTest
Summary:
This should have been added in D27243075 (5a150e125a) but I forgot to run `hg add` and it
was thus not added...

Reviewed By: fanzeyi

Differential Revision: D27279169

fbshipit-source-id: 69807cc05fef33f51b2a491b66c2e8aeb7136deb
2021-03-24 09:45:26 -07:00
Xavier Deguillard
a7a8778dcf nfs: add a serializedSize to XdrTrait
Summary:
This simplifies a handful of tests and will make writing the READDIR RPC a bit
less magic when computing the amount of memory needed per entry.

Reviewed By: chadaustin

Differential Revision: D26802312

fbshipit-source-id: fc66cb68f721ed34c8f9879cdda2cd8db6ed8daa
2021-03-18 10:08:50 -07:00
Xavier Deguillard
8125e2e115 nfs: de-duplicate some common test functions
Summary:
The ser, de and roundtrip are duplicated 3 times in the various tests, let's
move them into a common library.

Reviewed By: chadaustin

Differential Revision: D26675989

fbshipit-source-id: 1da0bc33429795a889b72c76fa18e5fa3cb7df6f
2021-03-04 09:59:46 -08:00
Xavier Deguillard
9f1662031c nfs: de-dup XdrVariant<nfsstat3, ...> code
Summary:
The NFS RPC description is filled with variant over nfsstat3 with only 2 cases:
NFS3_OK, and the default one. I was feeling bad having to write the same code
again and again for the deserialize part of the XdrTrait, and thus came up with
a template solution that enables us to remove all of the boilerplate code.

The only drawback is that this moves the variant one additional layer down, and
that means an extra layer of brace when initializing it. From what I know,
this is caused by the -Wmissing-braces warning, maybe we could remove that
warning?

Reviewed By: kmancini

Differential Revision: D26627163

fbshipit-source-id: ab56dee42273f180b2edf4f529221a15154ac2fb
2021-02-26 08:01:25 -08:00