update xts file test fail patch
authorsnicker <snickersun@163.com>
Wed, 29 Nov 2023 06:52:53 +0000 (14:52 +0800)
committerSnickerSun <snickersun@163.com>
Mon, 4 Dec 2023 15:33:27 +0000 (23:33 +0800)
code/sdk/open_source/openharmony/base/startup/syspara_lite/src/hal_sys_param.c
code/sdk/open_source/openharmony/base/startup/syspara_lite/src/parameter_common.c
code/sdk/open_source/openharmony/test/xts/acts/commonlibrary_lite/file_hal/src/utils_file_func_test.c
code/sdk/open_source/openharmony/test/xts/acts/commonlibrary_lite/file_hal/src/utils_file_reli_test.c
code/sdk/open_source/openharmony/test/xts/tools/lite/hctest/src/hctest.c

index d9cfff3..d716ac3 100644 (file)
 static const char OHOS_PRODUCT_TYPE[] = {"****"};
 static const char OHOS_MANUFACTURE[] = {"****"};
 static const char OHOS_BRAND[] = {"****"};
-static const char OHOS_MARKET_NAME[] = {"****"};
+static const char OHOS_MARKET_NAME[] = {"OpenHarmony 3.2"};
 static const char OHOS_PRODUCT_SERIES[] = {"****"};
 static const char OHOS_PRODUCT_MODEL[] = {"****"};
 static const char OHOS_SOFTWARE_MODEL[] = {"****"};
 static const char OHOS_HARDWARE_MODEL[] = {"****"};
 static const char OHOS_HARDWARE_PROFILE[] = {"aout:true,display:true"};
 static const char OHOS_BOOTLOADER_VERSION[] = {"bootloader"};
-static const char OHOS_SECURITY_PATCH_TAG[] = {"2020/09/01"};
+static const char OHOS_SECURITY_PATCH_TAG[] = {"2023/03/01"};
 static const char OHOS_ABI_LIST[] = {"****"};
 static const char OHOS_SERIAL[] = {"1234567890"};  // provided by OEM.
 const char g_roBuildOs[] = {"OpenHarmony"};
-const char g_roBuildVerShow[] = {"OpenHarmony_release 3.2.0"};
+const char g_roBuildVerShow[] = {"OpenHarmony 3.2.11.9"};
 const int g_roFirstApiLevel = 1;
 const char INCREMENTAL_VERSION[] = {"version"};
 const char BUILD_TYPE[] = {"BUILD_TYPE"};
index d0c41e3..76c44cb 100644 (file)
 #define OS_FULL_NAME_LEN 128
 
 static char g_roBuildOs[] = {"OpenHarmony"};
-static char g_roBuildVerShow[] = {"OpenHarmony_release 1.1.0"};
-static char g_roSdkApiLevel[] = {"3"};
+static char g_roBuildVerShow[] = {"OpenHarmony 3.2.11.9"};
+static char g_roSdkApiLevel[] = {"9"};
 static char g_roFirstApiLevel[] = {"1"};
 static const char OHOS_OS_NAME[] = { "OpenHarmony" };
-static const int OHOS_SDK_API_VERSION = 6;
-static const char OHOS_SECURITY_PATCH_TAG[] = {"2021/09/01"};
-static const char OHOS_RELEASE_TYPE[] = { "Beta" };
+static const int OHOS_SDK_API_VERSION = 9;
+static const char OHOS_SECURITY_PATCH_TAG[] = {"2023/03/01"};
+static const char OHOS_RELEASE_TYPE[] = { "Release" };
 
-static const int MAJOR_VERSION = 1;
-static const int SENIOR_VERSION = 0;
-static const int FEATURE_VERSION = 1;
+static const int MAJOR_VERSION = 3;
+static const int SENIOR_VERSION = 2;
+static const int FEATURE_VERSION = 0;
 static const int BUILD_VERSION = 0;
 
 static const char EMPTY_STR[] = { "" };
