muteria.drivers.testgeneration.testcase_formats.ktest.utils module

class muteria.drivers.testgeneration.testcase_formats.ktest.utils.ConvertCollectKtestsSeeds(custom_binary_dir=None)[source]

Bases: object

generate_seeds_from_various_ktests(dest_dir, src_old_shadow_zesti_ktest_dir, src_new_klee_ktest_dir_or_sym_args=None, klee_ktest_is_sym_args=False, compress_dest=True, skip_failure=False)[source]

Create seeds/unify ktest from shadow and klee/Semu :param dest_dir: Non existing directory name where to put the

generated seeds. Its parent dir must exist

Parameters:
  • src_old_shadow_zesti_ktest_dir – path to directory or tar.gz containing the shadow generated tests (to convert into SEMu recognized ktest)

  • src_new_klee_ktest_dir_or_sym_args – This provide elements that can increase the space of the symbolic args besides what is extracted from shadow tests. Specify either the list of sym args for the program (e.g. [[”–sym-arg”, “5”], [“-sym-args”, “0” ,”2” ,”3”]]). This requires klee_ktest_is_sym_args to be True. Or set it to a folder containig tests generated by KLEE or SEMu (newer ktests format). This require klee_ktest_is_sym_args to be False.

  • klee_ktest_is_sym_args – Tels whether a sym args list or folder is specified in src_new_klee_ktest_dir_or_sym_args

  • compress_dest – Tesl whether to compress the dest_dir after generation of seeds.

  • skip_failure – Tells whether to skip problematic Ktests.

get_ktests_sym_args(ktests_dir, compressed=True)[source]

get sym args, if not there, create from ktests

tar_gz = '.tar.gz'
test2semudirMapFile = 'test2semudirMapFile.json'
class muteria.drivers.testgeneration.testcase_formats.ktest.utils.FileShortNames[source]

Bases: object

getShortname()[source]
reinitialize_count()[source]
class muteria.drivers.testgeneration.testcase_formats.ktest.utils.Misc[source]

Bases: object

static get_must_exist_dirs_of_ktests(ktest_key_to_file, custom_binary_dir=None)[source]

Takes a dict of ktest key to ktest file returns the dict of ktest key to list of required dirs

static import_ktest_tool(custom_binary_dir=None)[source]