diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-18 19:05:03 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-03-18 19:11:59 +0100 |
commit | 62a4b584bba4d152161f5e5974392e2017c7b42c (patch) | |
tree | dc889f25b3b50dc695dc2dcca0b99a4b080504cd /src/test/test-bootspec.c | |
parent | 523487f713bcc24302623a2326bc10ff4d5f03d2 (diff) | |
download | systemd-62a4b584bba4d152161f5e5974392e2017c7b42c.tar.gz |
sd-boot+bootctl: invert order of entries w/o sort-key
With the changes in 20ec8f534f90c94669ac8f9a50869f22f94fd4c8, we would sort
entries with sort-key as expected (higher versions earlier, i.e. at the top of
the menu), but entries without the sort-key as before, with higher versions
later.
When we have a bunch of boot entries grouped by machine-id (or even in the
typical case of all boot entries having the same machine id), sorting by id
should generally give good results. Entries will be grouped by installation,
and then newer entries should generally be at the top of the menu.
Diffstat (limited to 'src/test/test-bootspec.c')
-rw-r--r-- | src/test/test-bootspec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-bootspec.c b/src/test/test-bootspec.c index 47d0f58c96..7ba44744ba 100644 --- a/src/test/test-bootspec.c +++ b/src/test/test-bootspec.c @@ -86,9 +86,9 @@ TEST_RET(bootspec_sort) { assert_se(streq(config.entries[2].id, "c.conf")); /* The following ones have no sort key, hence order by version compared ids, lowest first */ - assert_se(streq(config.entries[3].id, "a-5.conf")); + assert_se(streq(config.entries[3].id, "b.conf")); assert_se(streq(config.entries[4].id, "a-10.conf")); - assert_se(streq(config.entries[5].id, "b.conf")); + assert_se(streq(config.entries[5].id, "a-5.conf")); return 0; } |