You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/07/24 10:07:36 UTC
[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #2706: feat(test): add fuzz target for writer
Xuanwo commented on code in PR #2706:
URL: https://github.com/apache/incubator-opendal/pull/2706#discussion_r1272029396
##########
core/fuzz/fuzz_reader.rs:
##########
@@ -172,10 +178,15 @@ async fn fuzz_reader_process(input: FuzzInput, op: &Operator, name: &str) -> Res
.await
.unwrap_or_else(|_| panic!("{} write must succeed", name));
- let mut o = op
- .range_reader(&path, 0..len as u64)
- .await
- .unwrap_or_else(|_| panic!("{} init range_reader must succeed", name));
+ let mut o = if is_range {
+ op.range_reader(&path, 0..len as u64)
Review Comment:
`op.range_reader(&path, 0..len as u64)` is exactly the same with `op.reader(&path)`. We don't need to test in this way. Instead, we should generate a random range for `range_reader` to test.
`fuzz_range_reader` should be a new fuzz apart from `fuzz_reader`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org