diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-01-19 11:40:48 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-20 11:57:29 +0000 |
commit | c87a3b92ace07edb4ab46432523e96e22f7c166d (patch) | |
tree | 9f9c11419b5e3b4e8edbe2877ed54ff8740978c4 /meta/lib | |
parent | 0b1dc4e3d437fb9cde75604a5881e0fdb98ebdd6 (diff) | |
download | poky-c87a3b92ace07edb4ab46432523e96e22f7c166d.tar.gz |
logrotate: update 3.18.1 -> 3.19.0, drop rotate-across-filesystems patches
Upstream review and request to address it got no reaction
from the author, and the patches are an ongoing rebase burden,
so if someone needs this feature, please complete
the upstreaming work first.
(From OE-Core rev: c748945e9c91eb2b83b8a44828f35579bcd09146)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/logrotate.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/runtime/cases/logrotate.py b/meta/lib/oeqa/runtime/cases/logrotate.py index a4efcd07c0..2bff08f9da 100644 --- a/meta/lib/oeqa/runtime/cases/logrotate.py +++ b/meta/lib/oeqa/runtime/cases/logrotate.py | |||
@@ -17,7 +17,7 @@ class LogrotateTest(OERuntimeTestCase): | |||
17 | 17 | ||
18 | @classmethod | 18 | @classmethod |
19 | def tearDownClass(cls): | 19 | def tearDownClass(cls): |
20 | cls.tc.target.run('mv -f $HOME/wtmp.oeqabak /etc/logrotate.d/wtmp && rm -rf $HOME/logrotate_dir') | 20 | cls.tc.target.run('mv -f $HOME/wtmp.oeqabak /etc/logrotate.d/wtmp && rm -rf /var/log//logrotate_dir') |
21 | cls.tc.target.run('rm -rf /var/log/logrotate_testfile && rm -rf /etc/logrotate.d/logrotate_testfile') | 21 | cls.tc.target.run('rm -rf /var/log/logrotate_testfile && rm -rf /etc/logrotate.d/logrotate_testfile') |
22 | 22 | ||
23 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 23 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
@@ -29,17 +29,17 @@ class LogrotateTest(OERuntimeTestCase): | |||
29 | msg = ('Could not create/update /var/log/wtmp with touch') | 29 | msg = ('Could not create/update /var/log/wtmp with touch') |
30 | self.assertEqual(status, 0, msg = msg) | 30 | self.assertEqual(status, 0, msg = msg) |
31 | 31 | ||
32 | status, output = self.target.run('mkdir $HOME/logrotate_dir') | 32 | status, output = self.target.run('mkdir /var/log//logrotate_dir') |
33 | msg = ('Could not create logrotate_dir. Output: %s' % output) | 33 | msg = ('Could not create logrotate_dir. Output: %s' % output) |
34 | self.assertEqual(status, 0, msg = msg) | 34 | self.assertEqual(status, 0, msg = msg) |
35 | 35 | ||
36 | status, output = self.target.run('echo "create \n olddir $HOME/logrotate_dir \n include /etc/logrotate.d/wtmp" > /tmp/logrotate-test.conf') | 36 | status, output = self.target.run('echo "create \n olddir /var/log//logrotate_dir \n include /etc/logrotate.d/wtmp" > /tmp/logrotate-test.conf') |
37 | msg = ('Could not write to /tmp/logrotate-test.conf') | 37 | msg = ('Could not write to /tmp/logrotate-test.conf') |
38 | self.assertEqual(status, 0, msg = msg) | 38 | self.assertEqual(status, 0, msg = msg) |
39 | 39 | ||
40 | # If logrotate fails to rotate the log, view the verbose output of logrotate to see what prevented it | 40 | # If logrotate fails to rotate the log, view the verbose output of logrotate to see what prevented it |
41 | _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test.conf') | 41 | _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test.conf') |
42 | status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep wtmp.1') | 42 | status, _ = self.target.run('find /var/log//logrotate_dir -type f | grep wtmp.1') |
43 | msg = ("logrotate did not successfully rotate the wtmp log. Output from logrotate -vf: \n%s" % (logrotate_output)) | 43 | msg = ("logrotate did not successfully rotate the wtmp log. Output from logrotate -vf: \n%s" % (logrotate_output)) |
44 | self.assertEqual(status, 0, msg = msg) | 44 | self.assertEqual(status, 0, msg = msg) |
45 | 45 | ||
@@ -54,17 +54,17 @@ class LogrotateTest(OERuntimeTestCase): | |||
54 | msg = ('Could not write to /etc/logrotate.d/logrotate_testfile') | 54 | msg = ('Could not write to /etc/logrotate.d/logrotate_testfile') |
55 | self.assertEqual(status, 0, msg = msg) | 55 | self.assertEqual(status, 0, msg = msg) |
56 | 56 | ||
57 | status, output = self.target.run('echo "create \n olddir $HOME/logrotate_dir \n include /etc/logrotate.d/logrotate_testfile" > /tmp/logrotate-test2.conf') | 57 | status, output = self.target.run('echo "create \n olddir /var/log//logrotate_dir \n include /etc/logrotate.d/logrotate_testfile" > /tmp/logrotate-test2.conf') |
58 | msg = ('Could not write to /tmp/logrotate_test2.conf') | 58 | msg = ('Could not write to /tmp/logrotate_test2.conf') |
59 | self.assertEqual(status, 0, msg = msg) | 59 | self.assertEqual(status, 0, msg = msg) |
60 | 60 | ||
61 | status, output = self.target.run('find $HOME/logrotate_dir -type f | grep logrotate_testfile.1') | 61 | status, output = self.target.run('find /var/log//logrotate_dir -type f | grep logrotate_testfile.1') |
62 | msg = ('A rotated log for logrotate_testfile is already present in logrotate_dir') | 62 | msg = ('A rotated log for logrotate_testfile is already present in logrotate_dir') |
63 | self.assertEqual(status, 1, msg = msg) | 63 | self.assertEqual(status, 1, msg = msg) |
64 | 64 | ||
65 | # If logrotate fails to rotate the log, view the verbose output of logrotate instead of just listing the files in olddir | 65 | # If logrotate fails to rotate the log, view the verbose output of logrotate instead of just listing the files in olddir |
66 | _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test2.conf') | 66 | _, logrotate_output = self.target.run('logrotate -vf /tmp/logrotate-test2.conf') |
67 | status, _ = self.target.run('find $HOME/logrotate_dir -type f | grep logrotate_testfile.1') | 67 | status, _ = self.target.run('find /var/log//logrotate_dir -type f | grep logrotate_testfile.1') |
68 | msg = ('logrotate did not successfully rotate the logrotate_test log. Output from logrotate -vf: \n%s' % (logrotate_output)) | 68 | msg = ('logrotate did not successfully rotate the logrotate_test log. Output from logrotate -vf: \n%s' % (logrotate_output)) |
69 | self.assertEqual(status, 0, msg = msg) | 69 | self.assertEqual(status, 0, msg = msg) |
70 | 70 | ||