Skip to content
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

job-list: misc cleanup #5407

Merged
merged 5 commits into from
Aug 23, 2023
Merged

Commits on Aug 23, 2023

  1. job-list: cleanup test fd cleanup

    Problem: In job-list/test/job_data.c, the function read_file() returns
    a file descriptor that no one uses.
    
    Have read_file() return void instead of the file descriptor.  Simply close
    the file descriptor before returning.
    chu11 committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    5d2095f View commit details
    Browse the repository at this point in the history
  2. job-list: update data comments for fields parsed

    Problem: In the header file job_data.h, the comments for what fields
    are parsed in specific parsing functions is out of date.
    
    Update the headers appropriately for all fields parsed by those functions.
    chu11 committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3af776e View commit details
    Browse the repository at this point in the history
  3. job-list: do not return error when nonfatal set

    Problem: The internal function parse_jobspec() returns an error for
    an illegal json jobspec when the 'allow_nonfatal' flag is set.
    
    Do not return on error when 'allow_nonfatal' is set to true.
    chu11 committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8b4531e View commit details
    Browse the repository at this point in the history
  4. testsuite: add extra job-list illegal R tests

    Problem: There are several tests in t2260-job-list.t that test
    that job-list works if R is illegal.  However, they only test
    when R is an illegal formatted json object.  They do not test
    if R is missing expected fields.
    
    Add additional tests that set R to an empty json object.
    chu11 committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4cc7e6b View commit details
    Browse the repository at this point in the history
  5. job-list: refactor state transition flags

    Problem: In the internal state transition struct, the flag "processed"
    is a little ambiguous.  In addition, multiple locations manually
    remove a state transition from the next_states list.
    
    Solution: Split the "processed" flag into two flags, "processing" and
    "finished".  The "processing" flag more clearly indicates that the state
    transition is being processed.  The "finished" flag indicates the transition
    is done and we can remove the struct from the next_states list.  With these
    new flags, we no longer need to remove the struct from the next_states list
    in so many locations.  Simply set the "finished" flag to true and remove
    from the list in process_next_state().
    chu11 committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cc20c39 View commit details
    Browse the repository at this point in the history