/test/xts/acts/kernel_lite/io_posix/src/ |
D | IoTestStdio.cpp | 37 FILE *fp = nullptr; variable 38 INIT_TEST_FILE(fp); 39 FOPEN_READ(fp); 40 int ret = getc(fp); 42 ret = ungetc(ret, fp); 45 char *retS = fgets(str, sizeof(str), fp); 48 EXPECT_NE(fclose(fp), -1) << "> fclose fail, errno = " << errno; 73 FILE *fp = fmemopen(buf, sizeof(buf), "r"); variable 74 ASSERT_NE(fp, nullptr) << "> fmemopen fail, errno = " << errno; 76 char c = fgetc(fp); [all …]
|
D | IoTest.h | 40 #define INIT_TEST_FILE(fp) do { \ argument 41 FOPEN_WRITE(fp); \ 42 ASSERT_NE(fputs("hello world", fp), -1) << "fputs fail, errno = " << errno; \ 43 ASSERT_NE(fclose(fp), -1) << "fclose fail, errno = " << errno; \ 46 #define FOPEN_WRITE(fp) do { \ argument 47 fp = fopen(IOTEST_TEMPFILE, "w"); \ 48 ASSERT_NE(fp, nullptr) << "fopen fail, errno = " << errno; \ 51 #define FOPEN_READ(fp) do { \ argument 52 fp = fopen(IOTEST_TEMPFILE, "r"); \ 53 ASSERT_NE(fp, nullptr) << "fopen fail, errno = " << errno; \ [all …]
|
D | IoTestWchar.cpp | 29 int FormatVfwscanf(FILE *fp, const wchar_t *format, ...) in FormatVfwscanf() argument 33 int ret = vfwscanf(fp, format, args); in FormatVfwscanf() 38 int FormatVfwprintf(FILE *fp, const wchar_t *format, ...) in FormatVfwprintf() argument 42 int ret = vfwprintf(fp, format, args); in FormatVfwprintf() 54 FILE *fp = nullptr; variable 55 FOPEN_WRITE(fp); 56 int ret = FormatVfwprintf(fp, L"%s has %d words ", "helloworld", 10); 58 ASSERT_NE(fclose(fp), -1) << "> fclose fail, errno = " << errno; 60 FOPEN_READ(fp); 63 ret = FormatVfwscanf(fp, L"%ls has %d words ", wStr, &i); [all …]
|
D | IoTestOther.cpp | 158 FILE *fp = nullptr; variable 159 INIT_TEST_FILE(fp); 160 FOPEN_READ(fp); 162 FILENO(fp); 167 EXPECT_NE(fclose(fp), -1) << "> fclose fail, errno = " << errno; 169 FOPEN_WRITE(fp); 170 FILENO(fp); 173 EXPECT_NE(fclose(fp), -1) << "> fclose fail, errno = " << errno; 175 FOPEN_READ(fp); 177 char *gStr = fgets(str, sizeof(str), fp); [all …]
|
/test/xts/device_attest/services/oem_adapter/src/ |
D | device_attest_oem_file.c | 63 FILE* fp = fopen(formatPath, "r"); in OEMGetFileSize() local 64 if (fp == NULL) { in OEMGetFileSize() 68 if (fseek(fp, 0, SEEK_END) < 0) { in OEMGetFileSize() 70 (void)fclose(fp); in OEMGetFileSize() 73 *result = ftell(fp); in OEMGetFileSize() 75 (void)fclose(fp); in OEMGetFileSize() 96 FILE* fp = fopen(formatPath, "wb+"); in OEMWriteFile() local 97 if (fp == NULL) { in OEMWriteFile() 103 if (fwrite(data, dataLen, 1, fp) != 1) { in OEMWriteFile() 107 if (fflush(fp) != DEVICE_ATTEST_OEM_OK) { in OEMWriteFile() [all …]
|
/test/xts/acts/storage/storagefileiojstest/src/main/js/test/module_fileio/members/ |
D | fdopenStream.test.js | 39 let fp = fileio.fdopenStreamSync(fd, mode); 41 let data = fp.readSync(buf, {}); 43 expect(fp !== null).assertTrue(); 44 expect(fp.closeSync() == null).assertTrue(); 65 let fp = fileio.fdopenStreamSync(fd, mode); 88 let fp = await fileio.fdopenStream(fd, mode); 89 fp.read(new ArrayBuffer(4096), {}, function (err, data) { 90 expect(fp !== null).assertTrue(); 91 fp.closeSync(); 118 fileio.fdopenStream(fd, mode, function (err, fp) { argument [all …]
|
/test/xts/device_attest/services/core/utils/ |
D | attest_utils_file.c | 65 FILE* fp = fopen(formatPath, "r"); in GetFileSize() local 66 if (fp == NULL) { in GetFileSize() 71 if (fseek(fp, 0, SEEK_END) < 0) { in GetFileSize() 74 (void)fclose(fp); in GetFileSize() 77 *result = ftell(fp); in GetFileSize() 79 (void)fclose(fp); in GetFileSize() 103 FILE* fp = fopen(formatPath, "wb+"); in WriteFile() local 104 if (fp == NULL) { in WriteFile() 111 if (fwrite(data, dataLen, 1, fp) != 1) { in WriteFile() 116 if (fflush(fp) != ATTEST_OK) { in WriteFile() [all …]
|
/test/xts/device_attest_lite/services/core/utils/ |
D | attest_utils_file.c | 190 FILE* fp = fopen(formatPath, "r"); in GetFileSize() local 191 if (fp == NULL) { in GetFileSize() 196 if (fseek(fp, 0, SEEK_END) < 0) { in GetFileSize() 199 (void)fclose(fp); in GetFileSize() 202 *result = ftell(fp); in GetFileSize() 204 (void)fclose(fp); in GetFileSize() 228 FILE* fp = fopen(formatPath, "wb+"); in WriteFile() local 229 if (fp == NULL) { in WriteFile() 241 if (fwrite(data, dataLen, 1, fp) != 1) { in WriteFile() 246 if (fflush(fp) != ATTEST_OK) { in WriteFile() [all …]
|
/test/xts/acts/kernel_lite/fs_posix/src/ |
D | FileSystemTest.cpp | 78 FILE *fp = fopen(mountInfoFile, "r"); in CheckFsMount() local 79 if (fp != nullptr) { in CheckFsMount() 80 while (fgets(buf, lenMax, fp) != nullptr) { in CheckFsMount() 87 fclose(fp); in CheckFsMount() 91 fclose(fp); in CheckFsMount()
|
/test/xts/acts/security_lite/huks/common/ |
D | hks_test_file_operator.c | 115 FILE *fp = fopen(filePath, "rb"); in FileRead() local 116 if (fp == NULL) { in FileRead() 121 uint32_t size = fread(buf, 1, len, fp); in FileRead() 122 if (fclose(fp) < 0) { in FileRead() 159 FILE *fp = fopen(filePath, "wb+"); in FileWrite() local 160 if (fp == NULL) { in FileWrite() 167 fclose(fp); in FileWrite() 171 uint32_t size = fwrite(buf, 1, len, fp); in FileWrite() 174 fclose(fp); in FileWrite() 178 if (fclose(fp) < 0) { in FileWrite()
|
/test/xts/acts/commonlibrary/toolchain/libc-test/ |
D | tar_files.py | 37 with open(target_f, "wb") as fp: 38 fp.write(open(source_f, "rb").read()) 42 with open(target_f, "wb") as fp: 43 fp.write(open(source_f, "rb").read())
|
/test/xts/acts/kernel_lite/process_posix/src/ |
D | ProcessTest.cpp | 75 FILE *fp = fopen(testFile, "w+"); variable 76 if (fp == nullptr) { 80 fwrite(writeBuf, sizeof(writeBuf), 1, fp); 87 FILE *fp = fopen(testFile, "r+"); variable 88 ASSERT_NE(fp, nullptr) << "> fopen errno = " << errno; 89 EXPECT_EQ(fread(readBuf, sizeof(writeBuf), 1, fp), 0); 92 EXPECT_NE(fclose(fp), -1) << "> fclose errno =" <<errno; 185 FILE *fp = fopen(testFile, "w+"); variable 186 if (fp == nullptr) { 190 fwrite(writeBuf, sizeof(writeBuf), 1, fp); [all …]
|
/test/xts/acts/ai/mindspore/src/ |
D | ohos_common.cpp | 30 void getDimInfo(FILE *fp, std::vector<int64_t>* dim_info) { in getDimInfo() argument 33 size_t ret = fread(dim_buffer, sizeof(uint32_t), MAX_HEAD_SIZE, fp); in getDimInfo() 63 FILE *fp; in readTestDataFile() local 64 fp = fopen(infile.c_str(), "r"); in readTestDataFile() 65 if (fp == nullptr) { in readTestDataFile() 71 getDimInfo(fp, ptr_dim_info); in readTestDataFile() 73 fclose(fp); in readTestDataFile() 75 fp = fopen(infile.c_str(), "r"); in readTestDataFile() 76 if (fp == nullptr) { in readTestDataFile() 82 size_t ret = fread(memory, sizeof(uint32_t), (dim_info[0] + 1), fp); in readTestDataFile() [all …]
|
/test/ostest/wukong/shell_command/src/ |
D | wukong_main.cpp | 127 FILE* fp = nullptr; in IsRunning() local 128 fp = popen("pidof wukong", "r"); in IsRunning() 130 if (fp == nullptr) { in IsRunning() 135 if (fgets(pid, bufferSize - 1, fp) != nullptr) { in IsRunning() 153 pclose(fp); in IsRunning()
|
/test/xts/acts/kernel_lite/sys_posix/src/ |
D | SysApiTest.cpp | 571 FILE *fp = freopen(SYS_TEST_FILE_01, "w", stderr); variable 572 if (fp == nullptr) { 578 fclose(fp); 596 FILE *fp = freopen(SYS_TEST_FILE_01, "w", stderr); variable 597 if (fp == nullptr) { 603 fclose(fp); 621 FILE *fp = freopen(SYS_TEST_FILE_01, "w", stderr); variable 622 if (fp == nullptr) { 628 fclose(fp); 646 FILE *fp = freopen(SYS_TEST_FILE_01, "w", stderr); variable [all …]
|
/test/xts/acts/validator/acts_validator/src/main/ets/pages/Camera/ |
D | CameraOrientation.ets | 117 Text(this.name).fontColor(Color.White).fontSize('18fp').margin({ left: '-20vp' }) 138 Text('预览').fontSize('20fp').fontColor(Color.White) 143 Text('带旋转角度的图片').fontSize('20fp').fontColor(Color.White) 148 Text(`Camera: ${this.cameraDeviceIndex}`).fontSize('16fp').fontColor(Color.White) 149 Text(`Orientation: ${this.imageRotation}°`).fontSize('16fp').fontColor(Color.White) 150 Text(`顺时针`).fontSize('16fp').fontColor(Color.White) 151 Text(`提示:`).fontSize('16fp').fontColor(Color.White) 153 .fontSize('16fp').fontColor(Color.White)
|
D | CameraFlash.ets | 89 Text(this.name).fontColor(Color.White).fontSize('18fp').margin({ left: '-20vp' }) 107 // Text(`提示:` + this.isFlash).fontSize('16fp').fontColor(Color.White) 109 .fontSize('16fp').fontColor(Color.White).margin('20fp') 117 }.justifyContent(FlexAlign.SpaceEvenly).width('100%').margin('20fp')
|
D | CameraSerialPhoto.ets | 115 Text(this.name).fontColor(Color.White).fontSize('18fp').margin({ left: '-20vp' }) 136 Text('预览').fontSize('20fp').fontColor(Color.White) 141 Text('图片').fontSize('20fp').fontColor(Color.White) 162 Text(`提示:`).fontSize('16fp').fontColor(Color.White) 164 .fontSize('16fp').fontColor(Color.White)
|
/test/testfwk/arkxtest/uitest/core/ |
D | common_utilities_hpp.h | 69 … constexpr std::array<char, MAX_LOG_TAG_LEN> GenLogTag(std::string_view fp, std::string_view func) in GenLogTag() argument 73 size_t pos = fp.find_last_of('/'); in GenLogTag() 79 … for (size_t offSet = pos + 1; offSet < fp.length() && writeCursor < MAX_CONTENT_LEN; offSet++) { in GenLogTag() 80 chars[writeCursor++] = fp[offSet]; in GenLogTag()
|
/test/xts/tools/lite/checksum/src/ |
D | checksum_file.c | 138 FILE *fp = NULL; in CalcSingleFileSha256() local 139 if ((fp = fopen(fileName, "rb")) == NULL) { in CalcSingleFileSha256() 147 while (!feof(fp)) { in CalcSingleFileSha256() 148 size_t size = fread(buffer, 1, BUFFER_SIZE, fp); in CalcSingleFileSha256() 151 fclose(fp); in CalcSingleFileSha256()
|
/test/xts/hats/hdf/audio/hdi/capture/captureTest/src/ |
D | audio_hdicapture_test.cpp | 637 FILE *fp = fopen(AUDIO_LOW_LATENCY_CAPTURE_FILE.c_str(), "wb+"); variable 638 ASSERT_NE(nullptr, fp); 641 (void)fclose(fp); 645 ret = InitMmapDesc(fp, desc, reqSize, isRender); 651 (void)fclose(fp); 676 FILE *fp = fopen(AUDIO_LOW_LATENCY_CAPTURE_FILE.c_str(), "wb+"); variable 677 ASSERT_NE(nullptr, fp); 680 (void)fclose(fp); 684 ret = InitMmapDesc(fp, desc, reqSize, isRender); 691 (void)fclose(fp); [all …]
|
/test/xts/acts/kernel_lite/time_posix/src/ |
D | ClockTimeTest.cpp | 377 FILE *fp = nullptr; variable 379 fp = fopen(DATEMSK_FILE, "w+"); 380 ASSERT_NE(nullptr, fp); 381 int ret = fwrite(mask, sizeof(mask), 1, fp); 385 ret = fclose(fp); 427 FILE *fp = nullptr; variable 429 fp = fopen(DATEMSK_FILE, "w+"); 430 ASSERT_NE(nullptr, fp); 431 ret = fwrite(mask, sizeof(mask), 1, fp); 433 ret = fclose(fp);
|
/test/xts/hats/hdf/audio/hdi/render/renderTest/src/ |
D | audio_hdirender_test.cpp | 923 FILE *fp = fopen(LOW_LATENCY_AUDIO_FILE.c_str(), "rb+"); variable 924 ASSERT_NE(fp, nullptr); 929 fclose(fp); 941 ret = InitMmapDesc(fp, desc, reqSize, isRender); 951 fclose(fp); 978 FILE *fp = fopen(LOW_LATENCY_AUDIO_FILE.c_str(), "rb+"); variable 979 ASSERT_NE(fp, nullptr); 982 fclose(fp); 986 ret = InitMmapDesc(fp, desc, reqSize, isRender); 997 fclose(fp); [all …]
|
/test/xts/hats/hdf/audio/common/hdi_common/src/ |
D | audio_hdi_common.cpp | 912 int32_t InitMmapDesc(FILE *fp, struct AudioMmapBufferDescripter &desc, int32_t &reqSize, bool flag) in InitMmapDesc() argument 914 if (fp == NULL) { in InitMmapDesc() 917 int fd = fileno(fp); in InitMmapDesc() 923 fseek(fp, 0, SEEK_END); in InitMmapDesc() 924 reqSize = ftell(fp); in InitMmapDesc() 951 FILE *fp = fopen(absPath, "rb+"); in PlayMapAudioFile() local 952 if (fp == nullptr) { in PlayMapAudioFile() 955 ret = InitMmapDesc(fp, desc, reqSize, isRender); in PlayMapAudioFile() 957 fclose(fp); in PlayMapAudioFile() 962 fclose(fp); in PlayMapAudioFile() [all …]
|
/test/xts/acts/telephony/telephonyjstest/netmanager_http/entry/src/main/ets/MainAbility/pages/ |
D | Span.ets | 36 .fontSize("20fp") 51 .fontSize("30fp")
|