mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-20264 jstests/core/hostinfo.js fails on s390x
This commit is contained in:
parent
e347067334
commit
21d4e1be28
@ -269,7 +269,7 @@ public:
|
||||
while (fgets(fstr, 1023, f) != NULL && !feof(f)) {
|
||||
// until the end of the file
|
||||
fstr[strlen(fstr) < 1 ? 0 : strlen(fstr) - 1] = '\0';
|
||||
if (strncmp(fstr, "processor\t:", 11) == 0)
|
||||
if (strncmp(fstr, "processor ", 10) == 0 || strncmp(fstr, "processor\t:", 11) == 0)
|
||||
++procCount;
|
||||
if (strncmp(fstr, "cpu MHz\t\t:", 10) == 0)
|
||||
freq = fstr + 11;
|
||||
|
@ -48,4 +48,10 @@ TEST(ProcessInfo, NonZeroPageSize) {
|
||||
ASSERT_GREATER_THAN(ProcessInfo::getPageSize(), 0u);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(ProcessInfo, GetNumCoresReturnsNonZeroNumberOfProcessors) {
|
||||
ProcessInfo processInfo;
|
||||
ProcessInfo::initializeSystemInfo();
|
||||
ASSERT_GREATER_THAN((int)processInfo.getNumCores(), 0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user