Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
90dd59e
src/connection.C
hainest Apr 4, 2025
0d06b14
src/dyninst/cpp_test.h
hainest Apr 4, 2025
6d0054a
src/dyninst/dyninst_comp.C
hainest Apr 4, 2025
7c9ad3d
src/dyninst/dyninst_comp.h
hainest Apr 4, 2025
fb86d2e
src/dyninst/test1_37.C
hainest Apr 4, 2025
5da8539
src/dyninst/test1_41.C
hainest Apr 4, 2025
4689dd0
src/dyninst/test3_3.C
hainest Apr 4, 2025
c637e89
src/dyninst/test_callback_1.C
hainest Apr 4, 2025
295203f
src/dyninst/test_lib_test9.C
hainest Apr 4, 2025
9ce33aa
src/dyninst/test_thread_1.C
hainest Apr 4, 2025
b712ae4
src/mutatee_util.c
hainest Apr 4, 2025
3a20e2a
src/proccontrol/proccontrol_comp.C
hainest Apr 4, 2025
f83331f
src/proccontrol/proccontrol_comp.h
hainest Apr 4, 2025
db44be2
src/runTests-utils.C
hainest Apr 4, 2025
365e8c1
src/symtab/test_anno_basic_types.C
hainest Apr 4, 2025
4e77ec6
src/test_driver.C
hainest Apr 4, 2025
c4f1dda
src/CmdLine.C
hainest Apr 3, 2025
742a42e
src/DatabaseOutputDriver.C
hainest Apr 3, 2025
e17e88f
src/MutateeStart.C
hainest Apr 3, 2025
47dfa00
src/ParameterDict.C
hainest Apr 3, 2025
5431ff9
src/ResumeLog.C
hainest Apr 3, 2025
c6f105f
src/StdOutputDriver.C
hainest Apr 3, 2025
098f139
src/StdOutputDriver.h
hainest Apr 3, 2025
c51ec7e
src/TestMutator.C
hainest Apr 3, 2025
cf448c0
src/TestOutputDriver.C
hainest Apr 3, 2025
f154559
src/UsageMonitor.h
hainest Apr 3, 2025
63ac1a9
src/connection.C
hainest Apr 3, 2025
3e43c7b
src/dyninst/Callbacks.C
hainest Apr 3, 2025
988469e
src/dyninst/dyninst_comp.C
hainest Apr 3, 2025
408fee0
src/dyninst/init_fini_callback.C
hainest Apr 3, 2025
a86efa8
src/dyninst/snip_change_shlib_var.C
hainest Apr 3, 2025
79343f1
src/dyninst/snip_ref_shlib_var.C
hainest Apr 3, 2025
12a2f7f
src/dyninst/test1.h
hainest Apr 3, 2025
5943360
src/dyninst/test1_20.C
hainest Apr 3, 2025
453c91a
src/dyninst/test1_22.C
hainest Apr 3, 2025
3a569d1
src/dyninst/test1_30.C
hainest Apr 3, 2025
315caba
src/dyninst/test1_41.C
hainest Apr 3, 2025
e4cda64
src/dyninst/test2_7.C
hainest Apr 3, 2025
dfa8f53
src/dyninst/test3_6.C
hainest Apr 3, 2025
105934d
src/dyninst/test3_7.C
hainest Apr 3, 2025
867b66c
src/dyninst/test4_1.C
hainest Apr 3, 2025
b66face
src/dyninst/test4_2.C
hainest Apr 3, 2025
911c404
src/dyninst/test4_3.C
hainest Apr 3, 2025
5fca0f4
src/dyninst/test4_4.C
hainest Apr 3, 2025
85bc28d
src/dyninst/test5_7.C
hainest Apr 3, 2025
84341fc
src/dyninst/test5_8.C
hainest Apr 3, 2025
dd6885e
src/dyninst/test5_9.C
hainest Apr 3, 2025
244e725
src/dyninst/test_callback_2.C
hainest Apr 3, 2025
5ec0fc4
src/dyninst/test_fork_10.C
hainest Apr 3, 2025
3ffd29e
src/dyninst/test_fork_11.C
hainest Apr 3, 2025
02f4c2f
src/dyninst/test_fork_12.C
hainest Apr 3, 2025
00c93dd
src/dyninst/test_fork_13.C
hainest Apr 3, 2025
e2170c7
src/dyninst/test_fork_14.C
hainest Apr 3, 2025
d78c1b6
src/dyninst/test_fork_5.C
hainest Apr 3, 2025
fcf0f79
src/dyninst/test_fork_6.C
hainest Apr 3, 2025
cc678b8
src/dyninst/test_fork_7.C
hainest Apr 3, 2025
a519f5d
src/dyninst/test_fork_8.C
hainest Apr 3, 2025
ac0f100
src/dyninst/test_fork_9.C
hainest Apr 3, 2025
d6ef080
src/dyninst/test_pt_ls.C
hainest Apr 3, 2025
449279f
src/dyninst/test_thread_6.C
hainest Apr 3, 2025
f90dc9a
src/dyninst/test_thread_7.C
hainest Apr 3, 2025
1751bdb
src/instruction/aarch64_cft.C
hainest Apr 3, 2025
3e5e334
src/instruction/instruction_comp.C
hainest Apr 3, 2025
dd822d5
src/instruction/power_cft.C
hainest Apr 3, 2025
b850bda
src/instruction/test_instruction_profile.C
hainest Apr 3, 2025
2785aad
src/proccontrol/pc_addlibrary.C
hainest Apr 3, 2025
08795ae
src/proccontrol/pc_breakpoint.C
hainest Apr 3, 2025
ad73b84
src/proccontrol/pc_detach.C
hainest Apr 3, 2025
33e36ac
src/proccontrol/pc_fork.C
hainest Apr 3, 2025
3849c42
src/proccontrol/pc_fork_exec.C
hainest Apr 3, 2025
1eaa332
src/proccontrol/pc_groups.C
hainest Apr 3, 2025
0f3adf5
src/proccontrol/pc_irpc.C
hainest Apr 3, 2025
b187a5e
src/proccontrol/pc_irpc_asm.h
hainest Apr 3, 2025
5ab78c5
src/proccontrol/pc_library.C
hainest Apr 3, 2025
1fb1e2e
src/proccontrol/pc_singlestep.C
hainest Apr 3, 2025
0770ccc
src/proccontrol/pc_stat.C
hainest Apr 3, 2025
5e0f8af
src/proccontrol/pc_temp_detach.C
hainest Apr 3, 2025
6fb6e9b
src/proccontrol/pc_thread.C
hainest Apr 3, 2025
41d546b
src/proccontrol/pc_thread_cont.C
hainest Apr 3, 2025
157fbc9
src/proccontrol/proccontrol_comp.C
hainest Apr 3, 2025
cbe0fa6
src/remotetest.C
hainest Apr 3, 2025
4de9fc3
src/remotetest.h
hainest Apr 3, 2025
6383066
src/runTests-utils.C
hainest Apr 3, 2025
cf5674d
src/runTests.C
hainest Apr 3, 2025
ad36b2a
src/symtab/symtab_comp.C
hainest Apr 3, 2025
97bf07d
src/symtab/symtab_comp.h
hainest Apr 3, 2025
679da18
src/symtab/test_line_info.C
hainest Apr 3, 2025
c86189e
src/symtab/test_relocations.C
hainest Apr 3, 2025
e48b7a4
src/symtab/test_type_info.C
hainest Apr 3, 2025
fa2304e
src/test_driver.C
hainest Apr 3, 2025
87cab0d
src/test_info_new.C
hainest Apr 3, 2025
b182278
src/test_info_new.h
hainest Apr 3, 2025
81b6a86
src/test_lib_soExecution.C
hainest Apr 3, 2025
cc490b7
src/testdriver_be.C
hainest Apr 3, 2025
029ccb2
src/testdriver_wrapper.C
hainest Apr 3, 2025
7b0f78e
src/dyninst/test_lib_mutateeStart.C
hainest Apr 3, 2025
b0a2cdc
src/dyninst/test_reloc.C
hainest Apr 3, 2025
cb7ab0d
Add flags
hainest Apr 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()

