tests: Test shadow promotion during metadata dump

Change-Id: I65ddcb0b59114cf6ac57a32e201255d7c9eadfa7
master, metalogger: Fix memory leak found by valgrind

cfg_getstr returns strduped string and assigning it to a std::string
causes a memory leak. cfg_getstring should be used instead.

Change-Id: I59b12de0aa454ece7b9ebe02ba34ddbc4adfa15b