File: test-0071.sh

package info (click to toggle)
logrotate 3.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,152 kB
  • sloc: sh: 6,666; ansic: 5,245; makefile: 161
file content (26 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

. ./test-common.sh

cleanup 71

# ------------------------------- Test 71 ------------------------------------
# Rotation should occur because file is old
preptest test.log 71 2

# Set log modification time to some date in the past
touch -t 200001010000 test.log

# Put in place a state file that will force a rotation
cat > state <<EOF
logrotate state -- version 2
"$PWD/test.log" 2000-1-1
EOF

$RLR test-config.71 || exit 23

checkoutput <<EOF
test.log 0
test.log.1 0 zero
test.log.2 0 first
EOF