!15 修复主线代码门禁告警

Merge pull request !15 from syz_huawei/master
This commit is contained in:
openharmony_ci 2022-03-30 10:33:01 +00:00 committed by Gitee
commit 0ec877016c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -13,24 +13,25 @@
* limitations under the License.
*/
#include "gtest/gtest.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include <fcntl.h>
#include <errno.h>
#include <cerrno>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <limits.h>
#include <climits>
#include "gtest/gtest.h"
#include "dmabuf_alloc.h"
#define BUFFER_SIZE 128
using namespace testing;
using namespace testing::ext;
namespace {
const int BUFFER_SIZE = 128;
class DmabufAllocTest : public testing::Test {
public:
static void SetUpTestCase();
@ -120,7 +121,7 @@ HWTEST_F(DmabufAllocTest, ShareBufferBetweenProcess, Function|MediumTest|Level1)
exit(EXIT_SUCCESS);
}
/* parent process */
waitpid(pid, NULL, 0);
waitpid(pid, nullptr, 0);
ASSERT_EQ(0, DmabufHeapBufferSyncStart(buffer.fd, DMA_BUF_HEAP_BUF_SYNC_RW));
@ -258,4 +259,5 @@ HWTEST_F(DmabufAllocTest, ExchangeBufferSyncOrder, Function|MediumTest|Level1)
ASSERT_EQ(0, DmabufHeapBufferFree(&buffer));
ASSERT_EQ(0, DmabufHeapClose(heapFd));
}
}