Heb 12:5-11 And you have forgotten that word of encouragement that addresses you as sons: "My son, do not make light of the Lord's discipline, and do not lose heart when he rebukes you, {6} because the Lord disciplines those he loves, and he punishes everyone he accepts as a son." {7} Endure hardship as discipline; God is treating you as sons. For what son is not disciplined by his father? {8} If you are not disciplined (and everyone undergoes discipline), then you are illegitimate children and not true sons. {9} Moreover, we have all had human fathers who disciplined us and we respected them for it. How much more should we submit to the Father of our spirits and live! {10} Our fathers disciplined us for a little while as they thought best; but God disciplines us for our good, that we may share in his holiness. {11} No discipline seems pleasant at the time, but painful. Later on, however, it produces a harvest of righteousness and peace for those who have been trained by it.
Rom 5:3-5 Not only so, but we also rejoice in our sufferings, because we know that suffering produces perseverance; {4} perseverance, character; and character, hope. {5} And hope does not disappoint us, because God has poured out his love into our hearts by the Holy Spirit, whom he has given us.