Lesson 2: ImageClassifier parameters question

I have difficulties understanding some parameters to ImageClassifierData.from_csv,
In lesson2-image_models.ipynb:

label_csv = f'{PATH}train_v2.csv'
n = len(list(open(label_csv)))-1
val_idxs = get_cv_idxs(n)
data = ImageClassifierData.from_csv(PATH, 'train-jpg', label_csv, tfms=tfms, suffix='.jpg', val_idxs=val_idxs, test_name='test-jpg')

val_idxs has indexes to the validation data. Does that data come from the ‘train-jpg’ directory? If that is the case, then what is the purpose of the test_name parameter? If that is not the case, then the validation data must come from the test-jpg directory. However the images in that directory are not listed in the label_csv file, therefore their labels are unknown, and they are useless as validation data.
Please clarify.