@@ -286,11 +286,6 @@ def setup_testcase(testcase: data_types.Testcase, job_type: str,
286
286
if environment .is_android ():
287
287
_copy_testcase_to_device_and_setup_environment (testcase , testcase_file_path )
288
288
289
- # Push testcases to worker.
290
- if take_trusted_host_path ():
291
- from clusterfuzz ._internal .bot .untrusted_runner import file_host
292
- file_host .push_testcases_to_worker ()
293
-
294
289
# Copy global blacklist into local blacklist.
295
290
if setup_input .global_blacklisted_functions :
296
291
# Get local blacklist without this testcase's entry.
@@ -467,12 +462,6 @@ def _prepare_update_data_bundle(fuzzer, data_bundle):
467
462
return data_bundle_directory
468
463
469
464
470
- def take_trusted_host_path ():
471
- if environment .is_uworker ():
472
- return False
473
- return environment .is_trusted_host ()
474
-
475
-
476
465
def update_data_bundle (
477
466
fuzzer : data_types .Fuzzer ,
478
467
data_bundle_corpus : uworker_msg_pb2 .DataBundleCorpus ) -> bool : # pylint: disable=no-member
@@ -491,26 +480,9 @@ def update_data_bundle(
491
480
# case, the fuzzer will generate testcases from a gcs bucket periodically.
492
481
if not _is_search_index_data_bundle (data_bundle .name ):
493
482
494
- if not (take_trusted_host_path () and data_bundle .sync_to_worker ):
495
- logs .info ('Data bundles: normal path.' )
496
- result = corpus_manager .sync_data_bundle_corpus_to_disk (
497
- data_bundle_corpus , data_bundle_directory )
498
- else :
499
- logs .info ('Data bundles: untrusted runner path.' )
500
- from clusterfuzz ._internal .bot .untrusted_runner import \
501
- corpus_manager as untrusted_corpus_manager
502
- from clusterfuzz ._internal .bot .untrusted_runner import file_host
503
- worker_data_bundle_directory = file_host .rebase_to_worker_root (
504
- data_bundle_directory )
505
-
506
- file_host .create_directory (
507
- worker_data_bundle_directory , create_intermediates = True )
508
- result = untrusted_corpus_manager .RemoteGSUtilRunner ().rsync (
509
- data_bundle_corpus .gcs_url ,
510
- worker_data_bundle_directory ,
511
- delete = False )
512
- result = result .return_code == 0
513
-
483
+ logs .info ('Data bundles: normal path.' )
484
+ result = corpus_manager .sync_data_bundle_corpus_to_disk (
485
+ data_bundle_corpus , data_bundle_directory )
514
486
if not result :
515
487
logs .error (f'Failed to sync data bundle { data_bundle .name } .' )
516
488
return False
@@ -522,11 +494,6 @@ def update_data_bundle(
522
494
# Write last synced time in the sync file.
523
495
sync_file_path = _get_data_bundle_sync_file_path (data_bundle_directory )
524
496
utils .write_data_to_file (time_before_sync_start , sync_file_path )
525
- if take_trusted_host_path () and data_bundle .sync_to_worker :
526
- from clusterfuzz ._internal .bot .untrusted_runner import file_host
527
- worker_sync_file_path = file_host .rebase_to_worker_root (sync_file_path )
528
- file_host .copy_file_to_worker (sync_file_path , worker_sync_file_path )
529
-
530
497
return True
531
498
532
499
@@ -697,13 +664,6 @@ def update_fuzzer_and_data_bundles(
697
664
698
665
# For launcher script usecase, we need the entire fuzzer directory on the
699
666
# worker.
700
- if take_trusted_host_path ():
701
- from clusterfuzz ._internal .bot .untrusted_runner import file_host
702
- worker_fuzzer_directory = file_host .rebase_to_worker_root (
703
- fuzzer_directory )
704
- file_host .copy_directory_to_worker (
705
- fuzzer_directory , worker_fuzzer_directory , replace = True )
706
-
707
667
return fuzzer
708
668
709
669
@@ -717,12 +677,6 @@ def _is_data_bundle_up_to_date(data_bundle, data_bundle_directory):
717
677
"""Return true if the data bundle is up to date, false otherwise."""
718
678
sync_file_path = _get_data_bundle_sync_file_path (data_bundle_directory )
719
679
720
- if take_trusted_host_path () and data_bundle .sync_to_worker :
721
- from clusterfuzz ._internal .bot .untrusted_runner import file_host
722
- worker_sync_file_path = file_host .rebase_to_worker_root (sync_file_path )
723
- shell .remove_file (sync_file_path )
724
- file_host .copy_file_from_worker (worker_sync_file_path , sync_file_path )
725
-
726
680
if not os .path .exists (sync_file_path ):
727
681
return False
728
682
0 commit comments