You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "ho-229 (via GitHub)" <gi...@apache.org> on 2024/03/15 12:42:32 UTC

[PR] test: ofs [opendal]

ho-229 opened a new pull request, #4373:
URL: https://github.com/apache/opendal/pull/4373

   #4372 


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on PR #4373:
URL: https://github.com/apache/opendal/pull/4373#issuecomment-2001901480

   cc @Xuanwo , can you rerun the workflows?


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537386115


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   > Honestly I don't assume that user uses posix CLI tools to interact with `ofs`
   
   Can you explain a bit? AFAIK, Users can't interact with `ofs` directly. They must mount `ofs` locally and use tools to interact the fs like `ls`, `cat`.



-- 
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


Re: [PR] feat(bin/ofs): Add behavior test for ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #4373:
URL: https://github.com/apache/opendal/pull/4373


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537434379


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   User can use tools such as `ls` and `cat`, but also can use some GUI file manager like `dolphin`.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1538959837


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   You are right. [mountpoint-s3](https://github.com/awslabs/mountpoint-s3/blob/main/mountpoint-s3/tests/fuse_tests/write_test.rs) also writes their own test suites.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1527426315


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   Maintaining those test cases seems neither easy nor realistic. How about just mount ofs in workflow and calling `ls`, `touch`, `cat`? Or even `fio`? I believe this is the way how users uses `ofs`.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537636613


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   > I think POSIX compatibility is our `ofs` goal, we need to `pjdfstest` tool help us to verify all of this.
   
   `POSIX compatibility` is not our goal. We just use pjdfstest for testing.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 closed pull request #4373: test: ofs
URL: https://github.com/apache/opendal/pull/4373


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on PR #4373:
URL: https://github.com/apache/opendal/pull/4373#issuecomment-2029597752

   Sure, thank you for your contributions to open source 


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1538938621


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   I tried migrating Rust test cases to `pjdfstest`, but `pjdfstest` is too strict that `ofs` and `OpenDAL` lack much ability to pass the test.
   



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1527747698


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   Honestly I don't assume that user uses posix CLI tools to interact with `ofs`, and there may be some cases that aren't covered using these CLI tools to test



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537452047


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   I think we can use `pjdfstest` or `LTP` for tests (by ignoring not supported tests) instead of implement tests cases by hand.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "oowl (via GitHub)" <gi...@apache.org>.
oowl commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537628210


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   > I think we can use `pjdfstest` or `LTP` for tests (by ignoring not supported tests) instead of implement tests cases by hand.
   
   Yeah, I think  POSIX compatibility is our `ofs` goal, we need to `pjdfstest` tool help us to verify all of this.
   
   >  User can use tools such as ls and cat, but also can use some GUI file manager like dolphin.
   
   For the `ofs` tools, `fusemount3` and mount DIR are input interfaces, So I think our test needs to cover all of these interfaces.
   



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #4373:
URL: https://github.com/apache/opendal/pull/4373#discussion_r1537450048


##########
bin/ofs/tests/common/mod.rs:
##########
@@ -0,0 +1,90 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use std::{
+    collections::HashMap,
+    env,
+    process::{Child, Command},
+};
+
+use assert_cmd::cargo::CommandCargoExt;
+use tempfile::TempDir;
+use test_context::AsyncTestContext;
+
+pub(crate) struct OfsTestContext {

Review Comment:
   > User can use tools such as `ls` and `cat`, but also can use some GUI file manager like `dolphin`.
   
   You're correct. But if an fs works correctly on `ls`, `cat` or `pjdfstest`, all GUI file manager should work too.
   
   However, it's unlikely that users will use `ofs` by writing Rust code (as we do in the tests). I'm not in favor of writing ofs tests in Rust; they're difficult to maintain and don't accurately reflect real-world use cases.



-- 
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


Re: [PR] test: ofs [opendal]

Posted by "ho-229 (via GitHub)" <gi...@apache.org>.
ho-229 commented on PR #4373:
URL: https://github.com/apache/opendal/pull/4373#issuecomment-2029597057

   Sure, thank you for your 


-- 
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


Re: [PR] test: ofs [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4373:
URL: https://github.com/apache/opendal/pull/4373#issuecomment-2029534882

   Hi, I'm currently working on a significant refactor that I expect to complete this week. Would you like to wait the review until then? Thank you.


-- 
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