|
@@ -19,6 +19,7 @@
|
|
#include "hdfs/hdfs.h"
|
|
#include "hdfs/hdfs.h"
|
|
#include "hdfspp/hdfspp.h"
|
|
#include "hdfspp/hdfspp.h"
|
|
#include <native_mini_dfs.h>
|
|
#include <native_mini_dfs.h>
|
|
|
|
+#include "x-platform/syscall.h"
|
|
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <gmock/gmock.h>
|
|
#include <gmock/gmock.h>
|
|
@@ -92,7 +93,7 @@ public:
|
|
hdfsFile file = hdfsOpenFile(*this, path.c_str(), O_WRONLY, 0, 0, 0);
|
|
hdfsFile file = hdfsOpenFile(*this, path.c_str(), O_WRONLY, 0, 0, 0);
|
|
EXPECT_NE(nullptr, file);
|
|
EXPECT_NE(nullptr, file);
|
|
void * buf = malloc(size);
|
|
void * buf = malloc(size);
|
|
- explicit_bzero(buf, size);
|
|
|
|
|
|
+ XPlatform::Syscall::ClearBufferSafely(buf, size);
|
|
EXPECT_EQ(1024, hdfsWrite(*this, file, buf, size));
|
|
EXPECT_EQ(1024, hdfsWrite(*this, file, buf, size));
|
|
EXPECT_EQ(0, hdfsCloseFile(*this, file));
|
|
EXPECT_EQ(0, hdfsCloseFile(*this, file));
|
|
free(buf);
|
|
free(buf);
|