Summary:
- Fix compiler warnings in all 20 FAISS C++ test files
- Fixes include `-Wshadow`, `-Wunused-parameter`, and signed/unsigned comparisons
All changes are mechanical. No functional changes.
Part 13/13 of the compiler warnings cleanup (split from https://github.com/facebookresearch/faiss/issues/4810 per maintainer request).
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4944
Test Plan:
- [x] No functional changes — all fixes are mechanical renames and annotations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Reviewed By: mnorris11
Differential Revision: D96996609
Pulled By: alibeklfc
fbshipit-source-id: 72555246a4ccf540eb5422e64018c8d5e2660dce
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4069
Test often fails due to bad file descriptor: https://www.internalfb.com/intern/testinfra/diagnostics/12384899035372280.281475109760157.1733399744/
This is due to the filename in the test being the same across all runs - when there are multiple concurrent runs, there will be problems accessing the file.
The solution is to add a randomized component to the temp file, similar to other tests like ```test_io_with_options```, which prevents concurrent accesses of a file.
Reviewed By: pankajsingh88
Differential Revision: D66846937
fbshipit-source-id: d1d3c9ce817c4ce06283db265f13fe1413c2a14b
Summary:
## Description
Related issue: https://github.com/facebookresearch/faiss/issues/3246
When reading HNSWPQ from disk, if index ~read only~ new `IO_FLAG_PQ_SKIP_SDC_TABLE` flag is set, skip initializing the sdc_table.
In addition, adds cpp test case verifying functionality and build test util header file to share creation of temporary files amongst tests.
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3250
Test Plan: buck test //faiss/tests/:test_disable_pq_sdc_tables
Reviewed By: junjieqi
Differential Revision: D53844075
Pulled By: mdouze
fbshipit-source-id: e9a83c0e5243867edbca8f80e3b1242b38ef6a42