]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #26213 from poettering/journal-rework-seqnum
authorLuca Boccassi <bluca@debian.org>
Wed, 15 Feb 2023 19:58:58 +0000 (19:58 +0000)
committerGitHub <noreply@github.com>
Wed, 15 Feb 2023 19:58:58 +0000 (19:58 +0000)
journal sequence number rework

1  2 
src/libsystemd/sd-journal/sd-journal.c
test/units/testsuite-04.sh

index bab2bdc24e45308c178ba8edff782a9439f8659e,419d00bedfd6a6a45b198ded58a0608b3dededd0..3cde55cacb7d3f60d9665ad849a945079deee230
@@@ -256,14 -256,16 +256,23 @@@ if is_xattr_supported; the
      add_logs_filtering_override "logs-filtering.service" "10-allow-with-escape-char" "\x7emore~"
      [[ -n $(run_service_and_fetch_logs "logs-filtering.service") ]]
  
 +    add_logs_filtering_override "delegated-cgroup-filtering.service" "00-allow-all" ".*"
 +    [[ -n $(run_service_and_fetch_logs "delegated-cgroup-filtering.service") ]]
 +
 +    add_logs_filtering_override "delegated-cgroup-filtering.service" "01-discard-hello" "~hello"
 +    [[ -z $(run_service_and_fetch_logs "delegated-cgroup-filtering.service") ]]
 +
      rm -rf /etc/systemd/system/logs-filtering.service.d
 +    rm -rf /etc/systemd/system/delegated-cgroup-filtering.service.d
  fi
  
+ # Check that the seqnum field at least superficially works
+ systemd-cat echo "ya"
+ journalctl --sync
+ SEQNUM1=$(journalctl -o export -n 1 | grep -a __SEQNUM= | cut -d= -f2)
+ systemd-cat echo "yo"
+ journalctl --sync
+ SEQNUM2=$(journalctl -o export -n 1 | grep -a __SEQNUM= | cut -d= -f2)
+ test "$SEQNUM2" -gt "$SEQNUM1"
  touch /testok