Lines Matching refs:string

59 using PackageEntries = std::unordered_map<std::string, std::string>;
61 static void expect(const char* expected, const std::string& expr_str, CauseCode cause_code, in expect()
70 std::string result; in expect()
87 static void expect(const char* expected, const std::string& expr_str, CauseCode cause_code) { in expect()
109 static std::string GetSha1(std::string_view content) { in GetSha1()
158 std::string updated_marker{ temp_stash_base_.path }; in TearDown()
163 void RunBlockImageUpdate(bool is_verify, PackageEntries entries, const std::string& image_file, in RunBlockImageUpdate()
164 const std::string& result, CauseCode cause_code = kNoCause) { in RunBlockImageUpdate()
166 std::string new_data = in RunBlockImageUpdate()
168 std::string script = is_verify ? "block_image_verify" : "block_image_update"; in RunBlockImageUpdate()
185 std::string pipe_content; in RunBlockImageUpdate()
198 std::string last_command_file_;
199 std::string image_file_;
255 std::string source_file = from_testdata_base("boot.img"); in TEST_F()
256 std::string source_content; in TEST_F()
259 std::string source_hash = GetSha1(source_content); in TEST_F()
262 std::string target_file = from_testdata_base("recovery.img"); in TEST_F()
263 std::string target_content; in TEST_F()
266 std::string target_hash = GetSha1(target_content); in TEST_F()
274 std::string cmd = in TEST_F()
305 std::string buffer(65540, '\0'); in TEST_F()
310 std::string content("ro.product.name=tardis\n" in TEST_F()
316 std::string script1("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
320 std::string script2("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
325 std::string script3("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
329 std::string script4("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
333 std::string script5("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
337 std::string script6("file_getprop(\"" + std::string(temp_file2.path) + in TEST_F()
348 std::string zip_path = from_testdata_base("ziptest_valid.zip"); in TEST_F()
357 std::string script("package_extract_file(\"a.txt\", \"" + std::string(temp_file1.path) + "\")"); in TEST_F()
361 std::string data; in TEST_F()
366 script = "package_extract_file(\"b.txt\", \"" + std::string(temp_file1.path) + "\")"; in TEST_F()
373 script = "package_extract_file(\"doesntexist\", \"" + std::string(temp_file1.path) + "\")"; in TEST_F()
400 std::string script("write_value(\"foo\", \""s + temp_file.path + "\");"); in TEST_F()
415 std::string data; in TEST_F()
417 data += std::string(4096, i); in TEST_F()
420 data += std::string(4096, 0); in TEST_F()
424 std::string salt = "aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7"; in TEST_F()
425 std::string expected_root_hash = in TEST_F()
428 std::vector<std::string> tokens{ "compute_hash_tree", "2,128,129", "2,0,128", "sha256", salt, in TEST_F()
430 std::string hash_tree_command = android::base::Join(tokens, " "); in TEST_F()
432 std::vector<std::string> transfer_list{ in TEST_F()
444 std::string updated; in TEST_F()
462 std::string data; in TEST_F()
464 data += std::string(4096, i); in TEST_F()
467 data += std::string(4096, 0); in TEST_F()
473 std::string salt = "aee087a5be3b982978c923f566a94613496b417f2af592639bc80d141e34dfe7"; in TEST_F()
474 std::string expected_root_hash = in TEST_F()
477 std::vector<std::string> tokens{ "compute_hash_tree", "2,128,129", "2,0,128", "sha256", salt, in TEST_F()
479 std::string hash_tree_command = android::base::Join(tokens, " "); in TEST_F()
481 std::vector<std::string> transfer_list{ in TEST_F()
505 std::string value = "magicvalue"; in TEST_F()
506 std::string script("write_value(\"" + value + "\", \"" + std::string(temp_file.path) + "\")"); in TEST_F()
510 std::string content; in TEST_F()
515 script = "write_value(\"\", \"" + std::string(temp_file.path) + "\")"; in TEST_F()
535 std::string temp_file(tf.path); in TEST_F()
538 std::string err; in TEST_F()
542 std::string script("get_stage(\"" + temp_file + "\")"); in TEST_F()
558 std::string temp_file(tf.path); in TEST_F()
562 std::string err; in TEST_F()
566 std::string script("set_stage(\"" + temp_file + "\", \"1/3\")"); in TEST_F()
600 std::string cmd; in TEST_F()
623 std::string cmd; in TEST_F()
631 std::vector<std::string> transfer_list{ in TEST_F()
658 std::string patch_content; in GetEntriesForBsdiff()
662 std::string src_hash = GetSha1(source); in GetEntriesForBsdiff()
663 std::string tgt_hash = GetSha1(target); in GetEntriesForBsdiff()
665 std::vector<std::string> transfer_list{ in GetEntriesForBsdiff()
688 std::string source = in TEST_F()
689 std::string(4096, 'a') + std::string(4096, 'c') + std::string(4096 * 3, '\0'); in TEST_F()
690 std::string target = in TEST_F()
691 std::string(4096, 'b') + std::string(4096, 'd') + std::string(4096 * 3, '\0'); in TEST_F()
700 std::string updated; in TEST_F()
707 std::string source = in TEST_F()
708 std::string(4096, 'a') + std::string(4096, 'c') + std::string(4096 * 3, '\0'); in TEST_F()
709 std::string target = in TEST_F()
710 std::string(4096, 'b') + std::string(4096, 'd') + std::string(4096 * 3, '\0'); in TEST_F()
724 std::string source = in TEST_F()
725 std::string(4096, 'a') + std::string(4096, 'c') + std::string(4096 * 3, '\0'); in TEST_F()
726 std::string target = in TEST_F()
727 std::string(4096, 'b') + std::string(4096, 'd') + std::string(4096 * 3, '\0'); in TEST_F()
740 std::string src_content(4096 * 2, 'e'); in TEST_F()
741 std::string src_hash = GetSha1(src_content); in TEST_F()
743 std::vector<std::string> transfer_list{ in TEST_F()
757 { "new_data", std::string(10, 0) }, in TEST_F()
767 std::string name_digest = GetSha1(image_file_); in TEST_F()
768 std::string stash_base = std::string(temp_stash_base_.path) + "/" + name_digest; in TEST_F()
776 std::vector<std::string> transfer_list{ in TEST_F()
788 { "new_data", std::string(4196, 0) }, in TEST_F()
797 std::vector<std::string> transfer_list{ in TEST_F()
816 entries["new_data"] = std::string(10, 'a'); in TEST_F()
820 entries["new_data"] = std::string(4096, 'a'); in TEST_F()
827 std::string brotli_new_data; in TEST_F()
832 std::string encoded_data(encoded_size, 0); in TEST_F()
841 std::vector<std::string> transfer_list = { in TEST_F()
862 std::string updated_content; in TEST_F()
868 std::string block1(4096, '1'); in TEST_F()
869 std::string block2(4096, '2'); in TEST_F()
870 std::string block3(4096, '3'); in TEST_F()
871 std::string block1_hash = GetSha1(block1); in TEST_F()
872 std::string block2_hash = GetSha1(block2); in TEST_F()
873 std::string block3_hash = GetSha1(block3); in TEST_F()
876 std::vector<std::string> transfer_list_fail{ in TEST_F()
890 std::vector<std::string> transfer_list_continue{ in TEST_F()
912 std::string last_command_content = in TEST_F()
918 std::string last_command_actual; in TEST_F()
922 std::string updated_contents; in TEST_F()
937 std::string block1(4096, '1'); in TEST_F()
938 std::string block2(4096, '2'); in TEST_F()
939 std::string block1_hash = GetSha1(block1); in TEST_F()
940 std::string block2_hash = GetSha1(block2); in TEST_F()
943 std::vector<std::string> transfer_list_unresumable{ in TEST_F()
962 std::string last_command_content = in TEST_F()
973 std::string block1(4096, '1'); in TEST_F()
974 std::string block2(4096, '2'); in TEST_F()
975 std::string block3(4096, '3'); in TEST_F()
976 std::string block1_hash = GetSha1(block1); in TEST_F()
977 std::string block2_hash = GetSha1(block2); in TEST_F()
978 std::string block3_hash = GetSha1(block3); in TEST_F()
980 std::vector<std::string> transfer_list_verify{ in TEST_F()
1002 std::string last_command_content = in TEST_F()
1010 std::string last_command_actual; in TEST_F()
1038 static std::string g_source_image;
1039 static std::string g_target_image;
1042 static std::vector<std::string> GenerateTransferList() { in GenerateTransferList()
1043 std::string a(4096, 'a'); in GenerateTransferList()
1044 std::string b(4096, 'b'); in GenerateTransferList()
1045 std::string c(4096, 'c'); in GenerateTransferList()
1046 std::string d(4096, 'd'); in GenerateTransferList()
1047 std::string e(4096, 'e'); in GenerateTransferList()
1048 std::string f(4096, 'f'); in GenerateTransferList()
1049 std::string g(4096, 'g'); in GenerateTransferList()
1050 std::string h(4096, 'h'); in GenerateTransferList()
1051 std::string i(4096, 'i'); in GenerateTransferList()
1052 std::string zero(4096, '\0'); in GenerateTransferList()
1054 std::string a_hash = GetSha1(a); in GenerateTransferList()
1055 std::string b_hash = GetSha1(b); in GenerateTransferList()
1056 std::string c_hash = GetSha1(c); in GenerateTransferList()
1057 std::string e_hash = GetSha1(e); in GenerateTransferList()
1059 auto loc = [](const std::string& range_text) { in GenerateTransferList()
1060 std::vector<std::string> pieces = android::base::Split(range_text, "-"); in GenerateTransferList()
1077 std::string bdc = b + d + c; in GenerateTransferList()
1078 std::string bdc_hash = GetSha1(bdc); in GenerateTransferList()
1079 std::string g_hash = GetSha1(g); in GenerateTransferList()
1083 std::string patch_bdc_g; in GenerateTransferList()
1088 std::string abcd = a + b + c + d; in GenerateTransferList()
1089 std::string abcd_hash = GetSha1(abcd); in GenerateTransferList()
1090 std::string dcb = d + c + b; in GenerateTransferList()
1091 std::string dcb_hash = GetSha1(dcb); in GenerateTransferList()
1095 std::string patch_abcd_dcb; in GenerateTransferList()
1098 std::vector<std::string> transfer_list{ in GenerateTransferList()
1157 std::string new_data = i + h + f; in GenerateTransferList()
1158 std::string patch_data = patch_bdc_g + patch_abcd_dcb; in GenerateTransferList()
1170 static const std::vector<std::string> g_transfer_list = GenerateTransferList();
1183 std::vector<std::string> transfer_list_copy{ g_transfer_list }; in TEST_P()
1191 std::string last_command_expected; in TEST_P()
1199 std::string last_command_actual; in TEST_P()
1213 std::string last_command_actual; in TEST_P()
1224 std::string updated_image_actual; in TEST_P()