Home | History | Annotate | Download | only in crash_cache

Lines Matching refs:action

39 int RunSlave(RankCrashes action) {
44 cmdline.AppendLooseValue(ASCIIToWide(IntToString(action)));
48 printf("Unable to run test %d\n", action);
55 printf("Unable to get return code, test %d\n", action);
59 printf("Test %d failed, code %d\n", action, exit_code);
81 bool CreateTargetFolder(const FilePath& path, RankCrashes action,
109 DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH);
111 *full_path = path.AppendASCII(folders[action]);
120 int SimpleInsert(const FilePath& path, RankCrashes action) {
128 if (action <= disk_cache::INSERT_EMPTY_3) {
130 g_rankings_crash = action;
139 DCHECK(action <= disk_cache::INSERT_ONE_3);
140 g_rankings_crash = action;
150 int SimpleRemove(const FilePath& path, RankCrashes action) {
151 DCHECK(action >= disk_cache::REMOVE_ONE_1);
152 DCHECK(action <= disk_cache::REMOVE_TAIL_3);
165 if (action >= disk_cache::REMOVE_TAIL_1) {
175 g_rankings_crash = action;
182 int HeadRemove(const FilePath& path, RankCrashes action) {
183 DCHECK(action >= disk_cache::REMOVE_HEAD_1);
184 DCHECK(action <= disk_cache::REMOVE_HEAD_4);
204 g_rankings_crash = action;
212 int LoadOperations(const FilePath& path, RankCrashes action) {
213 DCHECK(action >= disk_cache::INSERT_LOAD_1);
231 if (50 == i && action >= disk_cache::REMOVE_LOAD_1) {
238 if (action <= disk_cache::INSERT_LOAD_2) {
239 g_rankings_crash = action;
248 g_rankings_crash = action;
257 int SlaveCode(const FilePath& path, RankCrashes action) {
261 if (!CreateTargetFolder(path, action, &full_path)) {
266 if (action <= disk_cache::INSERT_ONE_3)
267 return SimpleInsert(full_path, action);
269 if (action <= disk_cache::INSERT_LOAD_2)
270 return LoadOperations(full_path, action);
272 if (action <= disk_cache::REMOVE_ONE_4)
273 return SimpleRemove(full_path, action);
275 if (action <= disk_cache::REMOVE_HEAD_4)
276 return HeadRemove(full_path, action);
278 if (action <= disk_cache::REMOVE_TAIL_3)
279 return SimpleRemove(full_path, action);
281 if (action <= disk_cache::REMOVE_LOAD_3)
282 return LoadOperations(full_path, action);
297 RankCrashes action = static_cast<RankCrashes>(strtol(argv[1], &end, 0));
298 if (action <= disk_cache::NO_CRASH || action >= disk_cache::MAX_CRASH) {
299 printf("Invalid action\n");
310 return SlaveCode(path, action);