“Wow, I just barely passed the test. Next time I will study harder!”

“Barely” means “almost not”. I passed the test, but if I had missed one more question I would have failed. “He survived, but when they found him he was barely alive.” “I barely ate anything at breakfast, so I’m really hungry for lunch.”