It wouldn't ensure 6 perfect IVs, it ensures 5 perfect IVs and the last one is down to luck, pretty much.
If all IVs other than attack are passed down by Destiny knot then it would be a perfect IV Pokemon. But most of the time you don't even need all 6 perfect IVs since you don't really need all the stats on a certain Pokemon.