[L] Change in ...nfs-ganesha[next]: GTest: initialize FSAL I/O arguments in latency tests
learn.rahul.rai@gmail.com has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1255847?usp=email ) Change subject: GTest: initialize FSAL I/O arguments in latency tests ...................................................................... GTest: initialize FSAL I/O arguments in latency tests In test_read2_latency.cc and test_write2_latency.cc, struct fsal_io_arg defines iov as a pointer (struct iovec *iov). The tests attempted flexible-array allocation via alloca() without assigning arg.iov to valid memory, causing a segmentation fault when accessing iov[0]. Additionally, fsal_resume contained uninitialized stack memory. Fix this by zero-initializing fsal_io_arg with memset, assigning arg.iov to a local struct iovec, setting iov_count to 1 and io_request to the requested length, and ensuring fsal_resume starts at FSAL_NORESUME (0). Change-Id: I002ec458ecee9c84bea25267ff044f64fd8259f4 Signed-off-by: Rahul Rai <learn.rahul.rai@gmail.com> --- M src/gtest/fsal_api/test_read2_latency.cc M src/gtest/fsal_api/test_write2_latency.cc 2 files changed, 228 insertions(+), 215 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/47/1255847/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1255847?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: I002ec458ecee9c84bea25267ff044f64fd8259f4 Gerrit-Change-Number: 1255847 Gerrit-PatchSet: 1 Gerrit-Owner: learn.rahul.rai@gmail.com
participants (1)
-
Name of user not set (GerritHub)