@@ -129,6 +129,16 @@ test_expect_success 'submit jobs for job list testing' '
129129 flux job id $jobid > terminated.ids &&
130130 flux job id $jobid >> failedids &&
131131 #
132+ # Run a job that we will end with a user exception, copy its JOBID to both
133+ # inactive and failed and exception lists.
134+ #
135+ jobid=`flux submit --wait-event=start sleep inf` &&
136+ flux job raise --type=myexception --severity=0 -m "myexception" $jobid &&
137+ fj_wait_event $jobid clean &&
138+ echo $jobid >> inactiveids &&
139+ flux job id $jobid > exception.ids &&
140+ flux job id $jobid >> failedids &&
141+ #
132142 # Run a job that will timeout, copy its JOBID to both inactive and
133143 # timeout lists.
134144 #
@@ -533,8 +543,9 @@ test_expect_success 'flux-jobs --format={name} works' '
533543 echo "canceledjob" >> jobnameI.exp &&
534544 echo "sleep" >> jobnameI.exp &&
535545 echo "sleep" >> jobnameI.exp &&
546+ echo "sleep" >> jobnameI.exp &&
536547 echo "nosuchcommand" >> jobnameI.exp &&
537- count=$(($(state_count inactive) - 4 )) &&
548+ count=$(($(state_count inactive) - 5 )) &&
538549 for i in `seq 1 $count`; do
539550 echo "hostname" >> jobnameI.exp
540551 done &&
@@ -626,7 +637,7 @@ test_expect_success 'flux-jobs --format={runtime:0.3f} works' '
626637 done &&
627638 test_cmp runtime-dotP.out runtime-dotP.exp &&
628639 flux jobs --filter=running,inactive -no "{runtime:0.3f}" > runtime-dotRI.out &&
629- [ "$(grep -E "\.[0-9]{3}" runtime-dotRI.out | wc -l)" = "16 " ]
640+ [ "$(grep -E "\.[0-9]{3}" runtime-dotRI.out | wc -l)" = "17 " ]
630641'
631642
632643test_expect_success ' flux-jobs --format={contextual_time} works' '
@@ -803,6 +814,8 @@ test_expect_success 'flux-jobs --format={exception.*},{exception.*:h} works' '
803814 flux jobs --filter=inactive -no "$fmt" > exceptionI.out &&
804815 count=$(grep -c "^True,True,0,0,cancel,cancel,mecanceled,mecanceled$" exceptionI.out) &&
805816 test $count -eq $(state_count canceled) &&
817+ count=$(grep -c "^True,True,0,0,myexception,myexception,myexception,myexception$" exceptionI.out) &&
818+ test $count -eq $(state_count exception) &&
806819 count=$(grep -c "^True,True,0,0,exec,exec,.*No such file.*" exceptionI.out) &&
807820 test $count -eq $(state_count failed_exec) &&
808821 count=$(grep -c "^True,True,0,0,timeout,timeout,.*expired.*" exceptionI.out) &&
@@ -900,8 +913,8 @@ test_expect_success 'flux-jobs --format={waitstatus},{returncode}' '
900913 test_debug "echo exit 127 got $count, want $(state_count failed_exec)" &&
901914 test $count -eq $(state_count failed_exec) &&
902915 count=$(grep -c "^36608,143$" returncodeI.out) &&
903- test_debug "echo exit 143 got $count, want $(state_count terminated)" &&
904- test $count -eq $(state_count terminated) &&
916+ test_debug "echo exit 143 got $count, want $(state_count terminated exception )" &&
917+ test $count -eq $(state_count terminated exception ) &&
905918 count=$(grep -c "^36352,142$" returncodeI.out) &&
906919 test_debug "echo exit 142 got $count, want $(state_count timeout)" &&
907920 test $count -eq $(state_count timeout) &&
0 commit comments