good luck means "hao yun qi"好运气
but we don't use "hao yun qi"好运气 whe we say something before a friend go have a exam.We usually say "祝你考试取得好成绩!"means wish him get a good grades
I think it's the same,because the good grades are the result of the good luck!
I think even we say in different way but mean same thing.