You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@graphar.apache.org by "Sober7135 (via GitHub)" <gi...@apache.org> on 2025/10/13 10:56:13 UTC
[I] Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Sober7135 opened a new issue, #789:
URL: https://github.com/apache/incubator-graphar/issues/789
### Describe the enhancement requested
The test is "read multi-properties from csv file".
# Cause
The failure is caused by side effect inside `assert` statement. In Release/RelWithDebInfo builds, the code inside it is not executed.
https://github.com/apache/incubator-graphar/blob/a88cd01f610d534a42418bf25931f9bda3d9391c/cpp/test/test_multi_property.cc#L145
I think we should avoid placing state-changing logic inside `assert`. Maybe we should use `ASSERT`/`REQUIRE` instead of `assert`.
# Step to Reproduce
1. `cd cpp`
2. `cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON`
3. `cmake --build build -- -j`
4. `cd build`
5. `GAR_TEST_DATA=${PWD}/../../testing ctest`
# Log
```
Test project /workspace/cpp/build
Start 1: InfoVersion
1/20 Test #1: InfoVersion ............................ Passed 0.01 sec
Start 2: Property
2/20 Test #2: Property ............................... Passed 0.01 sec
Start 3: PropertyGroup
3/20 Test #3: PropertyGroup .......................... Passed 0.01 sec
Start 4: AdjacentList
4/20 Test #4: AdjacentList ........................... Passed 0.01 sec
Start 5: VertexInfo
5/20 Test #5: VertexInfo ............................. Passed 0.01 sec
Start 6: EdgeInfo
6/20 Test #6: EdgeInfo ............................... Passed 0.01 sec
Start 7: GraphInfo
7/20 Test #7: GraphInfo .............................. Passed 0.01 sec
Start 8: LoadFromYaml
8/20 Test #8: LoadFromYaml ........................... Passed 0.01 sec
Start 9: TestVertexPropertyWriter
9/20 Test #9: TestVertexPropertyWriter ............... Passed 0.05 sec
Start 10: TestEdgeChunkWriter
10/20 Test #10: TestEdgeChunkWriter .................... Passed 0.02 sec
Start 11: Test_vertices_builder
11/20 Test #11: Test_vertices_builder .................. Passed 0.02 sec
Start 12: test_edges_builder
12/20 Test #12: test_edges_builder ..................... Passed 0.02 sec
Start 13: ChunkInfoReader
13/20 Test #13: ChunkInfoReader ........................ Passed 0.01 sec
Start 14: ArrowChunkReader
14/20 Test #14: ArrowChunkReader ....................... Passed 0.04 sec
Start 15: EmptyChunkTest
15/20 Test #15: EmptyChunkTest ......................... Passed 0.01 sec
Start 16: JSON_TEST
16/20 Test #16: JSON_TEST .............................. Passed 0.02 sec
Start 17: Graph
17/20 Test #17: Graph .................................. Passed 0.12 sec
Start 18: test_multi_label_builder
18/20 Test #18: test_multi_label_builder ............... Passed 0.02 sec
Start 19: read multi-properties from csv file
19/20 Test #19: read multi-properties from csv file ....Subprocess aborted***Exception: 0.02 sec
Start 20: TestMultiProperty high level builder
20/20 Test #20: TestMultiProperty high level builder ... Passed 0.01 sec
95% tests passed, 1 tests failed out of 20
Total Test time (real) = 0.44 sec
The following tests FAILED:
19 - read multi-properties from csv file (Subprocess aborted)
Errors while running CTest
Output from these tests are in: /workspace/cpp/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
```
I’m willing to submit a PR for this.
### Component(s)
C++
--
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@graphar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397261328
> test/test_multi_label.cc:93: assert(reader->seek(0).ok());
These are high risk and must be replaced.
Let's replace them all.
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "Sober7135 (via GitHub)" <gi...@apache.org>.
Sober7135 closed issue #789: C++: Test fail when building with CMake in Release/RelWithDebInfo mode
URL: https://github.com/apache/incubator-graphar/issues/789
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "Sober7135 (via GitHub)" <gi...@apache.org>.
Sober7135 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397241306
I wonder if we should replace all `assert` to `ASSERT` for consistency. There are some `assert`s in the tests.
```
grep -nrI "assert" test/
test/test_multi_label.cc:91: assert(maybe_reader.status().ok());
test/test_multi_label.cc:93: assert(reader->seek(0).ok());
test/test_multi_label.cc:94: assert(reader->GetLabelChunk().status().ok());
test/test_multi_label.cc:95: assert(reader->next_chunk().ok());
test/test_multi_property.cc:143: assert(maybe_reader.status().ok());
test/test_multi_property.cc:269: assert(maybe_reader.status().ok());
test/test_multi_property.cc:271: assert(reader->seek(0).ok());
```
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "Sober7135 (via GitHub)" <gi...@apache.org>.
Sober7135 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397169571
> Hi [@Sober7135](https://github.com/Sober7135) , what is the OS version and apache-arrow version running?
I use docker, Dockerfile https://github.com/Sober7135/graphar-rs/blob/main/Dockerfile
(Host) OS:
```bash
uname -a
Linux Gentoo 6.16.10-gentoo-dist #1 SMP PREEMPT_DYNAMIC Thu Oct 2 16:42:19 -00 2025 x86_64 x86_64 x86_64 GNU/Linux
```
arrow: 21
```bash
ls /usr/lib/x86_64-linux-gnu/ | grep arrow
libarrow.a
libarrow.so
libarrow.so.2100
libarrow.so.2100.0.0
libarrow_acero.a
libarrow_acero.so
libarrow_acero.so.2100
libarrow_acero.so.2100.0.0
libarrow_bundled_dependencies.a
libarrow_compute.a
libarrow_compute.so
libarrow_compute.so.2100
libarrow_compute.so.2100.0.0
libarrow_dataset.a
libarrow_dataset.so
libarrow_dataset.so.2100
libarrow_dataset.so.2100.0.0
```
compiler
```
cc --version
cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
c++ --version
c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
CI is built in DEBUG, so all the tests are passed.
https://github.com/apache/incubator-graphar/blob/a88cd01f610d534a42418bf25931f9bda3d9391c/.github/workflows/ci.yml#L88
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397218425
Can you submit a PR to fix it, if so that would be cool~
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397044949
Hi @Sober7135 , what is the OS version and apache-arrow version running?
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org
Re: [I] C++: Test fail when building with CMake in Release/RelWithDebInfo mode [incubator-graphar]
Posted by "yangxk1 (via GitHub)" <gi...@apache.org>.
yangxk1 commented on issue #789:
URL: https://github.com/apache/incubator-graphar/issues/789#issuecomment-3397215609
Thank you for pointing this out! yes, we are using `assert` incorrectly. We need to remove logic with side effects in the `assert` and replace it with the `ASSERT/REQUIRE`
--
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@graphar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@graphar.apache.org
For additional commands, e-mail: commits-help@graphar.apache.org