<div dir="ltr"><div>I'm very used to seeing an Estimated time required to complete a test when I start a test.</div><div><br></div><div>I'm trying to automate hdd testing with a script that uses smartctl, and I would like it to wait until testing is done before starting the next test.</div><div>What's the best way to do that?</div><div><br></div><div>I've been screen scraping the output for a number of minutes or seconds that the test will take.  But this drive (The first SAS one in a while, as normally im validating SATA drives) does't give a time.</div><div><br></div><div>sdl and sdn are normal.  sdm is the oddball below<br></div><div><br></div><div># cat  /tmp/sdl.smart.tshort.out <br>smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.el8.x86_64] (local build)<br>Copyright (C) 2002-17, Bruce Allen, Christian Franke, <a href="http://www.smartmontools.org">www.smartmontools.org</a><br><br>=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===<br>Sending command: "Execute SMART Short self-test routine immediately in off-line mode".<br>Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.<br>Testing has begun.<br>Please wait 1 minutes for test to complete.<br>Test will complete after Sun Nov 24 22:24:59 2019<br><br>Use smartctl -X to abort test.<br>[root@UR ~]# cat  /tmp/sdn.smart.tshort.out <br>smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.el8.x86_64] (local build)<br>Copyright (C) 2002-17, Bruce Allen, Christian Franke, <a href="http://www.smartmontools.org">www.smartmontools.org</a><br><br>=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===<br>Sending command: "Execute SMART Short self-test routine immediately in off-line mode".<br>Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.<br>Testing has begun.<br>Please wait 1 minutes for test to complete.<br>Test will complete after Tue Nov 26 02:29:30 2019<br><br>Use smartctl -X to abort test.</div><div><br></div><div>But I just found a drive that doesn't show me any time eta when I start a short test.<br></div><div><br></div><div>[root@UR ~]# smartctl -t short /dev/sdm<br>smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.el8.x86_64] (local build)<br>Copyright (C) 2002-17, Bruce Allen, Christian Franke, <a href="http://www.smartmontools.org">www.smartmontools.org</a><br><br>Short Background Self Test has begun<br>Use smartctl -X to abort test<br></div></div>