git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: pre-v2.34.0-rc0 regressions: t7900-maintenance.sh broken due to 'systemd-analyze' (was: What's cooking in git.git (Oct 2021, #06; Mon, 25))

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Oct 26, 2021, 15:34 UTC
Message-ID
<211026.864k93zteh.gmgdl@evledraar.gmail.com>
In-Reply-To
<211026.8635oo11jk.gmgdl@evledraar.gmail.com>

A On Tue, Oct 26 2021, Ævar Arnfjörð Bjarmason wrote:

Show 39 quoted lines
> On Mon, Oct 25 2021, Junio C Hamano wrote:
>
> [Spinning off some "before rc0" threads]
>
>> The fifteenth batch of topics are in 'master'.  I expect that this
>> is more-or-less what we can expect in the -rc0, unless there is a
>> hotfix to what's already merged.
>
> I reported a breakage with $subject in [1], which I see Lénaïc tried to
> fix in [2], but which I managed to miss. Sorry about that.
>
> On that machine (gcc135, on the GCC farm) it's still breaking, relevant
> trace output:
>     
>     ++ printf '%s\n' 'prerequisite SYSTEMD_ANALYZE ok'
>     prerequisite SYSTEMD_ANALYZE ok
>     ++ return 0
>     ++ test_set_prereq SYSTEMD_ANALYZE
>     ++ test -n ''
>     ++ case "$1" in
>     ++ satisfied_prereq=' POSIXPERM BSLASHPSPEC EXECKEEPSPID REFFILES COLUMNS_CAN_BE_1 PERL PTHREADS PYTHON GETTEXT XMLLINT SYSTEMD_ANALYZE '
>     ++ lazily_tested_prereq='EXPENSIVE XMLLINT SYSTEMD_ANALYZE '
>     ++ total_prereq=1
>     ++ case "$satisfied_prereq" in
>     ++ satisfied_this_prereq=t
>     ++ case "$satisfied_this_prereq,$negative_prereq" in
>     ++ ok_prereq=1
>     ++ test 1 = 1
>     ++ systemd-analyze verify systemd/user/git-maintenance@.service
>     Failed to open /dev/tty0: Permission denied
>     Failed to load systemd/user/git-maintenance@.service: Invalid argument
>     error: last command exited with $?=1
>     not ok 34 - start and stop Linux/systemd maintenance
>
> I haven't looked into it, presumably easy-ish to fix, just moving on now
> and checking for other regressions...
>
> 1. https://lore.kernel.org/git/874ka618n4.fsf@evledraar.gmail.com/#t
> 2. https://lore.kernel.org/git/20210927213016.21714-2-lenaic@lhuard.fr/

I looked into this a little bit, the immediate problem is that the prereq testing is different from the command we actually run, and I can run one but not the other on that box for some reason. I.e.

    [avar@gcc135 t]$ systemd-analyze verify /lib/systemd/system/basic.target; echo $?
    Failed to open /dev/tty0: Permission denied
    0
    
    [avar@gcc135 t]$ systemd-analyze verify systemd/user/git-maintenance@.service; echo $?
    Failed to open /dev/tty0: Permission denied
    Failed to load systemd/user/git-maintenance@.service: Invalid argument
    1

So "fixing" that is easy, just have the prereq test that thing in particular, and why does one thing have a /lib/ prefix, but not the other?

But presumably this points to a bigger problem. I.e. we just did a "git maintenance start" a few lines earlier.

If I could start something via systemd then presumably it's either up, or our "start" is buggy and we didn't actually start something, or are using the wrong (non-portable?) invocation to check the running status of the thing we just started?

Also aside from that shouldn't this be:
    test_when_finished "systemd-something stop-it some-service" &&
    systemd-something start-it some-service &&
    [...]

Or are runaway services handled somehow by systemd magic (tied to the PID of the test run?).

So in trying to fix it myself I ran into the boundaries of the little systemd knowledge I've got.

Previous: Ævar Arnfjörð BjarmasonNext: Eric Sunshine
Message 7 of 32 in “What's cooking in git.git (Oct 2021, #06; Mon, 25)”
  1. Junio C HamanoOct 26, 2021
  2. Jeff KingOct 26, 2021
  3. Junio C HamanoOct 27, 2021
  4. Kaartic SivaraamOct 31, 2021
  5. Jeff KingNov 1, 2021
  6. pre-v2.34.0-rc0 regressions: t7900-maintenance.sh broken due to 'systemd-analyze' (was: What's cooking in git.git (Oct 2021, #06; Mon, 25))Ævar Arnfjörð Bjarmason, Oct 26, 2021
  7. Ævar Arnfjörð BjarmasonOct 26, 2021
  8. Eric SunshineOct 26, 2021
  9. maintenance tests: fix systemd v2.34.0-rc* test regressionÆvar Arnfjörð Bjarmason, Nov 2, 2021
  10. Eric SunshineNov 3, 2021
  11. maintenance tests: fix systemd v2.34.0-rc* test regressionÆvar Arnfjörð Bjarmason, Nov 10, 2021
  12. Johannes SchindelinNov 10, 2021
  13. Ævar Arnfjörð BjarmasonNov 10, 2021
  14. Junio C HamanoNov 11, 2021
  15. pre-v2.34.0-rc0 regressions: 'git log' has a noisy iconv() warning (was: What's cooking in git.git (Oct 2021, #06; Mon, 25))Ævar Arnfjörð Bjarmason, Oct 26, 2021
  16. Jeff KingOct 27, 2021
  17. Junio C HamanoOct 27, 2021
  18. Jeff KingOct 28, 2021
  19. Junio C HamanoOct 28, 2021
  20. Jeff KingOct 28, 2021
  21. tb/plug-pack-bitmap-leaks (was: What's cooking in git.git (Oct 2021, #06; Mon, 25))Ævar Arnfjörð Bjarmason, Oct 26, 2021
  22. Taylor BlauOct 26, 2021
  23. jc/branch-copy-doc (was: What's cooking in git.git (Oct 2021, #06; Mon, 25))Ævar Arnfjörð Bjarmason, Oct 26, 2021
  24. Derrick StoleeOct 26, 2021
  25. Ævar Arnfjörð BjarmasonOct 26, 2021
  26. Victoria DyeOct 26, 2021
  27. Junio C HamanoOct 26, 2021
  28. Junio C HamanoOct 26, 2021
  29. Derrick StoleeOct 26, 2021
  30. regression in ns/tmp-objdir and ns/batched-fsyncNeeraj Singh, Oct 26, 2021
  31. Martin ÅgrenOct 27, 2021
  32. Junio C HamanoOct 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.