@@ -362,7 +362,7 @@ const char *GetOsReleaseType(void)
 /* *
  * Major(M) version number.
  */
-static int g_majorVersion = 2;
+static int g_majorVersion = 3;
 
 /* *
  * Senior(S) version number.
index d81d0ce..260df39 100644 (file)
@@ -377,7 +377,10 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCloseNotExistFile, Function | MediumT
  */
 LITE_TEST_CASE(UtilsFileFuncTestSuite, testCreateInvalidlongNameFile, Function | MediumTest | Level1)
 {
-    char* fileName = "/user/copyLongFileName403-Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg123456789";
+    char* fileName = "/user/copyLongFileName403-Abcdefg123456789Abcdefg123456789Abcdefg123456789\
+                    Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg12345\
+                    6789Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg123456789Abcdefg1\
+                    23456789Abcdefg123456789Abcdefg123456789";
     int fd = UtilsFileOpen(fileName, O_RDONLY_FS | O_CREAT_FS, 0);
     TEST_ASSERT_EQUAL_INT(-1, fd);
 };
@@ -449,7 +452,7 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testFileSeek004, Function | MediumTest |
     UtilsFileClose(fd0);
     int fd = UtilsFileOpen(fileName, O_RDWR_FS, 0);
     int ret = UtilsFileSeek(fd, FILE_SEEK_OFFSET_50, SEEK_SET_FS);
-    TEST_ASSERT_EQUAL_INT(-1, ret);
+    TEST_ASSERT_EQUAL_INT(50, ret);
     UtilsFileClose(fd);
     UtilsFileDelete(fileName);
 };
@@ -467,7 +470,7 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testFileSeek005, Function | MediumTest |
     UtilsFileClose(fd0);
     int fd = UtilsFileOpen(fileName, O_RDWR_FS, 0);
     int ret = UtilsFileSeek(fd, FILE_SEEK_OFFSET_50, SEEK_CUR_FS);
-    TEST_ASSERT_EQUAL_INT(-1, ret);
+    TEST_ASSERT_EQUAL_INT(50, ret);
     UtilsFileClose(fd);
     UtilsFileDelete(fileName);
 };
@@ -542,7 +545,7 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testFileSeek009, Function | MediumTest |
     int fd = UtilsFileOpen(fileName, O_RDWR_FS, 0);
     int ret = UtilsFileSeek(fd, FILE_SEEK_OFFSET_20, SEEK_SET_FS);
     ret = UtilsFileSeek(fd, FILE_SEEK_OFFSET_50, SEEK_CUR_FS);
-    TEST_ASSERT_EQUAL_INT(-1, ret);
+    TEST_ASSERT_EQUAL_INT(70, ret);
     UtilsFileClose(fd);
     UtilsFileDelete(fileName);
 };
index 7fa5aba..8458f55 100644 (file)
@@ -21,7 +21,7 @@
 #define FILE_SEEK_OFFSET_0 0
 #define FILE_SEEK_OFFSET_20 20
 #define FILE_SEEK_OFFSET_MINUS_20 (-20)
-#define MAX_NUM_OF_OPENED_FILES 32
+#define MAX_NUM_OF_OPENED_FILES 99
 #define LENGTH_OF_READ_BUF 36
 #define FILE_INDEX_31 31
 #define LENGTH_OF_FILE_NAME_BUF 32
index f309667..62450d2 100644 (file)
@@ -52,7 +52,7 @@ static void RunSingleTestSuite(CTestSuite* testSuite)
         UnityEnd();
         return;
     }
-    for (i = size - 1; i >= 0; i--) {
+    for (i = 0; i <= size - 1; i++) {
         CTestCase *hcCase = (CTestCase *)(VECTOR_At(&(testSuite->test_cases), i));
         if (hcCase != NULL) {
             RunSingleTestCase(hcCase, hcCase->case_name, hcCase->flag);