@@ -1010,64 +1010,6 @@ def deep_merge(a: DeepMerge, b: DeepMerge) -> DeepMerge:
10101010 return b
10111011
10121012
1013- def get_valgrind_args (testdir , name , preamble , v , exit_on_first_error = True ):
1014- """
1015- Build a command line for running valgrind.
1016-
1017- testdir - test results directory
1018- name - name of daemon (for naming hte log file)
1019- preamble - stuff we should run before valgrind
1020- v - valgrind arguments
1021- """
1022- if v is None :
1023- return preamble
1024- if not isinstance (v , list ):
1025- v = [v ]
1026-
1027- # https://tracker.ceph.com/issues/44362
1028- preamble .extend ([
1029- 'env' , 'OPENSSL_ia32cap=~0x1000000000000000' ,
1030- ])
1031-
1032- val_path = '/var/log/ceph/valgrind'
1033- if '--tool=memcheck' in v or '--tool=helgrind' in v :
1034- extra_args = [
1035- 'valgrind' ,
1036- '--trace-children=no' ,
1037- '--child-silent-after-fork=yes' ,
1038- '--soname-synonyms=somalloc=*tcmalloc*' ,
1039- '--num-callers=50' ,
1040- '--suppressions={tdir}/valgrind.supp' .format (tdir = testdir ),
1041- '--xml=yes' ,
1042- '--xml-file={vdir}/{n}.log' .format (vdir = val_path , n = name ),
1043- '--time-stamp=yes' ,
1044- '--vgdb=yes' ,
1045- ]
1046- else :
1047- extra_args = [
1048- 'valgrind' ,
1049- '--trace-children=no' ,
1050- '--child-silent-after-fork=yes' ,
1051- '--soname-synonyms=somalloc=*tcmalloc*' ,
1052- '--suppressions={tdir}/valgrind.supp' .format (tdir = testdir ),
1053- '--log-file={vdir}/{n}.log' .format (vdir = val_path , n = name ),
1054- '--time-stamp=yes' ,
1055- '--vgdb=yes' ,
1056- ]
1057- if exit_on_first_error :
1058- extra_args .extend ([
1059- # at least Valgrind 3.14 is required
1060- '--exit-on-first-error=yes' ,
1061- '--error-exitcode=42' ,
1062- ])
1063- args = [
1064- 'cd' , testdir ,
1065- run .Raw ('&&' ),
1066- ] + preamble + extra_args + v
1067- log .debug ('running %s under valgrind with args %s' , name , args )
1068- return args
1069-
1070-
10711013def ssh_keyscan (hostnames , _raise = True ):
10721014 """
10731015 Fetch the SSH public key of one or more hosts
0 commit comments