set(_warning_flags "-Werror -Wall -Wextra -Wpedantic")
if(NOT CMAKE_C_FLAGS)
set(CMAKE_C_FLAGS ${_warning_flags})
endif()

if(NOT CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS ${_warning_flags})
endif()

include(LanguageStandards)
include(optimization)

Expand Down
8 changes: 3 additions & 5 deletions src/CmdLine.C
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ static void disableUnwantedTests(std::vector<RunGroup *> &groups)

if (unique_id && max_unique_id && testLimit) {
unsigned cur_test = 0;
unsigned cur_test_limitgroup = 0;
int cur_test_limitgroup = 0;
for (unsigned i=0; i < groups.size(); i++)
{
if (groups[i]->disabled) continue;
Expand All @@ -833,7 +833,7 @@ static void disableUnwantedTests(std::vector<RunGroup *> &groups)
}
else if (unique_id && max_unique_id && groupLimit) {
unsigned cur_group = 0;
unsigned cur_limitgroup = 0;
int cur_limitgroup = 0;
for (unsigned i=0; i < groups.size(); i++)
{
if (groups[i]->disabled) continue;
Expand Down Expand Up @@ -916,7 +916,7 @@ static void disableUnwantedTests(std::vector<RunGroup *> &groups)
}
if (given_mutator != -1) {
for (unsigned i = 0; i < groups.size(); i++) {
if (i != given_mutator && !groups[i]->disabled) {
if (static_cast<int>(i) != given_mutator && !groups[i]->disabled) {
for (unsigned j=0; j<groups[i]->tests.size(); j++)
{
if (!groups[i]->tests[j]->disabled) {
Expand Down Expand Up @@ -988,8 +988,6 @@ static bool mutateeListContains(std::vector<char *> mutatee_list, const char *mu
// don't match. All tests start out enabled, and we previously disabled any
// that are crashing while we were parsing the resume log.
static bool testListContains(TestInfo * test, std::vector<char *> &testsn) {
bool match_found = false;

for (size_t i = 0; i < testsn.size(); i++) {
if (nameMatches(testsn[i], test->name))
return true;
Expand Down
14 changes: 7 additions & 7 deletions src/DatabaseOutputDriver.C
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ extern "C" {

DatabaseOutputDriver::DatabaseOutputDriver(void * data)
: attributes(NULL),
submittedResults(false),
wroteLogHeader(false),
submittedResults(false),
currTest(NULL),
result(UNKNOWN)
{
Expand All @@ -89,7 +89,7 @@ DatabaseOutputDriver::~DatabaseOutputDriver() {

void
DatabaseOutputDriver::startNewTest(std::map<std::string, std::string> &attrs,
TestInfo *test, RunGroup *group)
TestInfo *test, RunGroup *)
{
currTest = test;

Expand All @@ -116,19 +116,19 @@ DatabaseOutputDriver::startNewTest(std::map<std::string, std::string> &attrs,
result = UNKNOWN;
}

void DatabaseOutputDriver::redirectStream(TestOutputStream stream, const char * filename) {
void DatabaseOutputDriver::redirectStream(TestOutputStream, const char *) {
// This is a no-op for database output
}

void DatabaseOutputDriver::logResult(test_results_t res, int stage) {
void DatabaseOutputDriver::logResult(test_results_t res, int) {
// What does this do, exactly? Store the result code for database check-in
// I guess..
// Do I want to submit the results to the database in this method, or use
// finalizeOutput for that?
result = res;
}

void DatabaseOutputDriver::logCrash(std::string crashedTest) {
void DatabaseOutputDriver::logCrash(std::string) {
// New idea: we've already called startNewTest for this test, so
// dblogFilename is set to recover the old log data for the test.
// All we need to do is register a crashed result for the test.
Expand All @@ -142,7 +142,7 @@ void DatabaseOutputDriver::log(TestOutputStream stream, const char *fmt, ...) {
va_end(args);
}

void DatabaseOutputDriver::vlog(TestOutputStream stream, const char *fmt,
void DatabaseOutputDriver::vlog(TestOutputStream, const char *fmt,
va_list args)
{
FILE *dbout = NULL;
Expand Down Expand Up @@ -245,7 +245,7 @@ void DatabaseOutputDriver::finalizeOutput() {
__FILE__, __LINE__, sqlLogFilename.c_str());
//TODO handle error
}
int size = strlen(logHeader.c_str());
auto size = strlen(logHeader.c_str());
if (fwrite(logHeader.c_str(), sizeof(char), size, sqlLog) != size) {
fprintf(stderr, "[%s:%u] - Error writing to log file.\n", __FILE__, __LINE__);
//TODO handle error
Expand Down
6 changes: 2 additions & 4 deletions src/MutateeStart.C
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ static std::string launchMutatee_plat(const std::string &exec_name, const std::v
setenv("LD_LIBRARY_PATH", new_ld_path, 1);

char **argv = getCParams(exec_name, args);
const char *c_exec_name = exec_name.c_str();

execvp(exec_name.c_str(), (char * const *) argv);

Expand Down Expand Up @@ -385,7 +384,7 @@ static std::string launchMutatee_plat(const std::string &exec_name, const std::v
}
#endif

bool shouldLaunch(RunGroup *group, ParameterDict &params)
bool shouldLaunch(RunGroup *, ParameterDict &)
{
return true;
}
Expand All @@ -395,7 +394,6 @@ std::string launchMutatee(std::string executable, std::vector<std::string> &args
char group_num[32];
snprintf(group_num, 32, "%d", group->index);

bool in_runtests = params["in_runtests"]->getInt();
if (!shouldLaunch(group, params))
return std::string(group_num) + ":-1";

Expand Down Expand Up @@ -542,7 +540,7 @@ Dyninst::PID getMutateePid(RunGroup *group)
int pid;

sscanf(mutatee_string.c_str(), "%d:%d", &group_id, &pid);
assert(group->index == group_id || group_id == -1);
assert(group->index == static_cast<unsigned>(group_id) || group_id == -1);

spawned_mutatees.erase(i);

Expand Down
6 changes: 3 additions & 3 deletions src/ParameterDict.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Parameter::~Parameter()
}

// Error functions, in proper operation these will be overidden in a subclass
void Parameter::setString(const char *str)
void Parameter::setString(const char *)
{
fprintf(stderr, "Warning: Setting a string for a non-string Parameter, ignored\n");
}
Expand All @@ -61,7 +61,7 @@ int Parameter::getInt()
return -1;
}

void Parameter::setInt(int num)
void Parameter::setInt(int)
{
fprintf(stderr, "Warning: Setting an int for a non-int Parameter, ignored\n");
}
Expand All @@ -72,7 +72,7 @@ void *Parameter::getPtr()
return NULL;
}

void Parameter::setPtr(void *ptr)
void Parameter::setPtr(void *)
{
fprintf(stderr, "Warning: Setting an ptr for a non-ptr Parameter, ignored\n");
}
Expand Down
6 changes: 3 additions & 3 deletions src/ResumeLog.C
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ void parse_resumelog(std::vector<RunGroup *> &groups)

for (;;)
{
int res = fscanf(f, "%d,%d,%d\n", &groupnum, &testnum, &runstate_int);
int res = fscanf(f, "%u,%u,%d\n", &groupnum, &testnum, &runstate_int);
if (res != 3)
break;

assert(groupnum >= 0 && groupnum < groups.size());
assert(static_cast<size_t>(groupnum) < groups.size());
assert(groups[groupnum]);
assert(testnum >= 0);
assert(testnum >= 0UL);
assert(testnum < groups[groupnum]->tests.size());
if (runstate_int == RESULT_REPORTED)
{
Expand Down
11 changes: 5 additions & 6 deletions src/StdOutputDriver.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,12 @@
#include <assert.h>
#include <stdlib.h>

StdOutputDriver::StdOutputDriver(void * data) : attributes(NULL), streams() {
StdOutputDriver::StdOutputDriver(void *) {
streams[STDOUT] = std::string("-");
streams[STDERR] = std::string("-");
streams[LOGINFO] = std::string("-");
streams[LOGERR] = std::string("-");
streams[HUMAN] = std::string("-");
last_test = NULL;
last_group = NULL;
printed_header = false;
}

StdOutputDriver::~StdOutputDriver() {
Expand Down Expand Up @@ -257,7 +254,7 @@ FILE *StdOutputDriver::getHumanFile() {
return out;
}

void StdOutputDriver::logCrash(std::string testname) {
void StdOutputDriver::logCrash(std::string) {
// TODO Do something here
}

Expand All @@ -281,7 +278,7 @@ void StdOutputDriver::vlog(TestOutputStream stream, const char *fmt, va_list arg
}

const char *fn = streams[stream].c_str();
FILE *out;
FILE *out{};
if (strcmp(fn, "-") == 0) {
// We're printing to the default file
switch(stream) {
Expand All @@ -295,6 +292,8 @@ void StdOutputDriver::vlog(TestOutputStream stream, const char *fmt, va_list arg
case LOGERR:
out = stderr;
break;
case OUTPUT_STREAMS_SIZE:
break;
}
} else {
// Open the file
Expand Down
10 changes: 5 additions & 5 deletions src/StdOutputDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@

class StdOutputDriver : public TestOutputDriver {
protected:
std::map<TestOutputStream, std::string> streams;
std::map<std::string, std::string> *attributes;
TestInfo *last_test;
RunGroup *last_group;
std::map<TestOutputStream, std::string> streams{};
std::map<std::string, std::string> *attributes{};
TestInfo *last_test{};
RunGroup *last_group{};

//Column widths
static const int name_len = 26;
Expand All @@ -55,7 +55,7 @@ class StdOutputDriver : public TestOutputDriver {
static const int pic_len = 7;
static const int pmode_len = 5;

bool printed_header;
bool printed_header{false};
void printHeader(FILE *out);
public:
TESTLIB_DLL_EXPORT StdOutputDriver(void * data);
Expand Down
2 changes: 1 addition & 1 deletion src/TestMutator.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool TestMutator::hasCustomExecutionPath() {
return false;
}

test_results_t TestMutator::setup(ParameterDict &param) {
test_results_t TestMutator::setup(ParameterDict &) {
return PASSED;
}

Expand Down
2 changes: 1 addition & 1 deletion src/TestOutputDriver.C
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static void parseLabel3(std::map<std::string, std::string> *attrs,
}

TESTLIB_DLL_EXPORT bool TestOutputDriver::getAttributesMap(TestInfo *test,
RunGroup *group, std::map<std::string, std::string> &attrs) {
RunGroup *, std::map<std::string, std::string> &attrs) {
if ((NULL == test) || (NULL == test->label)) {
return false;
}
Expand Down
1 change: 1 addition & 0 deletions src/UsageMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class UsageMonitor

public:
TESTLIB_DLL_EXPORT UsageMonitor();
TESTLIB_DLL_EXPORT UsageMonitor(UsageMonitor const&) = default;
TESTLIB_DLL_EXPORT void start();
TESTLIB_DLL_EXPORT void end();
TESTLIB_DLL_EXPORT void clear();
Expand Down
Loading