Home
last modified time | relevance | path

Searched refs:packagePath (Results 1 – 25 of 40) sorted by relevance

12

/base/update/updater/test/unittest/updater_binary/
Dupdate_image_block_test.cpp63 const string packagePath = "/data/updater/updater/updater_write_miscblock_img.zip"; variable
64 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
71 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable
72 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
79 const string packagePath = "/data/updater/updater/updater_write_diff_miscblock_img.zip"; variable
80 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
Dupdate_processor_unittest.cpp74 const string packagePath = "/data/updater/updater/updater_write_misc_img.zip"; variable
75 int32_t ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
87 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable
88 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
100 const string packagePath = "/data/updater/updater/updater_write_diff_misc_img.zip"; variable
101 ret = ProcessUpdater(false, STDOUT_FILENO, packagePath, GetTestCertName());
Dupdate_partitions_unittest.cpp57 const string packagePath = "/data/updater/updater/parts/updaterpart01.zip"; variable
61 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
80 const string packagePath = "/data/updater/updater/parts/updaterpart02.zip"; variable
84 int ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
Dupdater_binary_unittest.cpp73 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) const in BuildFileDigest()
77 … int32_t ret = pkgManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in BuildFileDigest()
79 LOG(ERROR) << "Create input stream fail " << packagePath; in BuildFileDigest()
159 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local
160 packagePath += testPackageName; in CreatePackageBin()
161 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
/base/update/updater/test/unittest/updater_test/
Dupdater_unittest.cpp72 std::string packagePath = "/data/updater/updater/updater_without_updater_binary.zip"; variable
76 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
79 packagePath = "/data/updater/updater/updater_with_incorrect_binary.zip";
80 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
83 packagePath = "/data/updater/updater/updater.zip";
85 int32_t ret = pkgManager->LoadPackage(packagePath, GetTestCertName(), components);
87 status = StartUpdaterProc(pkgManager, packagePath, 0, maxTemperature);
91 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature);
94 packagePath = "/data/updater/updater/updater_binary_abnormal.zip";
95 status = StartUpdaterProc(pkgManager, packagePath, 1, maxTemperature);
/base/update/updater/test/unittest/script/
Dscript_unittest.h40 int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, in VerifyPackage() argument
45 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument
50 int32_t VerifyOtaPackage(const std::string &packagePath) override in VerifyOtaPackage() argument
54 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath, in VerifyBinFile() argument
59 const PkgInfo *GetPackageInfo(const std::string &packagePath) override in GetPackageInfo() argument
94 int32_t LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument
105 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath, in LoadPackageWithStream() argument
122 …int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) overri… in ParseComponents() argument
/base/update/updater/interfaces/kits/include/package/
Dpackage.h123 int32_t VerifyPackage(const char *packagePath, const char *keyPath,
134 int32_t VerifyPackageWithCallback(const std::string &packagePath, const std::string &keyPath,
146 int32_t ExtraPackageDir(const char *packagePath, const char *keyPath, const char *dir,
158 int32_t ExtraPackageFile(const char *packagePath, const char *keyPath, const char *file,
/base/update/updater/services/package/pkg_manager/
Dpkg_manager_impl.h46 …int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath, const std::strin…
49 int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
56 const PkgInfo *GetPackageInfo(const std::string &packagePath) override;
64 …int32_t LoadPackageWithoutUnPack(const std::string &packagePath, std::vector<std::string> &fileIds…
66 int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
78 int32_t VerifyOtaPackage(const std::string &packagePath) override;
80 int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
96 …int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName) overri…
107 …int32_t LoadPackage(const std::string &packagePath, std::vector<std::string> &fileIds, PkgFile::Pk…
109 int32_t LoadPackageWithStream(const std::string &packagePath,
Dpkg_managerImpl.cpp236 int32_t PkgManagerImpl::LoadPackageWithoutUnPack(const std::string &packagePath, in LoadPackageWithoutUnPack() argument
239 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackageWithoutUnPack()
240 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackageWithoutUnPack()
242 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackageWithoutUnPack()
275 int32_t PkgManagerImpl::LoadPackage(const std::string &packagePath, const std::string &keyPath, in LoadPackage() argument
278 if (access(packagePath.c_str(), 0) != 0) { in LoadPackage()
288 if (iter != nullptr && iter->GetPkgStream()->GetFileName().compare(packagePath) == 0) { in LoadPackage()
292 PkgFile::PkgType pkgType = GetPkgTypeByName(packagePath); in LoadPackage()
295 int32_t ret = LoadPackage(packagePath, fileIds, pkgType); in LoadPackage()
299 PKG_LOGE("Parse %s fail ", packagePath.c_str()); in LoadPackage()
[all …]
/base/update/updater/test/unittest/package/
Dpkg_package_unittest.cpp78 std::string packagePath = TEST_PATH_TO; in TestPkgFile() local
79 packagePath += testPackageName; in TestPkgFile()
80 … int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFile()
100 std::string packagePath = TEST_PATH_TO; in TestPkgFileInvalid() local
101 packagePath += testPackageName; in TestPkgFileInvalid()
102 … int ret = pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestPkgFileInvalid()
119 std::string packagePath = TEST_PATH_TO; in TestBigZipEntry() local
121 packagePath += testPackageName; in TestBigZipEntry()
122 pkgManager_->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Read); in TestBigZipEntry()
192 std::string packagePath = testPackagePath + "test_package.zip"; in TestUpdaterPreProcess() local
[all …]
Dpkg_verify_unittest.cpp58 std::string packagePath = "invalid_path"; in TestExtraPackageFile() local
62 ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), outPath.c_str()); in TestExtraPackageFile()
65 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageFile()
68 …ret = ExtraPackageFile(packagePath.c_str(), keyPath.c_str(), file.c_str(), testPackagePath.c_str()… in TestExtraPackageFile()
78 std::string packagePath = "invalid_path"; in TestExtraPackageDir() local
81 ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, outPath.c_str()); in TestExtraPackageDir()
84 packagePath = testPackagePath + "test_package.zip"; in TestExtraPackageDir()
86 … ret = ExtraPackageDir(packagePath.c_str(), keyPath.c_str(), nullptr, testPackagePath.c_str()); in TestExtraPackageDir()
Dpackage_unittest.cpp57 std::string packagePath = TEST_PATH_TO + testPackageName; in TestInvalidCreatePackage() local
59 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
64 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
69 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
74 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
79 …ret = CreatePackage(&pkgInfoExt, &compInfo, packagePath.c_str(), GetTestPrivateKeyName(0).c_str()); in TestInvalidCreatePackage()
118 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
119 packagePath += testPackageName; in TestPackagePack()
120 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), in TestPackagePack()
Dpkg_manager_unittest.cpp138 std::string packagePath = TEST_PATH_TO; in TestPackagePack() local
139 packagePath += testPackageName; in TestPackagePack()
140 int32_t ret = pkgManager_->CreatePackage(packagePath, "", &pkgInfo.pkgInfo, files); in TestPackagePack()
142 … ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, files); in TestPackagePack()
153 std::string packagePath = TEST_PATH_TO; in TestPackagePackFileNotExist() local
154 packagePath += testPackageName; in TestPackagePackFileNotExist()
158 …int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), &pkgInfo.pkgInfo, … in TestPackagePackFileNotExist()
167 std::string packagePath = TEST_PATH_TO; in TestPackagePackParamInvalid() local
168 packagePath += testPackageName; in TestPackagePackParamInvalid()
169 … int32_t ret = pkgManager_->CreatePackage(packagePath, GetTestPrivateKeyName(0), nullptr, files); in TestPackagePackParamInvalid()
[all …]
/base/update/updateservice/services/engine/src/
Dupdate_service_local_updater.cpp45 int32_t UpdateServiceLocalUpdater::VerifyUpgradePackage(const std::string &packagePath, const std::… in VerifyUpgradePackage() argument
49 int32_t ret = ::VerifyPackageWithCallback(packagePath.c_str(), keyPath.c_str(), in VerifyUpgradePackage()
51 … ENGINE_LOGI("VerifyUpgradePackage %s, %s, %{public}d", packagePath.c_str(), keyPath.c_str(), ret); in VerifyUpgradePackage()
/base/update/updater/interfaces/kits/packages/
Dpackage.cpp171 int32_t VerifyPackage(const char *packagePath, in VerifyPackage() argument
178 if (packagePath == nullptr || keyPath == nullptr || version == nullptr || manager == nullptr) { in VerifyPackage()
183 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, in VerifyPackage()
189 int32_t VerifyPackageWithCallback(const std::string &packagePath, in VerifyPackageWithCallback() argument
192 if (packagePath.empty() || keyPath.empty() || cb == nullptr) { in VerifyPackageWithCallback()
199 int32_t ret = manager->VerifyPackage(packagePath, keyPath, version, digestBuffer, cb); in VerifyPackageWithCallback()
207 int32_t ExtraPackageDir(const char *packagePath, [[maybe_unused]] const char *keyPath, const char *… in ExtraPackageDir() argument
211 if (packagePath == nullptr || outPath == nullptr || manager == nullptr) { in ExtraPackageDir()
217 int32_t ret = manager->LoadPackageWithoutUnPack(std::string(packagePath), components); in ExtraPackageDir()
242 int32_t ExtraPackageFile(const char *packagePath, [[maybe_unused]] const char *keyPath, const char … in ExtraPackageFile() argument
[all …]
/base/update/updater/services/updater_binary/
Dmain.cpp46 std::string packagePath = argv[0]; in main() local
47 return ProcessUpdater(retry, pipeFd, packagePath, Utils::GetCertName()); in main()
/base/update/updater/test/unittest/flow_update/update_bin/
Dbin_flow_update_unittest.cpp45 std::string packagePath = "/data/updater/package/updater_flow.zip"; in TestBinFlowUpdater() local
53 int32_t ret = pkgManager->LoadPackage(packagePath, Utils::GetCertName(), components); in TestBinFlowUpdater()
60 ret = Updater::ExecUpdate(pkgManager, false, packagePath, in TestBinFlowUpdater()
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
DUpdaterStartUpdaterProc_fuzzer.cpp49 static int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument
54 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest()
56 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest()
141 std::string packagePath = TEST_PATH_TO; in CreatePackageZip() local
142 packagePath += testPackageName; in CreatePackageZip()
143 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageZip()
/base/update/updater/services/include/package/
Dpkg_manager.h247 virtual int32_t VerifyPackage(const std::string &packagePath, const std::string &keyPath,
258 virtual int32_t LoadPackage(const std::string &packagePath, const std::string &keyPath,
261 virtual int32_t VerifyOtaPackage(const std::string &packagePath) = 0;
263 virtual int32_t VerifyBinFile(const std::string &packagePath, const std::string &keyPath,
272 virtual const PkgInfo *GetPackageInfo(const std::string &packagePath) = 0;
345 virtual int32_t LoadPackageWithoutUnPack(const std::string &packagePath,
348 … virtual int32_t LoadPackageWithStream(const std::string &packagePath, const std::string &keyPath,
359 …virtual int32_t ParseComponents(const std::string &packagePath, std::vector<std::string> &fileName…
/base/update/sys_installer/test/fuzztest/
Dsys_installer_fuzzer.cpp42 static int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument
47 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest()
131 std::string packagePath = TEST_PATH_TO; in CreatePackageZip() local
132 packagePath += testPackageName; in CreatePackageZip()
133 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageZip()
/base/update/updater/services/include/updater/
Dupdater.h71 int32_t ExtractUpdaterBinary(Hpackage::PkgManager::PkgManagerPtr manager, std::string &packagePath,
89 UpdaterStatus IsSpaceCapacitySufficient(const std::vector<std::string> &packagePath);
91 std::vector<uint64_t> GetStashSizeList(const std::vector<std::string> &packagePath);
/base/update/updater/test/fuzztest/extractandexecutescript_fuzzer/
Dextractandexecutescript_fuzzer.cpp181 int32_t BuildFileDigest(uint8_t &digest, size_t size, const std::string &packagePath) in BuildFileDigest() argument
184 …int32_t ret = packageManager->CreatePkgStream(stream, packagePath, 0, PkgStream::PkgStreamType_Rea… in BuildFileDigest()
186 PKG_LOGE("Create input stream fail %s", packagePath.c_str()); in BuildFileDigest()
269 std::string packagePath = TEST_PATH_TO; in CreatePackageBin() local
270 packagePath += testPackageName; in CreatePackageBin()
271 ret = CreatePackage(&pkgInfo, comp, packagePath.c_str(), GetTestPrivateKeyName().c_str()); in CreatePackageBin()
/base/update/updater/test/unittest/test_data/applypatch/
DTestDecompressGzip.new.gz
/base/update/updater/test/unittest/service_test/
Dupdater_service_unittest.cpp240 std::vector<std::string> packagePath; variable
241 UpdaterStatus status = IsSpaceCapacitySufficient(packagePath);
243 packagePath.push_back("/data/updater/updater/updater_full.zip");
244 status = IsSpaceCapacitySufficient(packagePath);
246 packagePath.push_back("xxx");
248 status = IsSpaceCapacitySufficient(packagePath);
/base/update/updater/services/
Dupdater.cpp61 int32_t ExtractUpdaterBinary(PkgManager::PkgManagerPtr manager, std::string &packagePath, in ExtractUpdaterBinary() argument
79 …if (!verifier.LoadHashDataAndPkcs7(packagePath) || !verifier.VerifyHashData(updaterBinary, outStre… in ExtractUpdaterBinary()
103 UpdaterStatus IsSpaceCapacitySufficient(const std::vector<std::string> &packagePath) in IsSpaceCapacitySufficient() argument
106 std::vector<uint64_t> stashSizeList = GetStashSizeList(packagePath); in IsSpaceCapacitySufficient()
114 uint64_t maxLogSpace = MAX_LOG_SPACE * packagePath.size(); in IsSpaceCapacitySufficient()
125 std::vector<uint64_t> GetStashSizeList(const std::vector<std::string> &packagePath) in GetStashSizeList() argument
129 for (auto path : packagePath) { in GetStashSizeList()

12