Commit Graph

14 Commits

Author SHA1 Message Date
Changho Hwang
b04fa2daa7 lint 2026-04-04 06:22:04 +00:00
Changho Hwang
f62633ad41 mlx5dv bug fixes & enhanced unit tests perf reporting 2026-04-04 06:18:44 +00:00
Changho Hwang
67f9933ba1 fix data direct 2026-04-01 10:20:43 +00:00
copilot-swe-agent[bot]
bff76d5b85 Fix TearDown() handling and replace assert() in perf tests
Address review comments:
1. Ensure TearDown() is always called if SetUp() succeeds, even when
   TestBody() throws. This prevents resource leaks and maintains MPI
   synchronization between tests.
2. Replace assert() in fifo_perf_tests.cu with proper return false
   on validation failure, ensuring consistent test failure reporting.

Fixes:
- test/framework.cc: Track SetUp success and call TearDown in finally-style
- test/unit/fifo_perf_tests.cu: Replace assert with explicit check

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-03-18 19:44:11 +00:00
Changho Hwang
b6ce0f2ede simplify 2026-02-18 19:16:21 -08:00
Changho Hwang
30b9891180 simplifying 2026-02-18 18:35:33 -08:00
copilot-swe-agent[bot]
7003fec763 Simplify filter matching to use substring matching
- Remove complex wildcard pattern matching (*, ?, negative patterns)
- Use simple substring matching with find()
- Simpler implementation, easier to understand and maintain
- Still supports --gtest_filter for basic test name filtering

Note: For advanced filtering like wildcards, users can use multiple
test runs with different substring filters.

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 08:36:24 +00:00
copilot-swe-agent[bot]
e26f8abbd4 Address PR review comments
1. Add missing includes to fifo_perf_tests.cu
   - Add #include <cassert>
   - Add #include <unordered_map>

2. Fix license header capitalization (4 files)
   - "license." → "License." in test/framework.{hpp,cc}
   - "license." → "License." in test/unit/{unit_tests_main.cc,fifo_perf_tests.cu}

3. Fix double MPI_Init issue
   - Check MPI_Initialized() before calling MPI_Init
   - Prevents double initialization when mp_unit_tests already inits MPI

4. Fix coverage flags for CUDA compilation
   - Use generator expressions to apply --coverage only to C++ language
   - Prevents breaking CUDA compilation with host-only flags

5. Fix environment memory leak
   - Delete environment objects after TearDown()
   - Clear environments_ vector

6. Implement proper GTEST_SKIP handling
   - Create SkipException class
   - Handle skipped tests separately from failures
   - Report skipped test count

7. Implement GTest-style filter pattern matching
   - Support wildcards (* and ?)
   - Support negative patterns (-Pattern)
   - Support colon-separated patterns (Foo:Bar)
   - Compatible with existing CI usage like --gtest_filter=-*Ib*

Verified builds successfully with Docker.

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 08:32:28 +00:00
copilot-swe-agent[bot]
7e4365f014 Add performance test filtering and remove HTML coverage
- Add isPerfTest field to TestInfoInternal struct
- Add --exclude-perf-tests command line argument
- Add PERF_TEST and PERF_TEST_F macros for marking performance tests
- Update runAllTests to filter performance tests when requested
- Remove genhtml dependency and HTML report generation
- Keep only coverage.info file generation with lcov

Performance tests can now be excluded with:
  ./build/bin/unit_tests --exclude-perf-tests
  ./build/bin/mp_unit_tests --exclude-perf-tests

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 02:29:50 +00:00
copilot-swe-agent[bot]
b1f458eca3 Convert test framework identifiers from snake_case to camelCase
Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 02:25:28 +00:00
copilot-swe-agent[bot]
3d8a2e7349 Add --gtest_filter support to framework
Support --gtest_filter command line argument for test filtering,
compatible with Azure pipeline configurations.

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 00:25:43 +00:00
copilot-swe-agent[bot]
1e32e17c1e Address code review comments
- Remove duplicate static getMPIRank() and getMPISize() functions
- Add full namespace qualification to GTEST_SKIP macro

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 00:22:04 +00:00
copilot-swe-agent[bot]
e227fdc1ef Convert mp_unit tests from gtest to framework.hpp
- Modified test/mp_unit/mp_unit_tests.hpp to use ../framework.hpp instead of gtest/gtest.h
- Enhanced test/framework.hpp with GTest-compatible APIs:
  - Added Environment base class for global test setup/teardown
  - Added TestInfo and UnitTest classes for test metadata access
  - Added GTEST_SKIP macro support via SkipHelper class
  - Added namespace alias 'testing' for compatibility
  - Added InitGoogleTest and AddGlobalTestEnvironment helper functions
- Updated test/framework.cc with implementations for new classes
- All mp_unit test files now use framework.hpp through mp_unit_tests.hpp
- Formatting applied via lint.sh

Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 00:21:04 +00:00
copilot-swe-agent[bot]
c881bc5e16 Replace gtest/gtest.h with framework.hpp in all unit tests
Co-authored-by: chhwang <8018170+chhwang@users.noreply.github.com>
2026-02-11 00:17:18 +00:00