smartctl

smartctl -x /dev/sda
smartctl -l selftest /dev/sda

smartctl -t short /dev/sda
smartctl -t long /dev/sda

nvme

nvme device-self-test /dev/nvme0 -s 1h
nvme device-self-test /dev/nvme0 -s 2h

nvme device-self-test /dev/nvme0 -s 0h
nvme self-test-log /dev/nvme0 -o "json"