Step to reproduce error: 1) Boot up MinnowMax with core-image-lsb-sdk-genericx86-64 image 2) Configure local.conf following steps in BSP Test Plan https://wiki.yoctoproject.org/wiki/BSP_Test_Plan 3) Run bitbake core-image-lsb-sdk -c testimage RESULTS - logrotate.LogrotateTest.test_1_logrotate_setup - Testcase 1544: PASSED RESULTS - logrotate.LogrotateTest.test_2_logrotate - Testcase 1542: FAILED NOTE: test_1_logrotate_setup (logrotate.LogrotateTest) DEBUG: Checking if at least one of logrotate is installed DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; mkdir $HOME/logrotate_dir DEBUG: time: 1513754065.3160224, endtime: 1513754365.3126523 DEBUG: [Command returned '0' after 0.18 seconds] DEBUG: Command: mkdir $HOME/logrotate_dir Output: DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; sed -i "s#wtmp {#wtmp {\n olddir $HOME/logrotate_dir#" /etc/logrotate.conf DEBUG: time: 1513754065.5603456, endtime: 1513754365.5569317 DEBUG: [Command returned '0' after 0.18 seconds] DEBUG: Command: sed -i "s#wtmp {#wtmp {\n olddir $HOME/logrotate_dir#" /etc/logrotate.conf Output: NOTE: ... OK (0.426s) NOTE: test_2_logrotate (logrotate.LogrotateTest) DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; logrotate -f /etc/logrotate.conf DEBUG: time: 1513754065.7415323, endtime: 1513754365.7380984 DEBUG: Partial data from SSH call: error: destination /var/log/dnf.log-20171220 already exists, skipping rotation error: destination /var/log/dnf.librepo.log-20171220 already exists, skipping rotation error: destination /var/log/dnf.rpm.log-20171220 already exists, skipping rotation error: destination /var/log/hawkey.log-20171220 already exists, skipping rotation DEBUG: time: 1513754065.9317398, endtime: 1513754365.931738 DEBUG: [Command returned '1' after 0.19 seconds] DEBUG: Command: logrotate -f /etc/logrotate.conf Output: error: destination /var/log/dnf.log-20171220 already exists, skipping rotation error: destination /var/log/dnf.librepo.log-20171220 already exists, skipping rotation error: destination /var/log/dnf.rpm.log-20171220 already exists, skipping rotation error: destination /var/log/hawkey.log-20171220 already exists, skipping rotation NOTE: ... FAIL (0.197s) DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 172.30.199.124 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; rm -rf $HOME/logrotate_dir DEBUG: time: 1513754065.9389927, endtime: 1513754365.9349895 DEBUG: [Command returned '0' after 0.18 seconds] DEBUG: Command: rm -rf $HOME/logrotate_dir Output:
It looks like the sed command failed/is incorrectly formatted as the errors indicate logrotate is trying to rotate logs in /var/log/ but the sed command should have set the log directory to $HOME/logrotate_dir Could you attach a copy of the /etc/logrotate.conf from the DUT?
Created attachment 4183 [details] /etc/logrotate.conf from device
Hi Joshua, While I tried to retrieve the /etc/logrotate.conf from device. I rerun the testimage again but it was passing this time, let me close this ticket for now while I will try if I can reproduce this issue.