-
Notifications
You must be signed in to change notification settings - Fork 54
job-list: minor code consistency cleanup #5031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2300f09 to
372d66b
Compare
Problem: In one test in t2800-jobs-cmd.t, a state count used an incorrect file to determine the number of jobs that failed with a timeout. Solution: Use the correct file to determine the number of jobs that failed due to a timeout.
Problem: An errant single quote existed in a test in t2260-job-list.t. Remove it.
Problem: There was inconsistent tab vs space indentation in t2260-job-list.t. Make all indentation tabs for consistency.
Problem: The variable "exception" is used for the "exception_occurred" job-list field. This is legacy from when only "exception" was returned. Update the variable name to match the field name.
372d66b to
6e8b92e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like good cleanup to me. Maybe change the PR title to be more release-notes worthy, and I noted that the full path path to str.h doesn't need to be specified where -I/path/to/libccan is already specified in Makefile.ams
src/common/libjob/jj.c
Outdated
| #include <string.h> | ||
| #include <jansson.h> | ||
|
|
||
| #include "src/common/libccan/ccan/str/str.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-I$(top_srcdir)/src/common/libccan is specified in the Makefile, so only ccan/str/str.h is required here.
src/common/libjob/test/sign_none.c
Outdated
| #include "src/common/libtap/tap.h" | ||
| #include "src/common/libjob/sign_none.h" | ||
| #include "src/common/libccan/ccan/base64/base64.h" | ||
| #include "src/common/libccan/ccan/str/str.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #include "src/common/libccan/ccan/str/str.h" | |
| #include "ccan/str/str.h" |
src/modules/job-list/job_state.c
Outdated
| #include "src/common/libutil/grudgeset.h" | ||
| #include "src/common/libjob/job_hash.h" | ||
| #include "src/common/libidset/idset.h" | ||
| #include "src/common/libccan/ccan/str/str.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #include "src/common/libccan/ccan/str/str.h" | |
| #include "ccan/str/str.h" |
src/modules/job-list/job_util.c
Outdated
| #include <assert.h> | ||
|
|
||
| #include "src/common/libutil/errno_safe.h" | ||
| #include "src/common/libccan/ccan/str/str.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #include "src/common/libccan/ccan/str/str.h" | |
| #include "ccan/str/str.h" |
Problem: Flux-core is slowly moving to use streq() instead of strcmp() when comparing strings. Some strcmp()s are lingering in libjob. Replace strcmp() with streq() as needed. In a few locations where the "ccan/str/str.h" header was included, update other includes to have similar include paths.
Problem: Flux-core is slowly moving to use streq() instead of strcmp() when comparing strings. Some strcmp()s are lingering in the job-list module. Replace strcmp() with streq() as needed.
6e8b92e to
f96b74a
Compare
|
@grondo thanks for the review. updated the title and tweaked per your recommendations. There were a few other "src/common/libccan/cccan/..." includes in some files in |
Codecov Report
@@ Coverage Diff @@
## master #5031 +/- ##
==========================================
+ Coverage 83.14% 83.16% +0.01%
==========================================
Files 445 445
Lines 76529 76529
==========================================
+ Hits 63629 63642 +13
+ Misses 12900 12887 -13
|
technically is
job-listand things related tojob-list