Lines Matching refs:command
130 std::string command = android::base::StringPrintf( in TEST() local
134 ASSERT_TRUE(NULL != (fp = popen(command.c_str(), "r"))); in TEST()
774 static testing::AssertionResult IsFalse(int ret, const char* command) { in IsFalse() argument
776 << "ret=" << ret << " command=\"" << command << "\"") in IsFalse()
788 char command[sizeof(buf) + sizeof(comm)]; in TEST() local
789 snprintf(command, sizeof(command), comm, buf); in TEST()
792 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
794 snprintf(command, sizeof(command), "ls -s %s 2>/dev/null", buf); in TEST()
797 EXPECT_TRUE(NULL != (fp = popen(command, "r"))); in TEST()
821 snprintf(command, sizeof(command), "rm -rf %s", buf); in TEST()
822 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
834 char command[sizeof(tmp_out_dir) + sizeof(logcat_cmd)]; in TEST() local
835 snprintf(command, sizeof(command), logcat_cmd, tmp_out_dir); in TEST()
838 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
840 snprintf(command, sizeof(command), "ls %s 2>/dev/null", tmp_out_dir); in TEST()
843 EXPECT_TRUE(NULL != (fp = popen(command, "r"))); in TEST()
879 snprintf(command, sizeof(command), "rm -rf %s", tmp_out_dir); in TEST()
880 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
893 char command[sizeof(tmp_out_dir) + sizeof(logcat_cmd) + sizeof(log_filename)]; in TEST() local
894 snprintf(command, sizeof(command), logcat_cmd, tmp_out_dir, log_filename); in TEST()
897 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
899 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
900 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
904 snprintf(command, sizeof(command), "%s/%s", tmp_out_dir, log_filename); in TEST()
905 EXPECT_TRUE(NULL != ((fp = fopen(command, "r")))); in TEST()
907 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
908 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
938 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
939 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
945 snprintf(command, sizeof(command), logcat_cmd, tmp_out_dir, log_filename); in TEST()
946 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
948 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
949 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
958 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
959 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
970 snprintf(command, sizeof(command), "%s/%s", tmp_out_dir, entry->d_name); in TEST()
971 EXPECT_TRUE(NULL != ((fp = fopen(command, "r")))); in TEST()
973 fprintf(stderr, "%s ?\n", command); in TEST()
987 unlink(command); in TEST()
1004 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1005 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1020 char command[sizeof(tmp_out_dir) + sizeof(logcat_cmd) + in TEST() local
1025 snprintf(command, sizeof(command) - sizeof(clear_cmd), logcat_cmd, in TEST()
1029 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
1031 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1032 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1039 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1040 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1056 strcat(command, clear_cmd); in TEST()
1059 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
1061 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1062 EXPECT_FALSE(system(command)); in TEST()
1063 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1070 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1071 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1086 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1087 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1092 char command[strlen(tmp_out_dir) + strlen(logcat_cmd) + in logrotate_count_id() local
1095 snprintf(command, sizeof(command), logcat_cmd, tmp_out_dir, log_filename); in logrotate_count_id()
1097 int ret = system(command); in logrotate_count_id()
1099 fprintf(stderr, "system(\"%s\")=%d", command, ret); in logrotate_count_id()
1160 char command[strlen(cleanup_cmd) + strlen(tmp_out_dir_form)]; in TEST() local
1161 snprintf(command, sizeof(command), cleanup_cmd, tmp_out_dir); in TEST()
1162 EXPECT_FALSE(IsFalse(system(command), command)); in TEST()
1167 static const char command[] = logcat_executable in TEST() local
1171 EXPECT_FALSE(IsFalse(0 == system(command), command)); in TEST()
1660 static size_t commandOutputSize(const char* command) { in commandOutputSize() argument
1661 FILE* fp = popen(command, "r"); in commandOutputSize()
1711 std::string command; in UidsInLog() local
1717 command = android::base::StringPrintf(logcat_executable in UidsInLog()
1721 command = logcat_executable " -v uid -b all -d 2>/dev/null"; in UidsInLog()
1723 auto fp = std::unique_ptr<FILE, decltype(&pclose)>(popen(command.c_str(), "r"), pclose); in UidsInLog()