Test/Verify Log-Shipping Backup
After bringing the slave database cluster into standalone read-write mode (either by internal logic inside recovery_command or by restarting it without recovery.conf) it cannot be easily reverted to be a slave. 

If you can, use file system level snapshots. This would be the easiest approach as you can revert the cluster to a known state without copying whole data directory.

More or less that would be the logic for testing slave:

stop_postgres()
make_pgdata_filesystem_snapshot()
remove_recovery_conf()
start_postgres()
run_testing()
stop_postgres()
revert_pgdata_fs_snapshot()
start_postgres()


If you don't have filesystem snapshots you will need a local copy of the whole cluster (rsync will be good to maintain this). Only disadvantage is disk space used, and more time needed.

rsync_pgdata_to_local_copy()
stop_postgres()
rsync_pgdata_to_local_copy()
remove_recovery_conf()
start_postgres()
run_testing()
stop_postgres()
rsync_pgdata_from_local_copy()
start_postgres()