From c80a8a20c7f1cd82579141b41d3f348e62efcf53 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Tue, 15 Aug 2023 17:03:17 -0700 Subject: [PATCH] testsuite: ensure flux-top(1) doesn't display FLUX_JOBID_ANY title Problem: No tests in the testsuite ensure that flux-top(1) does not display the F58 representation of FLUX_JOBID_ANY as the window title when connected to an instance that is not a Flux job. Add a simple test that verifies FLUX_JOBID_ANY does not appear as the flux-top(1) title. --- t/t2801-top-cmd.t | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/t2801-top-cmd.t b/t/t2801-top-cmd.t index 7fb469f5cdb8..9c9813524fcb 100755 --- a/t/t2801-top-cmd.t +++ b/t/t2801-top-cmd.t @@ -61,6 +61,13 @@ test_expect_success 'flux-top summary shows no jobs initially' ' grep "0 running" nojobs.out && grep "0 failed" nojobs.out ' +# Note: jpXCZedGfVQ is the base58 representation of FLUX_JOBID_ANY. We +# grep for this value without f or ƒ in case build environment influences +# presence of one of the other. +# +test_expect_success 'flux-top does not display FLUX_JOBID_ANY jobid in title' ' + test_must_fail grep jpXCZedGfVQ nojobs.out +' test_expect_success 'run a test job to completion' ' flux submit --wait -n1 flux start /bin/true >jobid && job_list_wait_state $(cat jobid) INACTIVE