Some recommendations to check a used laptop, before buying it:
AFAIK there is no Linux tool like the DOS tools CHECK-IT, DR. HARD, SYSDIAG and others. These tools include many of the tests in one integrated suite. One of the best in my humble opinion is the tool PC Diagnostics 95 made by Craig Hart. Despite the 95 in its name it's plain DOS, tiny ( 76KB program and 199KB data) reliable and free. Unfortunately it contains no check for the IrDA® port.
Please note this quotation from the disclaimer: "This program is written with the target audience being a trained, experienced technician. It is NOT designed to be used by those ignorant of computer servicing. Displays are not pretty but functional. Information is not explained since we are not trying to educate. This software should be considered to be just like any other tool in a tech's toolbox. It is to be applied with care, in the right situation, in order to find answers to specific problems. If you are an end user who is less than confident of dealing with computer hardware, this is probably not a program for you."
Laptop computers, unlike desktop machines, really do get used up. Lithium batteries are good for no more than 400 recharge cycles, sometimes much fewer. Keyboards wear out. LCD screen backlighting grows dim. Mouse buttons fail. Worst of all, connectors get loose as a result of vibration, causing intermittent failures (e.g. only when you hit the <Enter> key). We have heard of a machine used on the table in a train being shaken to unusability in one trip.