@@ -302,8 +302,8 @@ func TestCLeanUpQgroupsCI(t *testing.T) {
302302
303303 devices , err := SetupDevices (1 )
304304 require .NoError (t , err , "failed to initialize devices" )
305-
306305 defer devices .Destroy ()
306+
307307 loops := devices .Loops ()
308308 fs := NewBtrfs (& TestDeviceManager {loops })
309309
@@ -326,6 +326,7 @@ func TestCLeanUpQgroupsCI(t *testing.T) {
326326
327327 volume , err := pool .AddVolume ("vol1" )
328328 require .NoError (t , err )
329+ t .Logf ("volume ID: %v\n " , volume .ID ())
329330
330331 err = volume .Limit (256 * 1024 * 1024 )
331332 require .NoError (t , err )
@@ -336,6 +337,7 @@ func TestCLeanUpQgroupsCI(t *testing.T) {
336337 qgroups , err := btrfsVol .utils .QGroupList (context .TODO (), pool .Path ())
337338 require .NoError (t , err )
338339 assert .Equal (t , 2 , len (qgroups ))
340+ t .Logf ("qgroups before delete: %v" , qgroups )
339341
340342 _ , ok = qgroups [fmt .Sprintf ("0/%d" , btrfsVol .id )]
341343 assert .True (t , ok , "qgroups should contains a qgroup linked to the subvolume" )
@@ -345,5 +347,7 @@ func TestCLeanUpQgroupsCI(t *testing.T) {
345347
346348 qgroups , err = btrfsVol .utils .QGroupList (context .TODO (), pool .Path ())
347349 require .NoError (t , err )
348- assert .Equal (t , 0 , len (qgroups ), "qgroups should have been deleted with the subvolume" )
350+
351+ t .Logf ("remaining qgroups: %+v" , qgroups )
352+ assert .Equal (t , 1 , len (qgroups ), "qgroups should have been deleted with the subvolume" )
349353}
0 commit comments