Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.52.0 + Python 3.12: discard/test-discard.pl fails #140

Open
dvzrv opened this issue Apr 15, 2024 · 2 comments
Open

1.52.0 + Python 3.12: discard/test-discard.pl fails #140

dvzrv opened this issue Apr 15, 2024 · 2 comments

Comments

@dvzrv
Copy link

dvzrv commented Apr 15, 2024

Hi! 馃憢

When rebuilding 1.52.0 against Python 3.12 with fixes applied as described in #139, I observed discard/test-discard.pl failing (works with Python 3.11):

./discard/test-discard.pl: looks like the -o discard mount option did not work
FAIL discard/test-discard.pl (exit status: 2)

It's unclear to me what the perl script has to do with our Python rebuild (nearly everything is rebuilt against Python 3.12 in that build environment), or whether this is just a flaky test, so I am going to disable it for now.

test-suite.log
test-discard.pl.log

@rwmjones
Copy link
Member

rwmjones commented Apr 15, 2024

https://github.com/libguestfs/libguestfs/blob/master/tests/discard/test-discard.pl

It sort of seems unlikely this would be caused by changing the Python version.

What the test is doing is creating a filesystem with the -o discard mount option, creating a large file, then deleting the large file, and checking that trims made it all the way through to the host backing file.

You can see that pretty clearly in the log. The final (trimmed) size should be much smaller if trimming is happening properly:

$ grep blocks test-discard.pl.log 
original size:	0 (blocks)
full size:	28544 (blocks)
trimmed size:	28544 (blocks)

Possible reasons:

  • It's a random failure, and happened coincidentally with you updating Python.
  • It's a bug in the host kernel or qemu which also changed at the same time you updated Python.
  • The backing filesystem (where you are running the libguestfs tests) doesn't support trims, eg it's not something "ordinary" like ext4 or xfs, but is something weird like fat or ext2.

@rwmjones
Copy link
Member

BTW you might want to skip tests that are unreliable (although this is not one that I have had to skip). You can do this by setting the appropriate environment variable, eg:

export SKIP_TEST_DISCARD_PL=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants