Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix win32 breakage 18 dec #9399

Merged
merged 7 commits into from
Dec 20, 2019
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions test/common/common/mem_block_builder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,24 @@ TEST(MemBlockBuilderTest, AppendUint32) {
EXPECT_EQ(0, mem_block.capacity());
}

TEST(MemBlockBuilderTest, AppendOneTooMuch) {
MemBlockBuilder<uint8_t> mem_block(1);
mem_block.appendOne(1);
EXPECT_DEATH({ mem_block.appendOne(2); },
#ifdef ENVOY_CONFIG_COVERAGE
"" // For some reason, this test under coverage generates a list of testdata/*.
// For some reason, this test under coverage generates a list of testdata/*.
static const char expected_death_regex[] = "";
#else
".*insufficient capacity.*"
static const char expected_death_regex[] = ".*insufficient capacity.*";
#endif
);

TEST(MemBlockBuilderTest, AppendOneTooMuch) {
MemBlockBuilder<uint8_t> mem_block(1);
mem_block.appendOne(1);
EXPECT_DEATH({ mem_block.appendOne(2); }, expected_death_regex);
}

TEST(MemBlockBuilderTest, AppendDataTooMuch) {
MemBlockBuilder<uint8_t> mem_block(1);
const uint8_t foo[] = {1, 2};
EXPECT_DEATH({ mem_block.appendData(absl::MakeConstSpan(foo, ABSL_ARRAYSIZE(foo))); },
#ifdef ENVOY_CONFIG_COVERAGE
"" // For some reason, this test under coverage generates a list of testdata/*.
#else
".*insufficient capacity.*"
#endif
);
expected_death_regex);
}

} // namespace Envoy
2 changes: 1 addition & 1 deletion test/common/config/metadata_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class TypedMetadataTest : public testing::Test {

struct Bar : public TypedMetadata::Object {};

class FooFactory : public TypedMetadataFactory::TypedMetadataFactory {
class FooFactory : public TypedMetadataFactory {
public:
const std::string name() const override { return "foo"; }
// Throws EnvoyException (conversion failure) if d is empty.
Expand Down
6 changes: 3 additions & 3 deletions tools/clang_tools/api_booster/main.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Upgrade a single Envoy C++ file to the latest API version.
//
// Currently this tool is a WiP and only does inference of .pb[.validate].h
// Currently this tool is a WIP and only does inference of .pb[.validate].h
// #include locations. This already exercises some of the muscles we need, such
// as AST matching, rudimentary type inference and API type database lookup.
//
Expand Down Expand Up @@ -129,7 +129,7 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback,
return true;
}

// Visitor callback for end of a compiation unit.
// Visitor callback for end of a compilation unit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove "compiation" from the dictionary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not on our fork. Will have to merge to master first.

void handleEndSource() override {
// Dump known API header paths to stdout for api_boost.py to rewrite with
// (no rewriting support in this tool yet).
Expand Down Expand Up @@ -194,7 +194,7 @@ class ApiBooster : public clang::ast_matchers::MatchFinder::MatchCallback,
// Die hard if we don't have a useful proto type for something that looks
// like an API type(modulo a short whitelist).
std::cerr << "Unknown API type: " << proto_type_name << std::endl;
// TODO(htuch): mabye there is a nicer way to terminate AST traversal?
// TODO(htuch): maybe there is a nicer way to terminate AST traversal?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest you might be better off tracking the commit that added these, and work backwards to correct them (these are simply files that trip up verify on our roll-up of work, we didn't look for every misspelling.) These are only the few that we found, this was obviously pushed no-verify, and the spelling words added after the fact.

(see: [https://github.com//pull/9241] )

::exit(1);
}

Expand Down
11 changes: 9 additions & 2 deletions tools/spelling_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CTXs
CVC
CVE
CX
CYGWIN
DER
DESC
DFATAL
Expand All @@ -57,7 +58,9 @@ DNS
DRYs
DS
DST
DW
EADDRINUSE
EADDRNOTAVAIL
EAGAIN
ECDH
ECDHE
Expand Down Expand Up @@ -91,6 +94,7 @@ FCDS
FFFF
FIN
FIPS
FIRSTHDR
FQDN
FREEBIND
FUZZER
Expand Down Expand Up @@ -150,6 +154,7 @@ LDS
LEV
LF
LHS
LLVM
LRS
MB
MD
Expand All @@ -165,6 +170,7 @@ NACKs
NBF
NBSP
NDEBUG
NEXTHDR
NGHTTP
NOAUTH
NODELAY
Expand Down Expand Up @@ -299,6 +305,7 @@ VLOG
VM
WASM
WAVM
WIP
WKT
WRR
WS
Expand Down Expand Up @@ -421,7 +428,6 @@ codings
combinatorial
comparator
compat
compiation
completable
cond
condvar
Expand Down Expand Up @@ -572,6 +578,7 @@ goog
google
goto
gzip
hackery
hacky
handshaker
hardcoded
Expand Down Expand Up @@ -648,6 +655,7 @@ lenenc
lexically
libc
libevent
libtool
libstdc
libtooling
lifecycle
Expand All @@ -671,7 +679,6 @@ lowp
ltrim
lua
lyft
mabye
maglev
malloc
matchable
Expand Down
2 changes: 1 addition & 1 deletion tools/type_whisperer/api_type_db.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct TypeInformation {

// We don't expose the raw API type database to consumers, as this requires RTTI
// and this may be linked in environments where this is not available (e.g.
// libtooling binaries).
// libtool binaries).
class ApiTypeDb {
public:
static absl::optional<TypeInformation> getLatestTypeInformation(const std::string& type_name);
Expand Down