You can replace
smartctl -t long selftests with
badblocks (no parameters). It performs a simple read-only test. You can run it while filesystems are mounted. (Do NOT use the so-called non-destructive write test).
# badblocks -v /dev/loop0
Checking blocks 0 to 1048575
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found. (0/0/0 errors)
Note you should only use this if you don't already suspect there are bad sectors; if you already know it's going bad, use
ddrescue instead. (
badblocks throws away all data it reads,
ddrescue makes a copy that may come in useful later).
Other than that, you can do things that SMART doesn't do: use a checksumming filesystem, or dm-integrity layer, or backups & compare, to actually verify contents. Lacking those, just run regular filesystem checks.
MicroSD cards also have failure modes that are hard to detect. Some cards may eventually discard writes and keep returning old data on reads. Even simple checksums might not be enough here - if the card happens to return both older data and older checksums, it might still match even if it's the wrong data...
Then there are fake capacity cards that just lose data once you've written too much. Neither return any read or write errors, and it can't be detected with
badblocks, not even in its destructive write mode (since the pattern it writes are repetitive).
For this you need a test that uses non-repetitive patterns, e.g. by putting an encryption layer on it (badblocks write on LUKS detects fake capacity cards when badblocks write on raw device does not).