Skip to content

tests/features/mandatory-lock-forced.t failures #4531

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pranithk opened this issue Apr 24, 2025 · 1 comment
Open

tests/features/mandatory-lock-forced.t failures #4531

pranithk opened this issue Apr 24, 2025 · 1 comment

Comments

@pranithk
Copy link
Member

root@glusterfs-fedora-41:/home/pk/glusterfs# prove -rfv tests/features/mandatory-lock-forced.t
tests/features/mandatory-lock-forced.t .. egrep: warning: egrep is obsolescent; using grep -E
egrep: warning: egrep is obsolescent; using grep -E

1..30
ok   1 [    128/   1017] <   8> 'glusterd'
ok   2 [     24/     94] <  11> 'gluster --mode=script --wignore volume create patchy glusterfs-fedora-41:/d/backends/patchy1 glusterfs-fedora-41:/d/backends/patchy2'
ok   3 [     28/     48] <  12> 'patchy volinfo_field patchy Volume Name'
ok   4 [     17/     46] <  13> 'Created volinfo_field patchy Status'
ok   5 [     18/    125] <  16> 'gluster --mode=script --wignore volume set patchy performance.open-behind off'
ok   6 [     35/    145] <  17> 'gluster --mode=script --wignore volume set patchy performance.write-behind off'
ok   7 [     20/     80] <  18> 'gluster --mode=script --wignore volume set patchy performance.quick-read off'
ok   8 [     19/     97] <  19> 'gluster --mode=script --wignore volume set patchy performance.io-cache off'
ok   9 [     53/     86] <  20> 'gluster --mode=script --wignore volume set patchy performance.read-ahead off'
ok  10 [     23/    202] <  23> 'gluster --mode=script --wignore volume start patchy'
ok  11 [     48/     46] <  24> '_GFS --attribute-timeout=0 --entry-timeout=0 --volfile-id=/patchy --volfile-server=glusterfs-fedora-41 /mnt/glusterfs/0'
ok  12 [     68/      1] <  30> '[ 0 -eq 0 ]'
ok  13 [     27/      0] <  33> '[ 0 -eq 0 ]'
ok  14 [     29/      2] <  36> '[ 0 -eq 0 ]'
ok  15 [     33/      3] <  39> '[ 0 -eq 0 ]'
ok  16 [   2042/      2] <  43> '[ 0 -eq 0 ]'
ok  17 [     33/      0] <  46> '[ 0 -eq 0 ]'
ok  18 [   2038/      1] <  49> '[ 0 -eq 0 ]'
ok  19 [     33/    113] <  52> 'gluster --mode=script --wignore volume set patchy mandatory-locking forced'
ok  20 [     20/      5] <  55> 'umount /mnt/glusterfs/0'
ok  21 [     39/   2091] <  56> 'gluster --mode=script --wignore volume stop patchy'
ok  22 [     21/    147] <  57> 'gluster --mode=script --wignore volume start patchy'
ok  23 [     29/     19] <  58> '_GFS --attribute-timeout=0 --entry-timeout=0 --volfile-id=/patchy --volfile-server=glusterfs-fedora-41 /mnt/glusterfs/0'
ok  24 [     24/      1] <  62> '[ 0 -eq 0 ]'
Child write : returned error (Resource temporarily unavailable)
ok  25 [     18/     20] <  64> 'Resource temporarily unavailable tests/features/mandatory-lock RD_LCK NONE WRITE'
not ok  26 [     23/     14] <  66> 'Resource temporarily unavailable tests/features/mandatory-lock WR_LCK NONE READ' -> 'Got "" instead of "Resource temporarily unavailable"'
Child write : returned error (Resource temporarily unavailable)
ok  27 [     22/     11] <  68> 'Resource temporarily unavailable tests/features/mandatory-lock WR_LCK NONE WRITE'
Child open : returned error (Resource temporarily unavailable)
ok  28 [     21/   2010] <  70> 'Resource temporarily unavailable tests/features/mandatory-lock RD_LCK TRUNC READ'
Child ftruncate : returned error (Resource temporarily unavailable)
ok  29 [     33/     18] <  72> 'Resource temporarily unavailable tests/features/mandatory-lock RD_LCK NONE FTRUNCATE'
ok  30 [     32/   2014] <  74> 'Resource temporarily unavailable tests/features/mandatory-lock RD_LCK BLOCK WRITE'
Failed 1/30 subtests

Test Summary Report
-------------------
tests/features/mandatory-lock-forced.t (Wstat: 0 Tests: 30 Failed: 1)
  Failed test:  26
Files=1, Tests=30, 14 wallclock secs ( 0.02 usr  0.00 sys +  0.81 cusr  0.72 csys =  1.55 CPU)
Result: FAIL
@pranithk
Copy link
Member Author

pranithk commented Apr 24, 2025

On debugging, I am seeing that the read-call issued by the program is not coming to the mount at all. Even if I disable md-cache it doesn't happen.
If I make the following change, the test passes(File size tests, fail though), but I am not sure why fuse is not sending reads for files with 0 size, maybe some kind of optimisation.

pk@glusterfs-fedora-41:~/glusterfs$ git diff
diff --git a/tests/features/mandatory-lock-forced.c b/tests/features/mandatory-lock-forced.c
index 4028d6c6ea..60bd8ba2bc 100644
--- a/tests/features/mandatory-lock-forced.c
+++ b/tests/features/mandatory-lock-forced.c
@@ -76,6 +76,7 @@ main(int argc, char *argv[])
     fd = open(fname, O_CREAT | O_RDWR, 0755);
     if (fd == -1)
         LOG_ERR("Parent create", errno);
+    err = write(fd, buf, 10);

     /* Determine the type of lock */
     if (strcmp(argv[1], "RD_LCK") == 0)

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

1 participant