aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fileop_test_set_get_remove.cpp4
-rw-r--r--test/fileop_test_utils.cpp8
-rw-r--r--test/interface_test_filebreak.cpp30
-rw-r--r--test/mock/libpthread_mock.hpp3
-rw-r--r--test/mock/libsystemd_mock.hpp3
-rw-r--r--test/mock/memory_mock.hpp3
-rw-r--r--test/mock/syscall_io_mock.hpp3
7 files changed, 33 insertions, 21 deletions
diff --git a/test/fileop_test_set_get_remove.cpp b/test/fileop_test_set_get_remove.cpp
index ae3d9f0..1428871 100644
--- a/test/fileop_test_set_get_remove.cpp
+++ b/test/fileop_test_set_get_remove.cpp
@@ -203,11 +203,11 @@ TEST_F(fileop_test_set_get_remove_test, unit_test_refop_get_redundancy_data__ref
* @retval 1 Succeeded with recover.
* @retval -1 Abnormal fail. Shall not continue.
* @retval -2 No data.
- * @retval -3 Broaken data.
+ * @retval -3 Broken data.
*/
g_refop_file_pickup_ret = -3;
ret = refop_get_redundancy_data(handle, dmybuf, 100, &getsize);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
g_refop_file_pickup_ret = -2;
ret = refop_get_redundancy_data(handle, dmybuf, 100, &getsize);
diff --git a/test/fileop_test_utils.cpp b/test/fileop_test_utils.cpp
index f95fa6f..9a6d116 100644
--- a/test/fileop_test_utils.cpp
+++ b/test/fileop_test_utils.cpp
@@ -33,13 +33,13 @@ TEST_F(fileop_test_utils, fileop_test_utils_refop_header_validation__invalid_hea
s_refop_file_header *head = &header;
int ret = -1;
- // broaken magic
+ // broken magic
refop_header_create(head, 0x1234, 64*1024*1024);
head->magic = 0;
ret = refop_header_validation(head);
ASSERT_EQ(-1, ret);
- // broaken version
+ // broken version
refop_header_create(head, 0x1234, 64*1024*1024);
head->version = 0x88888888;
head->version_inv = 0x88888888;
@@ -53,14 +53,14 @@ TEST_F(fileop_test_utils, fileop_test_utils_refop_header_validation__invalid_hea
ret = refop_header_validation(head);
ASSERT_EQ(-1, ret);
- // broaken crc
+ // broken crc
refop_header_create(head, 0x1234, 64*1024*1024);
head->crc16 = 0x8888;
head->crc16_inv = 0x8888;
ret = refop_header_validation(head);
ASSERT_EQ(-1, ret);
- // broaken size
+ // broken size
refop_header_create(head, 0x1234, 64*1024*1024);
head->size_inv = head->size;
ret = refop_header_validation(head);
diff --git a/test/interface_test_filebreak.cpp b/test/interface_test_filebreak.cpp
index fb37411..0226266 100644
--- a/test/interface_test_filebreak.cpp
+++ b/test/interface_test_filebreak.cpp
@@ -140,7 +140,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_rotate)
iret = breakfile_header_magic(latestfile);
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
memset(pbuf,0xa4,sz);
ret = refop_set_redundancy_data(handle, pbuf, sz);
@@ -193,7 +193,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
//--------------------------------------------------------------------------------------------------------
// version break
@@ -205,7 +205,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// version_inv break
memset(pbuf,0,sz);
@@ -216,7 +216,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// version val break
memset(pbuf,0,sz);
@@ -227,7 +227,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
//--------------------------------------------------------------------------------------------------------
// crc16 break
@@ -239,7 +239,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// crc16_inv break
memset(pbuf,0,sz);
@@ -250,7 +250,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// crc16 val break
memset(pbuf,0,sz);
@@ -261,7 +261,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
//--------------------------------------------------------------------------------------------------------
// size break
@@ -273,7 +273,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// size inv break
memset(pbuf,0,sz);
@@ -284,7 +284,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// size val break 1
memset(pbuf,0,sz);
@@ -295,7 +295,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
// size val break 2
memset(pbuf,0,sz);
@@ -306,7 +306,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_file_break_all)
ASSERT_EQ(0, ret);
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
ret = refop_release_redundancy_handle(handle);
ASSERT_EQ(REFOP_SUCCESS, ret);
@@ -720,7 +720,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_break_file_f4)
// f4
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
ret = refop_remove_redundancy_data(handle);
ASSERT_EQ(REFOP_SUCCESS, ret);
@@ -780,7 +780,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_del_and_break_file_f2)
// f2
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
ret = refop_remove_redundancy_data(handle);
ASSERT_EQ(REFOP_SUCCESS, ret);
@@ -840,7 +840,7 @@ TEST_F(interface_test_filebreak, interface_test_filebreak_del_and_break_file_f3)
// f3
ret = refop_get_redundancy_data(handle, prbuf, sz, &szr);
- ASSERT_EQ(REFOP_BROAKEN, ret);
+ ASSERT_EQ(REFOP_BROKEN, ret);
ret = refop_remove_redundancy_data(handle);
ASSERT_EQ(REFOP_SUCCESS, ret);
diff --git a/test/mock/libpthread_mock.hpp b/test/mock/libpthread_mock.hpp
index 61ce43c..a7a1b93 100644
--- a/test/mock/libpthread_mock.hpp
+++ b/test/mock/libpthread_mock.hpp
@@ -1,3 +1,6 @@
+/**
+ * SPDX-License-Identifier: Apache-2.0
+ */
#include <gmock/gmock.h>
#include <functional>
diff --git a/test/mock/libsystemd_mock.hpp b/test/mock/libsystemd_mock.hpp
index 34de9a0..889bb8c 100644
--- a/test/mock/libsystemd_mock.hpp
+++ b/test/mock/libsystemd_mock.hpp
@@ -1,3 +1,6 @@
+/**
+ * SPDX-License-Identifier: Apache-2.0
+ */
#include <gmock/gmock.h>
#include <functional>
diff --git a/test/mock/memory_mock.hpp b/test/mock/memory_mock.hpp
index e140840..a1f14b6 100644
--- a/test/mock/memory_mock.hpp
+++ b/test/mock/memory_mock.hpp
@@ -1,3 +1,6 @@
+/**
+ * SPDX-License-Identifier: Apache-2.0
+ */
#include <gmock/gmock.h>
#include <functional>
diff --git a/test/mock/syscall_io_mock.hpp b/test/mock/syscall_io_mock.hpp
index 6eb021a..f600068 100644
--- a/test/mock/syscall_io_mock.hpp
+++ b/test/mock/syscall_io_mock.hpp
@@ -1,3 +1,6 @@
+/**
+ * SPDX-License-Identifier: Apache-2.0
+ */
#include <gmock/gmock.h>
#include <functional>