Skip to content

Commit

Permalink
test: add test case for issue #31776
Browse files Browse the repository at this point in the history
(cherry picked from commit bf99542)

Related: RHEL-30567
  • Loading branch information
yuwata authored and dtardon committed Aug 5, 2024
1 parent 8160d9f commit 614ea41
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/units/testsuite-04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,12 @@ world
EOF
rm -f "$CURSOR_FILE"

# Check that --until works with --after-cursor and --lines/-n
# See: https://github.com/systemd/systemd/issues/31776
CURSOR_FILE="$(mktemp)"
journalctl -q -n 0 --cursor-file="$CURSOR_FILE"
TIMESTAMP="$(journalctl -q -n 1 --cursor="$(<"$CURSOR_FILE")" --output=short-unix | cut -d ' ' -f 1 | cut -d '.' -f 1)"
[[ -z "$(journalctl -q -n 10 --after-cursor="$(<"$CURSOR_FILE")" --until "@$((TIMESTAMP - 3))")" ]]
rm -f "$CURSOR_FILE"

touch /testok

0 comments on commit 614ea41

Please sign in to comment.