From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.8.1.12) Gecko/20080208 Fedora/2.0.0.12-1.fc8 Firefox/2.0.0.12 Description of problem: When sg_turs is executed with parameters "--progress" and "--number", it always reports "Completed 1 Test Unit Ready commands". It does not matter how big positive number is given to --number, it always reports the same message. According to man page the utility should wait 30 seconds before subsequent checks when parameters "--number" > 1 and "--progress" are given, but the utility exits immediately. When the parameter "--progress" is omitted, the reported number of completed TEST UNIT READY commands is correct. Version-Release number of selected component (if applicable): sg3_utils-1.25-1 How reproducible: Always Steps to Reproduce: 1. sg_turs --number=1024 --progress /dev/sda 2. look at its output Actual Results: Its output is following: Completed 1 Test Unit Ready commands Expected Results: Its output is following: Completed 1024 Test Unit Ready commands Additional info:
There is misunderstanding of the --progress option. It shows a progress of a SCSI command for a busy device, not a progress of the whole test. See the full explanation of the --progress option in the man page, especially the "exits when" part: "show progress indication (a percentage) if available. If --number=NUM is given and NUM is greater than 1 then waits 30 seconds before subsequent checks. Exits when NUM is reached or there is no more progress indication. Ignores --time option." Becuase in your test case the device is not busy with any operation, then there can be no progress to show, so it exits immediately. You should see a "progress" when trying the following commands: sg_format --format /dev/foo ; sg_turs --progress --num=100 /dev/foo the formatting makes the device busy and that's why it cannot respond as "ready" This conclusion is a result of studying the source code and a consultation with the upstream author.