Skip to content

Commit

Permalink
contrib/intel/jenkins: Add tracer check to dsa
Browse files Browse the repository at this point in the history
Add FI_LOG_LEVEL=warn to dsa stage to print out tracer information
Have summary of dsa check for the tracer output to make sure DSA actually ran
Summary will fail if DSA didn't run when it was expected to

Signed-off-by: Zach Dworkin <[email protected]>
  • Loading branch information
zachdworkin committed Aug 2, 2023
1 parent 3bf5e9e commit 27a3c23
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/intel/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,8 @@ pipeline {
run_python(PYTHON_VERSION,
"""runtests.py --prov=shm --test=fabtests \
--log_file=${env.LOG_DIR}/fabtests_shm_dsa_reg \
--user_env FI_SHM_DISABLE_CMA=1 FI_SHM_USE_DSA_SAR=1""")
--user_env FI_SHM_DISABLE_CMA=1 FI_SHM_USE_DSA_SAR=1 \
FI_LOG_LEVEL=warn""")
}
}
}
Expand Down
38 changes: 38 additions & 0 deletions contrib/intel/jenkins/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def read_file(self):
class FabtestsSummarizer(Summarizer):
def __init__(self, logger, log_dir, prov, file_name, stage_name):
super().__init__(logger, log_dir, prov, file_name, stage_name)
self.trace = False

def check_name(self, line):
# don't double count ubertest output and don't count fi_ubertest's
Expand All @@ -243,6 +244,11 @@ def check_pass(self, line):
self.passes += 1
if 'ubertest' in self.test_name:
idx = (result_line.index('result:') - 1)
try:
int((result_line[idx].split(',')[0]))
except:
return

ubertest_number = int((result_line[idx].split(',')[0]))
self.passed_tests.append(f"{self.test_name}: "\
f"{ubertest_number}")
Expand All @@ -255,6 +261,10 @@ def check_fail(self, line):
self.fails += 1
if 'ubertest' in self.test_name:
idx = (result_line.index('result:') - 1)
try:
int((result_line[idx].split(',')[0]))
except:
return
ubertest_number = int((result_line[idx].split(',')[0]))
self.failed_tests.append(f"{self.test_name}: " \
f"{ubertest_number}")
Expand All @@ -271,12 +281,40 @@ def check_exclude(self, line):
self.excludes += 1
self.excluded_tests.append(self.test_name)

def check_trace(self, line):
if not self.trace:
cmd_count = 0
faults_count = 0
if ("user to sar buffer" in line):
tokens = line.split(' ')
for i in range(0, len(tokens)):
if 'cmd' in tokens[i]:
cmd_count += int(tokens[i + 1])
if 'faults' in tokens[i]:
faults_count += int(tokens[i + 1])

if (cmd_count > 0 or faults_count > 0):
self.trace = True

def check_line(self, line):
self.check_name(line)
if (self.test_name != 'no_test'):
self.check_pass(line)
self.check_fail(line)
self.check_exclude(line)
if ('dsa' in self.file_name):
self.check_trace(line)

def summarize(self):
if not self.exists:
return 0

self.read_file()
self.print_results()
if ('dsa' in self.file_name and not self.trace):
exit("Expected: DSA to run. Actual: DSA Not Run")

return int(self.fails)

class MultinodePerformanceSummarizer(Summarizer):
def __init__(self, logger, log_dir, prov, file_name, stage_name):
Expand Down

0 comments on commit 27a3c23

Please sign in to comment.