Skip to content

Commit

Permalink
Remove serialization (#205)
Browse files Browse the repository at this point in the history
This was removed from Dyninst by f4ee3410b in 2020.

Co-authored-by: Tim Haines <[email protected]>
  • Loading branch information
hainest and Tim Haines authored Feb 28, 2022
1 parent f3dcda5 commit 6d060a5
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 47 deletions.
4 changes: 1 addition & 3 deletions src/CmdLine.C
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ ModeGroup mode_args[] = {
{ "create", RUNMODES, defaultOn },
{ "attach", RUNMODES, defaultOff },
{ "rewriter", RUNMODES, defaultOn },
{ "serialize", RUNMODES, defaultOff },
{ "max", OPTLEVELS, defaultOff },
{ "high", OPTLEVELS, defaultOff },
{ "low", OPTLEVELS, defaultOff },
Expand Down Expand Up @@ -726,8 +725,7 @@ static void disableUnwantedTests(std::vector<RunGroup *> &groups)
//RunMode
if (((groups[i]->createmode == CREATE) && !paramOn("create")) ||
((groups[i]->createmode == USEATTACH) && !paramOn("attach")) ||
((groups[i]->createmode == DISK) && !paramOn("rewriter")) ||
((groups[i]->createmode == DESERIALIZE) && !paramOn("serialize")))
((groups[i]->createmode == DISK) && !paramOn("rewriter")))
{
groups[i]->disabled = true;
continue;
Expand Down
3 changes: 1 addition & 2 deletions src/TestData.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ enum start_state_t {
enum create_mode_t {
CREATE = 0,
USEATTACH,
DISK,
DESERIALIZE //Keep deserialize last to maintain proper sort
DISK
};

enum cleanup_mode_t {
Expand Down
5 changes: 0 additions & 5 deletions src/dyninst/dyninst_comp.C
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ test_results_t DyninstComponent::group_setup(RunGroup *group,
}
break;
}
case DESERIALIZE:
{
assert(0); //Don't know how to handle this;
break;
}
}


Expand Down
6 changes: 1 addition & 5 deletions src/specification/makemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,10 +900,7 @@ def print_initialize_mutatees_nt(out, rungroups, compilers, module):
# I need to get the mutator that this test maps to..
mutator = test_mutator(test)
ts = build_label(test, mutator, group)
if test in ['test_serializable']:
serialize_enable = 'true'
else:
serialize_enable = 'false'
serialize_enable = 'false'
test_params.append({'test': test, 'mutator': mutator, 'LibSuffix': LibSuffix, 'serialize_enable' : serialize_enable, 'ts': ts, 'endrungroup': 'false'})
test_params[-1]['endrungroup'] = 'true'
if(group_empty == 'false'):
Expand Down Expand Up @@ -942,7 +939,6 @@ def print_initialize_mutatees_nt(out, rungroups, compilers, module):
const char * iname;
const char * mrname;
const char * isoname;
bool serialize_enable;
const char * ilabel;
} test_params[] = {"""

Expand Down
7 changes: 1 addition & 6 deletions src/specification/test_info_new_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ def print_initialize_mutatees(out, rungroups, compilers, info, platform):
out.write('CREATE, ')
elif group['run_mode'] == 'useAttach':
out.write('USEATTACH, ')
elif group['run_mode'] == 'deserialize':
out.write('DESERIALIZE, ')
else:
out.write('DISK, ')

Expand Down Expand Up @@ -158,10 +156,7 @@ def print_initialize_mutatees(out, rungroups, compilers, info, platform):
# I need to get the mutator that this test maps to..
mutator = test_mutator(test, info)
ts = build_label(test, mutator, group, info)
if test in ['test_serializable']:
serialize_enable = 'true'
else:
serialize_enable = 'false'
serialize_enable = 'false'
out.write(' add_test(rg, "%s");\n' % (ts))
out.write(' fini_group(rg);\n')

Expand Down
2 changes: 0 additions & 2 deletions src/symtab/test_exception.C
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ extern "C" DLLEXPORT TestMutator* test_exception_factory()

test_results_t test_exception_Mutator::executeTest()
{
if (createmode == DESERIALIZE)
return SKIPPED;
#if defined (os_windows_test)
return SKIPPED;
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/symtab/test_line_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ test_results_t test_line_info_Mutator::basic_verification()

test_results_t test_line_info_Mutator::executeTest()
{

if (createmode == DESERIALIZE)
return SKIPPED;
if (FAILED == basic_verification())
{
logerror( "%s[%d]: failed basic verifications, skipping rest...\n",
Expand Down
2 changes: 0 additions & 2 deletions src/symtab/test_lookup_func.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ extern "C" DLLEXPORT TestMutator* test_lookup_func_factory()

test_results_t test_lookup_func_Mutator::executeTest()
{
if (createmode == DESERIALIZE)
return SKIPPED;
std::vector<Symbol*> funcSyms;
bool result = symtab->getAllSymbolsByType(funcSyms, Symbol::ST_FUNCTION);
if(result == false)
Expand Down
2 changes: 0 additions & 2 deletions src/symtab/test_lookup_var.C
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ extern "C" DLLEXPORT TestMutator* test_lookup_var_factory()

test_results_t test_lookup_func_Mutator::executeTest()
{
if (createmode == DESERIALIZE)
return SKIPPED;
std::vector<Variable *> vars;
bool result = symtab->findVariablesByName(vars, std::string("lookup_var"));

Expand Down
2 changes: 0 additions & 2 deletions src/symtab/test_module.C
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ bool malformed_module(SymtabAPI::Module *mod)

test_results_t test_module_Mutator::executeTest()
{
if (createmode == DESERIALIZE)
return SKIPPED;
std::vector<SymtabAPI::Module *> mods;
bool result = symtab->getAllModules(mods);

Expand Down
2 changes: 0 additions & 2 deletions src/symtab/test_relocations.C
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ extern "C" DLLEXPORT TestMutator* test_relocations_factory()

test_results_t test_relocations_Mutator::executeTest()
{
if (createmode == DESERIALIZE)
return SKIPPED;
#if defined (os_windows_test)
return SKIPPED;
#endif
Expand Down
8 changes: 0 additions & 8 deletions src/symtab/test_type_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -1089,14 +1089,6 @@ test_results_t test_type_info_Mutator::verify_basic_type_lists() {
}

test_results_t test_type_info_Mutator::executeTest() {

if (createmode == DESERIALIZE)
return SKIPPED;
#if defined(os_linux_test) && defined(arch_x86_test)
if ((createmode == DESERIALIZE) && (compiler == std::string("g++")))
return SKIPPED;
#endif

SymtabAPI::Module *mod = NULL;
std::vector<SymtabAPI::Module *> mods;

Expand Down
4 changes: 1 addition & 3 deletions src/test_info_new.C
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ static const char *extract_name(const char *tag, const char *label)

// The constructor for TestInfo
TestInfo::TestInfo(unsigned int i, const char *iname, const char *imrname,
const char *isoname, bool _serialize_enable, const char *ilabel) :
const char *isoname, const char *ilabel) :
index(i), name(iname), mutator_name(imrname), soname(isoname),
serialize_enable(_serialize_enable),
label(ilabel), mutator(NULL), disabled(false), limit_disabled(false),
enabled(false), result_reported(false)
{
Expand All @@ -73,7 +72,6 @@ TestInfo::TestInfo(unsigned int i, const char *iname, const char *imrname,

TestInfo::TestInfo(unsigned int i, const char *libsuffix, const char *ilabel) :
index(i),
serialize_enable(false),
label(ilabel),
mutator(NULL),
disabled(false),
Expand Down
3 changes: 1 addition & 2 deletions src/test_info_new.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ class TestInfo {
const char *soname;
const char *label;
TestMutator *mutator;
bool serialize_enable;
bool disabled;
bool limit_disabled;
bool enabled;
Expand All @@ -115,7 +114,7 @@ class TestInfo {
TESTLIB_DLL_EXPORT static int getMaxTestNameLength();
TESTLIB_DLL_EXPORT static void setMaxTestNameLength(int newlen);
TESTLIB_DLL_EXPORT TestInfo(unsigned int i, const char *iname, const char *mrname,
const char *isoname, bool _serialize_enable, const char *ilabel);
const char *isoname, const char *ilabel);
TESTLIB_DLL_EXPORT TestInfo(unsigned int i, const char *sosuffix, const char *ilabel);
TESTLIB_DLL_EXPORT ~TestInfo();
};
Expand Down

0 comments on commit 6d060a5

Please sign in to comment.