$ sudo apt-get install smartmontools
#$ sudo smartctl -t short -d sat /dev/sda
$ sudo smartctl -t long -d sat /dev/sda -T permissive
then it will say
Testing has begun.
Please wait 100 minutes for test to complete.
Test will complete after Thu Oct 6 11:36:22 2016
After its completion,
$ sudo smartctl -l selftest -d sat /dev/sda -T permissive
to see the test result.
How do you use this on NVME drives?
"sudo smartctl -t long -d sat /dev/nvme0 -T permissive"
Is accepted as command however "Read Device Identity failed: Inappropriate ioctl for device"
error is shown