RunCommandLogs: add a helper for if it failed with an exec error

[?]
Nov 19, 2021, 7:17 PM
TEAGCKJVTRUITX6IRXFYFNF3TVSWFJTBFTI7HIDMLO7GD5DPR5WQC

Dependencies

  • [2] 52IH5FN3 RunCommandLogs: add helpers for if it is running/failed/signaled
  • [*] 2GNJU4VF RunCommandLogs: init table
  • [*] VYS5RV7Y RunCommand: create run logs for each execution
  • [*] FFJI7K6E RunCommandLogs: test recording a signaled process without a core dump
  • [*] CBU7KGFE Record the errno if exec fails
  • [*] RZBW3YWD RunCommandLogs: add a did_succeed helper

Change contents

  • edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 299
    [2.774]
    [2.774]
    =head2 did_fail_with_exec_error
    Looks in the database to see if the task failed with a signal.
    Return:
    * true if the task is not running and failed with a signal.
    * false if the task is running or exited with an exit code.
    =cut
    sub did_fail_with_exec_error {
    my ($self) = @_;
  • edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 312
    [2.775]
    [2.775]
    if ($self->is_running()) {
    return 0;
    }
  • edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 316
    [2.776]
    [4.2945]
    if ($self->did_succeed()) {
    return 0;
    }
    return defined($self->error_number);
    }
  • edit in t/Schema/Result/RunCommandLogs.t at line 59
    [2.920]
    [5.3884]
    ok(!$runlog->did_fail_with_exec_error(), "The process did not fail to start due to an exec error.");
  • edit in t/Schema/Result/RunCommandLogs.t at line 74
    [2.1069]
    [5.4390]
    ok(!$runlog->did_fail_with_exec_error(), "The process did not fail to start due to an exec error.");
  • edit in t/Schema/Result/RunCommandLogs.t at line 90
    [2.1218]
    [5.4965]
    ok(!$runlog->did_fail_with_exec_error(), "The process did not fail to start due to an exec error.");
  • edit in t/Schema/Result/RunCommandLogs.t at line 106
    [2.1362]
    [6.586]
    ok(!$runlog->did_fail_with_exec_error(), "The process did not fail to start due to an exec error.");
  • edit in t/Schema/Result/RunCommandLogs.t at line 122
    [2.1567]
    [5.5541]
    ok(!$runlog->did_fail_with_exec_error(), "The process did not fail to start due to an exec error.");
  • edit in t/Schema/Result/RunCommandLogs.t at line 138
    [2.1712]
    [5.6092]
    ok($runlog->did_fail_with_exec_error(), "The process failed to start due to an exec error.");
  • edit in t/plugins/RunCommand/errno.t at line 43
    [8.850]
    [7.1585]
    ok($runlog->did_fail_with_exec_error(), "The process failed to start due to an exec error.");