8319104: GtestWrapper crashes with SIGILL in AsyncLogTest::test_asynclog_raw on AIX opt
Reviewed-by: mdoerr, stuefe
This commit is contained in:
parent
b0fc8082f0
commit
0b58bdec71
@ -32,7 +32,7 @@
|
||||
#include "unittest.hpp"
|
||||
|
||||
// Test the default level for each tagset
|
||||
TEST(LogTagSet, defaults) {
|
||||
TEST_VM(LogTagSet, defaults) {
|
||||
for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
|
||||
char buf[256];
|
||||
ts->label(buf, sizeof(buf));
|
||||
@ -45,7 +45,7 @@ TEST(LogTagSet, defaults) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(LogTagSet, has_output) {
|
||||
TEST_VM(LogTagSet, has_output) {
|
||||
LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
|
||||
ts.set_output_level(LogConfiguration::StderrLog, LogLevel::Trace);
|
||||
EXPECT_TRUE(ts.has_output(LogConfiguration::StderrLog));
|
||||
@ -54,14 +54,14 @@ TEST(LogTagSet, has_output) {
|
||||
EXPECT_FALSE(ts.has_output(LogConfiguration::StderrLog));
|
||||
}
|
||||
|
||||
TEST(LogTagSet, ntags) {
|
||||
TEST_VM(LogTagSet, ntags) {
|
||||
const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
|
||||
EXPECT_EQ(1u, ts.ntags());
|
||||
const LogTagSet& ts2 = LogTagSetMapping<LOG_TAGS(logging, gc, class, safepoint, heap)>::tagset();
|
||||
EXPECT_EQ(5u, ts2.ntags());
|
||||
}
|
||||
|
||||
TEST(LogTagSet, is_level) {
|
||||
TEST_VM(LogTagSet, is_level) {
|
||||
LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
|
||||
// Set info level on stdout and verify that is_level() reports correctly
|
||||
ts.set_output_level(LogConfiguration::StdoutLog, LogLevel::Info);
|
||||
@ -72,9 +72,10 @@ TEST(LogTagSet, is_level) {
|
||||
EXPECT_FALSE(ts.is_level(LogLevel::Trace));
|
||||
ts.set_output_level(LogConfiguration::StdoutLog, LogLevel::Default);
|
||||
EXPECT_TRUE(ts.is_level(LogLevel::Default));
|
||||
ts.set_output_level(LogConfiguration::StdoutLog, LogLevel::Off);
|
||||
}
|
||||
|
||||
TEST(LogTagSet, level_for) {
|
||||
TEST_VM(LogTagSet, level_for) {
|
||||
LogOutput* output = LogConfiguration::StdoutLog;
|
||||
LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
|
||||
for (uint i = 0; i < LogLevel::Count; i++) {
|
||||
@ -83,10 +84,10 @@ TEST(LogTagSet, level_for) {
|
||||
ts.set_output_level(output, level);
|
||||
EXPECT_EQ(level, ts.level_for(output));
|
||||
}
|
||||
ts.set_output_level(output, LogLevel::Default);
|
||||
ts.set_output_level(output, LogLevel::Off);
|
||||
}
|
||||
|
||||
TEST(LogTagSet, contains) {
|
||||
TEST_VM(LogTagSet, contains) {
|
||||
// Verify that contains works as intended for a few predetermined tagsets
|
||||
const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
|
||||
EXPECT_TRUE(ts.contains(PREFIX_LOG_TAG(logging)));
|
||||
@ -112,7 +113,7 @@ TEST(LogTagSet, contains) {
|
||||
EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(heap)));
|
||||
}
|
||||
|
||||
TEST(LogTagSet, label) {
|
||||
TEST_VM(LogTagSet, label) {
|
||||
char buf[256];
|
||||
const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging, safepoint)>::tagset();
|
||||
ASSERT_NE(-1, ts.label(buf, sizeof(buf)));
|
||||
@ -138,7 +139,7 @@ TEST(LogTagSet, label) {
|
||||
|
||||
}
|
||||
|
||||
TEST(LogTagSet, duplicates) {
|
||||
TEST_VM(LogTagSet, duplicates) {
|
||||
for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
|
||||
char ts_name[512];
|
||||
ts->label(ts_name, sizeof(ts_name), ",");
|
||||
|
Loading…
Reference in New Issue
Block a user