TEST command don't work with "--version"

Welcome to the forum @datahunter

Backup Test block selection logic covers a few things, but unfortunately doesn’t get into version option.
I suspect there’s an actual bug here that nobody had noticed. If I use sample count of all, 1 or default:

Starting - ExecuteReader: SELECT “A”.“VolumeID”, “A”.“Name”, “A”.“Size”, “A”.“Hash”, “A”.“VerificationCount” FROM (SELECT “ID” AS “VolumeID”, “Name”, “Size”, “Hash”, “VerificationCount” FROM “Remotevolume” WHERE “State” IN (“Uploaded”, “Verified”)) A, “Fileset” WHERE “ID” IN (System.Object) AND “A”.“VolumeID” = “Fileset”.“VolumeID” ORDER BY “Fileset”.“Timestamp”

is what a profiling log shows, and the IN (System.Object[]) seems unlikely to be the correct query.
As a guess, it was probably trying to generate a comma-separated list of numbers, but didn’t manage.

might be where the seemingly bad SQL chunk is coming from, but I need a C# developer to explain why.
Replace string concatenation with StringBuilder. was a 2.0.3.7 change, but 2.0.3.6 doesn’t work either…

EDIT:

2.0.3.6 says (longer version here):

Starting - ExecuteReader: SELECT “A”.“VolumeID”, “A”.“Name”, “A”.“Size”, “A”.“Hash”, “A”.“VerificationCount” FROM (SELECT “ID” AS “VolumeID”, “Name”, “Size”, “Hash”, “VerificationCount” FROM “Remotevolume” WHERE “State” IN (?, ?)) A, “Fileset” WHERE “ID” IN (?) AND “A”.“VolumeID” = “Fileset”.“VolumeID” ORDER BY “Fileset”.“Timestamp”
ExecuteReader: SELECT “A”.“VolumeID”, “A”.“Name”, “A”.“Size”, “A”.“Hash”, “A”.“VerificationCount” FROM (SELECT “ID” AS “VolumeID”, “Name”, “Size”, “Hash”, “VerificationCount” FROM “Remotevolume” WHERE “State” IN (?, ?)) A, “Fileset” WHERE “ID” IN (?) AND “A”.“VolumeID” = “Fileset”.“VolumeID” ORDER BY “Fileset”.“Timestamp” took 0:00:00:00.000
Running Test took 0:00:00:00.611
No files examined, is the remote destination is empty?

2.0.3.6 was a few months in 2018 ahead of Log sql variables #3314 unfortunately, so SQL view is worse.