File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/bindings/python/flux/uri/resolvers Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def _get_broker_child(pid):
5959 return cpid
6060 except FileNotFoundError :
6161 pass
62- raise ValueError (f"PID { broker_pid } is a flux-broker and no child found" )
62+ raise ValueError (f"PID { pid } is a flux-broker and no child found" )
6363
6464
6565def _proc_has_task_children ():
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ test_description='Test flux uri command'
44
55. $( dirname $0 ) /sharness.sh
66
7- test_under_flux 1
7+ test_under_flux 2
88
99testssh=" ${SHARNESS_TEST_SRCDIR} /scripts/tssh"
1010
@@ -51,6 +51,11 @@ test_expect_success 'flux-uri pid resolver works on flux-broker with fallback' '
5151 test "$(flux uri pid:$(flux getattr broker.pid))" = "$FLUX_URI"
5252 )
5353'
54+ test_expect_success ' flux-uri pid resolver fails if broker has no child' '
55+ test_must_fail flux uri pid:$(flux exec -r 1 flux getattr broker.pid) \
56+ >broker-no-child.out 2>&1 &&
57+ grep "is a flux-broker and no child found" broker-no-child.out
58+ '
5459test_expect_success ' flux-uri pid resolver fails for nonexistent pid' '
5560 test_expect_code 1 flux uri pid:123456
5661'
You can’t perform that action at this time.
0 commit comments