@@ -248,18 +248,18 @@ def _test_ext_get_info(self, mkfs_function, info_function):
248248 self .assertEqual (fi .label , "" )
249249 # should be an non-empty string
250250 self .assertTrue (fi .uuid )
251- self .assertTrue (fi .state , "clean" )
251+ self .assertTrue (fi .state )
252252
253253 with mounted (self .loop_devs [0 ], self .mount_dir ):
254- fi = BlockDev . fs_ext4_get_info (self .loop_devs [0 ])
254+ fi = info_function (self .loop_devs [0 ])
255255 self .assertEqual (fi .block_size , 1024 )
256256 self .assertEqual (fi .block_count , self .loop_size / 1024 )
257257 # at least 50 % should be available, so it should be reported
258258 self .assertGreater (fi .free_blocks , 0.50 * self .loop_size / 1024 )
259259 self .assertEqual (fi .label , "" )
260260 # should be an non-empty string
261261 self .assertTrue (fi .uuid )
262- self .assertTrue (fi .state , "clean" )
262+ self .assertTrue (fi .state )
263263
264264 @tag_test (TestTags .CORE )
265265 def test_ext2_get_info (self ):
@@ -409,33 +409,33 @@ class ExtSetUUID(ExtTestCase):
409409
410410 test_uuid = "4d7086c4-a4d3-432f-819e-73da03870df9"
411411
412- def _test_ext_set_uuid (self , mkfs_function , info_function , label_function , check_function ):
412+ def _test_ext_set_uuid (self , mkfs_function , info_function , uuid_function , check_function ):
413413 succ = mkfs_function (self .loop_devs [0 ], None )
414414 self .assertTrue (succ )
415415
416416 fi = info_function (self .loop_devs [0 ])
417417 self .assertTrue (fi )
418418
419- succ = label_function (self .loop_devs [0 ], self .test_uuid )
419+ succ = uuid_function (self .loop_devs [0 ], self .test_uuid )
420420 self .assertTrue (succ )
421421 fi = info_function (self .loop_devs [0 ])
422422 self .assertTrue (fi )
423423 self .assertEqual (fi .uuid , self .test_uuid )
424424
425- succ = label_function (self .loop_devs [0 ], "clear" )
425+ succ = uuid_function (self .loop_devs [0 ], "clear" )
426426 self .assertTrue (succ )
427427 fi = info_function (self .loop_devs [0 ])
428428 self .assertTrue (fi )
429429 self .assertEqual (fi .uuid , "" )
430430
431- succ = label_function (self .loop_devs [0 ], "random" )
431+ succ = uuid_function (self .loop_devs [0 ], "random" )
432432 self .assertTrue (succ )
433433 fi = info_function (self .loop_devs [0 ])
434434 self .assertTrue (fi )
435435 self .assertNotEqual (fi .uuid , "" )
436436 random_uuid = fi .uuid
437437
438- succ = label_function (self .loop_devs [0 ], "time" )
438+ succ = uuid_function (self .loop_devs [0 ], "time" )
439439 self .assertTrue (succ )
440440 fi = info_function (self .loop_devs [0 ])
441441 self .assertTrue (fi )
@@ -444,7 +444,7 @@ def _test_ext_set_uuid(self, mkfs_function, info_function, label_function, check
444444 time_uuid = fi .uuid
445445
446446 # no UUID -> random
447- succ = label_function (self .loop_devs [0 ], None )
447+ succ = uuid_function (self .loop_devs [0 ], None )
448448 self .assertTrue (succ )
449449 fi = info_function (self .loop_devs [0 ])
450450 self .assertTrue (fi )
@@ -461,19 +461,19 @@ def test_ext2_set_uuid(self):
461461 """Verify that it is possible to set UUID of an ext2 file system"""
462462 self ._test_ext_set_uuid (mkfs_function = BlockDev .fs_ext2_mkfs ,
463463 info_function = BlockDev .fs_ext2_get_info ,
464- label_function = BlockDev .fs_ext2_set_uuid ,
464+ uuid_function = BlockDev .fs_ext2_set_uuid ,
465465 check_function = BlockDev .fs_ext2_check_uuid )
466466
467467 def test_ext3_set_uuid (self ):
468468 """Verify that it is possible to set UUID of an ext3 file system"""
469469 self ._test_ext_set_uuid (mkfs_function = BlockDev .fs_ext3_mkfs ,
470470 info_function = BlockDev .fs_ext3_get_info ,
471- label_function = BlockDev .fs_ext3_set_uuid ,
471+ uuid_function = BlockDev .fs_ext3_set_uuid ,
472472 check_function = BlockDev .fs_ext3_check_uuid )
473473
474474 def test_ext4_set_uuid (self ):
475475 """Verify that it is possible to set UUID of an ext4 file system"""
476476 self ._test_ext_set_uuid (mkfs_function = BlockDev .fs_ext4_mkfs ,
477477 info_function = BlockDev .fs_ext4_get_info ,
478- label_function = BlockDev .fs_ext4_set_uuid ,
478+ uuid_function = BlockDev .fs_ext4_set_uuid ,
479479 check_function = BlockDev .fs_ext4_check_uuid )
0 commit comments