I want to start automatic short self-tests every week, and launch a warning message with && or || if there are errors. At first, I was looking at smartctl, but that always returns an exit code of 0 as soon as the test begins, even if it completes with errors. It appeared openSeaChest provided this functionality, as there is a long list of exit codes including 3 for Operation Failure, but only --shortGeneric waits to send an exit code until finished, while --shortDST always activates && after starting. There should be a --shortDST option that waits to send an exit code until completion.
Both --shortDST and --shortGeneric activate || if a disk with the specified number is not connected. It's not practical to have failure warnings appear when a disk doesn't happen to be available at a specified number (such as PD4, which may be empty most of the time). I understand || is activated by anything above 0, so it will be activated even if the Error Code for failing and unavailable disks is different, but echo %ErrorLevel% shows that 3 is the Error Code for an empty slot, so it is the same Error Code as when disks fail with errors, assuming Error Code 3 is even used for failed tests.