Fix compile warnings for tests/artifact/randname.