Diagnostic loopbacks are designed to allow a test program to send a signal on one pin and read its presence on another pin. Well, most loopbacks will take one signal and will return it on one or more other pins, perhaps two or three returns which the test program can distinguish. For serial and parallel ports, no additional electronics are necessary.
It seems that most diagnostc software publishers now insist on using unique loopback configurations, probably so they can sell users another product. Most commercial loopback plugs are enclosed in a block of molded rubber, but it is easy to use a volt meter to test for continuity between pins.
I also use loopbacks to test cables. For serial cables, I use a standard commercial "Gender Changer" to connect the plug to one end of the cable while the other end is connected to the port. For a parallel printer cable, I was able to buy an adapter from a D-25-M to a printer socket; you could pull the socket from a discarded printer and wire it into the appropriate loopback if you can't buy an adapter.
It's been suggested that IBM's wrap plugs come as close to a standard as anyone's.
Their web site refers to these as a "standard loopback plug" kit.