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

Already on GitHub? Sign in to your account

[CSI unit tests] TestGetVolumeStatCapabilitiesWithoutVmMode is broken #2120

Open
aikuchin opened this issue Sep 24, 2024 · 0 comments
Open

Comments

@aikuchin
Copy link

When it runs separately from other tests in the suite it fails:

./ya test -tt -r ./cloud/blockstore/tools/csi_driver/internal/driver/node.go --add-protobuf-result -P --test-filter='tests::TestGetVolumeStatCapabilitiesWithoutVmMode'
Warn: cloud/blockstore/tools/csi_driver/internal/driver/node.go is not a buildable target. Skip it.
------- [TS] {default-linux-x86_64, release} cloud/blockstore/tools/csi_driver/internal/driver/tests/tests >> tests::TestGetVolumeStatCapabilitiesWithoutVmMode
Test command err:
2024/09/23 06:07:06 csi.NodeGetVolumeStats: volume_id:"test-disk-id-42" volume_path:"/home/antonkuchin/.ya/build/build_root/6ro4/000193/r3tmp/pods/test-pod-id-13/volumes/test-disk-id-42/mount"
Number of suites skipped by name: 2, by filter tests::TestGetVolumeStatCapabilitiesWithoutVmMode

cloud/blockstore/tools/csi_driver/internal/driver/tests <go_test>
------ sole chunk ran 1 test (total:2.01s - setup:0.01s test:1.94s)
[fail] tests::TestGetVolumeStatCapabilitiesWithoutVmMode [default-linux-x86_64-release] (0.00s)
node_test.go:686: 
          Error Trace:  /-S/cloud/blockstore/tools/csi_driver/internal/driver/node_test.go:686
          Error:        Received unexpected error:
                        no such file or directory
          Test:         TestGetVolumeStatCapabilitiesWithoutVmMode
Log: /home/antonkuchin/src/nbs/cloud/blockstore/tools/csi_driver/internal/driver/tests/test-results/tests/testing_out_stuff/tests.TestGetVolumeStatCapabilitiesWithoutVmMode.log
Logsdir: /home/antonkuchin/src/nbs/cloud/blockstore/tools/csi_driver/internal/driver/tests/test-results/tests/testing_out_stuff
------ FAIL: 1 - FAIL cloud/blockstore/tools/csi_driver/internal/driver/tests

Total 1 suite:
  1 - FAIL
Total 1 test:
  1 - FAIL
Failed

It fails because volume is neither staged nor published in this test, so unix.Statfs(req.VolumePath, &stat) return an error. I think we have to publish volume first because spec for NodeGetVolumeStats reqires

// It can be any valid path where volume was previously
// staged or published.
...
string volume_path = 2;

In suite it passes because previous tests create and don't cleanup pod mount directory .../r3tmp/pods/test-pod-id-13/volumes/test-disk-id-42/mount.

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