Nadathur Satish

58 papers A* 8A 15B 1C 1Misc 3Journal 22Unranked 8
YearRankTypeTitle / Venue / Authors
2026 J jnl
CoRR
Jatin Chhugani, Geonhwa Jeong, Bor-Yiing Su, Yunjie Pan, Hanmei Yang, Aayush Ankit, Jiecao Yu, Summer Deng, Yunqing Chen, Nadathur Satish, Changkyu Kim
2025 A* conf
ISCA
Joel Coburn, Chunqiang Tang, Sameer Abu Asal, Neeraj Agrawal, Raviteja Chinta, Harish Dattatraya Dixit, Brian Dodds, Saritha Dwarakapuram, Amin Firoozshahian, Cao Gao, Kaustubh Gondkar, Tyler Graf, Junhan Hu, Jian Huang, Sterling Hughes, Adam Hutchin, Bhasker Jakka, Guoqiang Jerry Chen, Indu Kalyanaraman, Ashwin Kamath, Pankaj Kansal, Erum Kazi, Roman Levenstein, Mahesh Maddury, Alex Mastro, Siji Medaiyese, Pritesh Modi, Jack Montgomery, Nadathur Satish, Amit Nagpal, Ashwin Narasimha, Maxim Naumov, Eleanor Ozer, Jongsoo Park, Poorvaja Ramani, Harikrishna Reddy, David Reiss, Deboleena Roy, Sathish Sekar, Arushi Sharma, Pavan Shetty, Aravind Sukumaran-Rajam, Eran Tal, Mike Tsai, Shreya Varshini, Richard Wareing, Olívia Wu, Xiaolong Xie, Jinghan Yang, Hangchen Yu, Tanmay Zargar, Zitong Zeng, Feixiong Zhang, Ajit Mathews, Xun Jiao, Jiyuan Zhang, Emmanuel Menage, Truls Edvard Stokke, Mohammed Sourouri
2021 J jnl
CoRR
Michael J. Anderson, Benny Chen, Stephen Chen, Summer Deng, Jordan Fix, Michael Gschwind, Aravind Kalaiah, Changkyu Kim, Jaewon Lee, Jason Liang, Haixin Liu, Yinghai Lu, Jack Montgomery, Arun Moorthy, Nadathur Satish, Sam Naghshineh, Avinash Nayak, Jongsoo Park, Chris Petersen, Martin Schatz, Narayanan Sundaram, Bangsheng Tang, Peter Tang, Amy Yang, Jiecao Yu, Hector Yuen, Ying Zhang, Aravind Anbudurai, Vandana Balan, Harsha Bojja, Joe Boyd, Matthew Breitbach, Claudio Caldato, Anna Calvo, Garret Catron, Sneh Chandwani, Panos Christeas, Brad Cottel, Brian Coutinho, Arun Dalli, Abhishek Dhanotia, Oniel Duncan, Roman Dzhabarov, Simon Elmir, Chunli Fu, Wenyin Fu, Michael Fulthorp, Adi Gangidi, Nick Gibson, Sean Gordon, Beatriz Padilla Hernandez, Daniel Ho, Yu-Cheng Huang, Olof Johansson, Shishir Juluri, et al.
2021 J jnl
CoRR
Zhaoxia Deng, Jongsoo Park, Ping Tak Peter Tang, Haixin Liu, Jie Yang, Hector Yuen, Jianyu Huang, Daya Shanker Khudia, Xiaohan Wei, Ellie Wen, Dhruv Choudhary, Raghuraman Krishnamoorthi, Carole-Jean Wu, Nadathur Satish, Changkyu Kim, Maxim Naumov, Sam Naghshineh, Mikhail Smelyanskiy
2021 J jnl
IEEE Micro
Zhaoxia Deng, Jongsoo Park, Ping Tak Peter Tang, Haixin Liu, Jie Yang, Hector Yuen, Jianyu Huang, Daya Shanker Khudia, Xiaohan Wei, Ellie Wen, Dhruv Choudhary, Raghuraman Krishnamoorthi, Carole-Jean Wu, Nadathur Satish, Changkyu Kim, Maxim Naumov, Sam Naghshineh, Mikhail Smelyanskiy
2019 J jnl
IEEE Trans. Parallel Distributed Syst.
Shihao Ji, Nadathur Satish, Sheng Li, Pradeep Dubey
2018 J jnl
CoRR
Jongsoo Park, Maxim Naumov, Protonu Basu, Summer Deng, Aravind Kalaiah, Daya Shanker Khudia, James Law, Parth Malani, Andrey Malevich, Nadathur Satish, Juan Miguel Pino, Martin Schatz, Alexander Sidorov, Viswanath Sivakumar, Andrew Tulloch, Xiaodong Wang, Yiming Wu, Hector Yuen, Utku Diril, Dmytro Dzhulgakov, Kim M. Hazelwood, Bill Jia, Yangqing Jia, Lin Qiao, Vijay Rao, Nadav Rotem, Sungjoo Yoo, Mikhail Smelyanskiy
2018 J jnl
CoRR
Nadav Rotem, Jordan Fix, Saleem Abdulrasool, Summer Deng, Roman Dzhabarov, James Hegeman, Roman Levenstein, Bert Maher, Nadathur Satish, Jakob Olesen, Jongsoo Park, Artem Rakhov, Misha Smelyanskiy
2017 J jnl
CoRR
Xiangyao Yu, Christopher J. Hughes, Nadathur Satish, Onur Mutlu, Srinivas Devadas
2017 A* conf
MICRO
Xiangyao Yu, Christopher J. Hughes, Nadathur Satish, Onur Mutlu, Srinivas Devadas
2017 J jnl
Proc. VLDB Endow.
Michael J. Anderson, Shaden Smith, Narayanan Sundaram, Mihai Capota, Zheguang Zhao, Subramanya Dulloor, Nadathur Satish, Theodore L. Willke
2017 J jnl
CoRR
Thorsten Kurth, Jian Zhang, Nadathur Satish, Ioannis Mitliagkas, Evan Racah, Md. Mostofa Ali Patwary, Tareq M. Malas, Narayanan Sundaram, Wahid Bhimji, Mikhail Smorkalov, Jack Deslippe, Mikhail Shiryaev, Srinivas Sridharan, Prabhat, Pradeep Dubey
2017 A conf
SC
Thorsten Kurth, Jian Zhang, Nadathur Satish, Evan Racah, Ioannis Mitliagkas, Md. Mostofa Ali Patwary, Tareq M. Malas, Narayanan Sundaram, Wahid Bhimji, Mikhail Smorkalov, Jack Deslippe, Mikhail Shiryaev, Srinivas Sridharan, Prabhat, Pradeep Dubey
2017 J jnl
CoRR
Brian Friesen, Md. Mostofa Ali Patwary, Brian Austin, Nadathur Satish, Zachary Slepian, Narayanan Sundaram, Deborah Bard, Daniel J. Eisenstein, Jack Deslippe, Pradeep Dubey, Prabhat
2017 A conf
SC
Brian Friesen, Md. Mostofa Ali Patwary, Brian Austin, Nadathur Satish, Zachary Slepian, Narayanan Sundaram, Deborah Bard, Daniel J. Eisenstein, Jack Deslippe, Pradeep Dubey, Prabhat
2016 A* conf
ICLR
Shihao Ji, S. V. N. Vishwanathan, Nadathur Satish, Michael J. Anderson, Pradeep Dubey
2016 A conf
EuroSys
Subramanya Dulloor, Amitabha Roy, Zheguang Zhao, Narayanan Sundaram, Nadathur Satish, Rajesh Sankaran, Jeff Jackson, Karsten Schwan
2016 A conf
IPDPS
Michael J. Anderson, Narayanan Sundaram, Nadathur Satish, Md. Mostofa Ali Patwary, Theodore L. Willke, Pradeep Dubey
2016 A* conf
MICRO
Tae Jun Ham, Lisa Wu, Narayanan Sundaram, Nadathur Satish, Margaret Martonosi
2016 A conf
IPDPS
Scott Sallinen, Nadathur Satish, Mikhail Smelyanskiy, Samantika S. Sury, Christopher Ré
2016 J jnl
CoRR
Shihao Ji, Nadathur Satish, Sheng Li, Pradeep Dubey
2016 J jnl
CoRR
Shihao Ji, Nadathur Satish, Sheng Li, Pradeep Dubey
2015 J jnl
Commun. ACM
Nadathur Satish, Changkyu Kim, Jatin Chhugani, Hideki Saito, Rakesh Krishnaiyer, Mikhail Smelyanskiy, Milind Girkar, Pradeep Dubey
2015 conf
INFLOW@SOSP
Jasmina Malicevic, Subramanya Dulloor, Narayanan Sundaram, Nadathur Satish, Jeff Jackson, Willy Zwaenepoel
2015 A conf
SC
Yida Wang, Michael J. Anderson, Jonathan D. Cohen, Alexander Heinecke, Kai Li, Nadathur Satish, Narayanan Sundaram, Nicholas B. Turk-Browne, Theodore L. Willke
2015 J jnl
Proc. VLDB Endow.
Narayanan Sundaram, Nadathur Satish, Md. Mostofa Ali Patwary, Subramanya Dulloor, Michael J. Anderson, Satya Gautam Vadlamudi, Dipankar Das, Pradeep Dubey
2015 A* conf
MICRO
Xiangyao Yu, Christopher J. Hughes, Nadathur Satish, Srinivas Devadas
2015 conf
IA3@SC
Dominique LaSalle, Md. Mostofa Ali Patwary, Nadathur Satish, Narayanan Sundaram, Pradeep Dubey, George Karypis
2015 A* conf
ICML
Jasper Snoek, Oren Rippel, Kevin Swersky, Ryan Kiros, Nadathur Satish, Narayanan Sundaram, Md. Mostofa Ali Patwary, Prabhat, Ryan P. Adams
2014 conf
SIGMOD Conference
Nadathur Satish, Narayanan Sundaram, Md. Mostofa Ali Patwary, Jiwon Seo, Jongsoo Park, Muhammad Amber Hassaan, Shubho Sengupta, Zhaoming Yin, Pradeep Dubey
2014 A conf
SC
Md. Mostofa Ali Patwary, Nadathur Satish, Narayanan Sundaram, Fredrik Manne, Salman Habib, Pradeep Dubey
2013 J jnl
Proc. VLDB Endow.
Narayanan Sundaram, Aizana Turmukhametova, Nadathur Satish, Todd Mostak, Piotr Indyk, Samuel Madden, Pradeep Dubey
2012 conf
SC Companion
Mikhail Smelyanskiy, Jason Sewall, Dhiraj D. Kalamkar, Nadathur Satish, Pradeep Dubey, Nikita Astafiev, Ilya Burylov, Andrey Nikolaev, Sergey Maidanov, Shuo Li, Sunil Kulkarni, Charles H. Finan, Ekaterina Gonina
2012 A* conf
ISCA
Nadathur Satish, Changkyu Kim, Jatin Chhugani, Hideki Saito, Rakesh Krishnaiyer, Mikhail Smelyanskiy, Milind Girkar, Pradeep Dubey
2012 conf
SIGMOD Conference
Changkyu Kim, Jongsoo Park, Nadathur Satish, Hongrae Lee, Pradeep Dubey, Jatin Chhugani
2012 J jnl
IEEE Micro
Venkatraman Govindaraju, Chen-Han Ho, Tony Nowatzki, Jatin Chhugani, Nadathur Satish, Karthikeyan Sankaralingam, Changkyu Kim
2012 A conf
IPDPS
Jatin Chhugani, Nadathur Satish, Changkyu Kim, Jason Sewall, Pradeep Dubey
2012 A conf
RAID
Victor C. Valgenti, Jatin Chhugani, Yan Sun, Nadathur Satish, Min Sik Kim, Changkyu Kim, Pradeep Dubey
2012 A conf
SC
Nadathur Satish, Changkyu Kim, Jatin Chhugani, Pradeep Dubey
2011 J jnl
ACM Trans. Database Syst.
Changkyu Kim, Jatin Chhugani, Nadathur Satish, Eric Sedlar, Anthony D. Nguyen, Tim Kaldewey, Victor W. Lee, Scott A. Brandt, Pradeep Dubey
2011 J jnl
CoRR
Jens Krüger, Changkyu Kim, Martin Grund, Nadathur Satish, David Schwalb, Jatin Chhugani, Hasso Plattner, Pradeep Dubey, Alexander Zeier
2011 J jnl
Proc. VLDB Endow.
Jens Krüger, Changkyu Kim, Martin Grund, Nadathur Satish, David Schwalb, Jatin Chhugani, Hasso Plattner, Pradeep Dubey, Alexander Zeier
2011 J jnl
Proc. VLDB Endow.
Jason Sewall, Jatin Chhugani, Changkyu Kim, Nadathur Satish, Pradeep Dubey
2010 A conf
SC
Anthony D. Nguyen, Nadathur Satish, Jatin Chhugani, Changkyu Kim, Pradeep Dubey
2010 A* conf
ISCA
Victor W. Lee, Changkyu Kim, Jatin Chhugani, Michael Deisher, Daehyun Kim, Anthony D. Nguyen, Nadathur Satish, Mikhail Smelyanskiy, Srinivas Chennupaty, Per Hammarlund, Ronak Singhal, Pradeep Dubey
2010 conf
SIGMOD Conference
Changkyu Kim, Jatin Chhugani, Nadathur Satish, Eric Sedlar, Anthony D. Nguyen, Tim Kaldewey, Victor W. Lee, Scott A. Brandt, Pradeep Dubey
2010 conf
SIGMOD Conference
Nadathur Satish, Changkyu Kim, Jatin Chhugani, Anthony D. Nguyen, Victor W. Lee, Daehyun Kim, Pradeep Dubey
2009 conf
Symposium on Computer Animation
Stephen J. Guy, Jatin Chhugani, Changkyu Kim, Nadathur Satish, Ming C. Lin, Dinesh Manocha, Pradeep Dubey
2009 A conf
IPDPS
Nadathur Satish, Mark J. Harris, Michael Garland
2009 C conf
MIG
Ming C. Lin, Stephen J. Guy, Rahul Narain, Jason Sewall, Sachin Patil, Jatin Chhugani, Abhinav Golas, Jur P. van den Berg, Sean Curtis, David Wilkie, Paul Merrell, Changkyu Kim, Nadathur Satish, Pradeep Dubey, Dinesh Manocha
2009 Misc conf
HiPC
Nadathur Satish, Narayanan Sundaram, Kurt Keutzer
2009 J jnl
Proc. VLDB Endow.
Changkyu Kim, Eric Sedlar, Jatin Chhugani, Tim Kaldewey, Anthony D. Nguyen, Andrea Di Blas, Victor W. Lee, Nadathur Satish, Pradeep Dubey
2008 Misc conf
EMSOFT
Nadathur Satish, Kaushik Ravindran, Kurt Keutzer
2007 A conf
DATE
Nadathur Satish, Kaushik Ravindran, Kurt Keutzer
2007 A conf
ICME
Jike Chong, Nadathur Satish, Bryan Catanzaro, Kaushik Ravindran, Kurt Keutzer
2005 B conf
FPL
Kaushik Ravindran, Nadathur Satish, Yujia Jin, Kurt Keutzer
2005 Misc conf
CODES+ISSS
Yujia Jin, Nadathur Satish, Kaushik Ravindran, Kurt Keutzer
2005 A conf
FPGA
Yujia Jin, William Plishker, Kaushik Ravindran, Nadathur Satish, Kurt Keutzer
tests/integration/test_elf_extractors.py
← Index tests/integration/test_elf_extractors.py python
"""
Integration tests for ELF-specific extractors.
"""
import pytest
from unittest.mock import Mock, patch, MagicMock

pytestmark = [pytest.mark.integration, pytest.mark.elf]


# ============================================================================
# ELFFeaturesExtractor Tests
# ============================================================================

class TestELFFeaturesExtractor:
    """Tests for ELFFeaturesExtractor class."""

    def test_extract_valid_elf(self, elf_binary_path, mock_logger):
        """Test extracting features from valid ELF file."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor
        from redb.models.dataclasses import ELFFeatures

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert isinstance(result, ELFFeatures)

    def test_extract_header_data(self, elf_binary_path, mock_logger):
        """Test ELF header data extraction."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            # Check header fields
            assert isinstance(result.ei_class, int)
            assert isinstance(result.ei_data, int)
            assert isinstance(result.e_type, int)
            assert isinstance(result.e_machine, int)
            assert isinstance(result.e_entry, int)

    def test_extract_human_readable_strings(self, elf_binary_path, mock_logger):
        """Test human-readable string fields."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert result.ei_class_str in ['32-bit', '64-bit', 'unknown']
            assert result.ei_data_str in ['Little-endian', 'Big-endian', 'unknown']
            assert result.e_type_str is not None
            assert result.e_machine_str is not None

    def test_extract_security_properties(self, elf_binary_path, mock_logger):
        """Test security property extraction."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            # Security flags should be 0 or 1
            assert result.is_pie in [0, 1]
            assert result.has_canary in [0, 1]
            assert result.has_nx in [0, 1]
            assert result.has_relro in [0, 1]
            assert result.has_fortify in [0, 1]

    def test_extract_counts(self, elf_binary_path, mock_logger):
        """Test section/segment/symbol counts."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert result.number_of_segments >= 0
            assert result.number_of_sections >= 0
            assert result.number_of_symbols >= 0
            assert result.number_of_dynamic_symbols >= 0
            assert result.number_of_relocations >= 0
            assert result.number_of_dependencies >= 0

    def test_extract_build_info(self, elf_binary_path, mock_logger):
        """Test build information extraction."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            # Build ID may or may not be present
            if result.build_id is not None:
                assert isinstance(result.build_id, str)
            assert result.gnu_hash_present in [0, 1]
            assert result.has_debug_info in [0, 1]

    def test_extract_invalid_elf(self, pe_binary_path, mock_logger):
        """Test extraction with non-ELF file."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(pe_binary_path, mock_logger)

            result = extractor.extract()

            # Should return None for invalid ELF
            assert result is None


# ============================================================================
# ELFSectionExtractor Tests
# ============================================================================

class TestELFSectionExtractor:
    """Tests for ELFSectionExtractor class."""

    def test_extract_sections(self, elf_binary_path, mock_logger):
        """Test section extraction."""
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSectionExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert isinstance(result, list)
            assert len(result) > 0

    def test_section_properties(self, elf_binary_path, mock_logger):
        """Test section property extraction."""
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor
        from redb.models.dataclasses import ELFSection

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSectionExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                section = result[0]
                assert isinstance(section, ELFSection)
                assert section.section_name is not None
                assert isinstance(section.section_type, int)
                assert isinstance(section.section_flags, int)
                assert section.section_entropy >= 0

    def test_section_hashes(self, elf_binary_path, mock_logger):
        """Test section hash computation."""
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSectionExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                for section in result:
                    if section.section_sha256:
                        assert len(section.section_sha256) == 64
                    if section.section_md5:
                        assert len(section.section_md5) == 32


# ============================================================================
# ELFSegmentExtractor Tests
# ============================================================================

class TestELFSegmentExtractor:
    """Tests for ELFSegmentExtractor class."""

    def test_extract_segments(self, elf_binary_path, mock_logger):
        """Test segment extraction."""
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSegmentExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert isinstance(result, list)

    def test_segment_properties(self, elf_binary_path, mock_logger):
        """Test segment property extraction."""
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor
        from redb.models.dataclasses import ELFSegment

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSegmentExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                segment = result[0]
                assert isinstance(segment, ELFSegment)
                assert isinstance(segment.segment_type, int)
                assert isinstance(segment.segment_flags, int)


# ============================================================================
# ELFSymbolExtractor Tests
# ============================================================================

class TestELFSymbolExtractor:
    """Tests for ELFSymbolExtractor class."""

    def test_extract_symbols(self, elf_binary_path, mock_logger):
        """Test symbol extraction."""
        from redb.extractors.elf_extractors.elf_symbols import ELFSymbolExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSymbolExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if stripped
            if result is not None:
                assert isinstance(result, list)

    def test_symbol_properties(self, elf_binary_path, mock_logger):
        """Test symbol property extraction."""
        from redb.extractors.elf_extractors.elf_symbols import ELFSymbolExtractor
        from redb.models.dataclasses import ELFSymbol

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSymbolExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                symbol = result[0]
                assert isinstance(symbol, ELFSymbol)
                assert symbol.symbol_name is not None
                assert isinstance(symbol.symbol_type, int)
                assert isinstance(symbol.symbol_bind, int)


# ============================================================================
# ELFImportExtractor Tests
# ============================================================================

class TestELFImportExtractor:
    """Tests for ELFImportExtractor class."""

    def test_extract_imports(self, elf_binary_path, mock_logger):
        """Test import extraction."""
        from redb.extractors.elf_extractors.elf_imports import ELFImportExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFImportExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if no imports
            if result is not None:
                assert hasattr(result, 'elf_imports_total')

    def test_import_functions(self, elf_binary_path, mock_logger):
        """Test import function extraction."""
        from redb.extractors.elf_extractors.elf_imports import ELFImportExtractor
        from redb.models.dataclasses import ELFImport

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFImportExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None:
                assert isinstance(result, ELFImport)
                assert isinstance(result.elf_imports_total, int)


# ============================================================================
# ELFExportExtractor Tests
# ============================================================================

class TestELFExportExtractor:
    """Tests for ELFExportExtractor class."""

    def test_extract_exports(self, elf_binary_path, mock_logger):
        """Test export extraction."""
        from redb.extractors.elf_extractors.elf_exports import ELFExportExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFExportExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if no exports
            if result is not None:
                assert hasattr(result, 'elf_exports_total')

    def test_export_functions(self, elf_binary_path, mock_logger):
        """Test export function extraction."""
        from redb.extractors.elf_extractors.elf_exports import ELFExportExtractor
        from redb.models.dataclasses import ELFExport

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFExportExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None:
                assert isinstance(result, ELFExport)


# ============================================================================
# ELFDependencyExtractor Tests
# ============================================================================

class TestELFDependencyExtractor:
    """Tests for ELFDependencyExtractor class."""

    def test_extract_dependencies(self, elf_binary_path, mock_logger):
        """Test dependency extraction."""
        from redb.extractors.elf_extractors.elf_dependencies import ELFDependencyExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFDependencyExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if no dependencies
            if result is not None:
                assert isinstance(result, list)

    def test_dependency_properties(self, elf_binary_path, mock_logger):
        """Test dependency property extraction."""
        from redb.extractors.elf_extractors.elf_dependencies import ELFDependencyExtractor
        from redb.models.dataclasses import ELFDependency

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFDependencyExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                dep = result[0]
                assert isinstance(dep, ELFDependency)
                assert dep.dependency_name is not None


# ============================================================================
# ELFRelocationExtractor Tests
# ============================================================================

class TestELFRelocationExtractor:
    """Tests for ELFRelocationExtractor class."""

    def test_extract_relocations(self, elf_binary_path, mock_logger):
        """Test relocation extraction."""
        from redb.extractors.elf_extractors.elf_relocations import ELFRelocationExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFRelocationExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if no relocations
            if result is not None:
                assert isinstance(result, list)

    def test_relocation_properties(self, elf_binary_path, mock_logger):
        """Test relocation property extraction."""
        from redb.extractors.elf_extractors.elf_relocations import ELFRelocationExtractor
        from redb.models.dataclasses import ELFRelocation

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFRelocationExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                reloc = result[0]
                assert isinstance(reloc, ELFRelocation)
                assert isinstance(reloc.relocation_offset, int)
                assert isinstance(reloc.relocation_type, int)


# ============================================================================
# ELFNotesExtractor Tests
# ============================================================================

class TestELFNotesExtractor:
    """Tests for ELFNotesExtractor class."""

    def test_extract_notes(self, elf_binary_path, mock_logger):
        """Test notes extraction."""
        from redb.extractors.elf_extractors.elf_notes import ELFNotesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFNotesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            # May be None if no notes
            if result is not None:
                assert isinstance(result, list)

    def test_note_properties(self, elf_binary_path, mock_logger):
        """Test note property extraction."""
        from redb.extractors.elf_extractors.elf_notes import ELFNotesExtractor
        from redb.models.dataclasses import ELFNote

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFNotesExtractor(elf_binary_path, mock_logger)

            result = extractor.extract()

            if result is not None and len(result) > 0:
                note = result[0]
                assert isinstance(note, ELFNote)
                assert note.note_name is not None
                assert isinstance(note.note_type, int)


# ============================================================================
# Integration Tests
# ============================================================================

class TestELFExtractorIntegration:
    """Integration tests for ELF extractors."""

    def test_all_extractors_valid_elf(self, elf_binary_path, mock_logger):
        """Test all ELF extractors with valid ELF file."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            features_ext = ELFFeaturesExtractor(elf_binary_path, mock_logger)
            sections_ext = ELFSectionExtractor(elf_binary_path, mock_logger)
            segments_ext = ELFSegmentExtractor(elf_binary_path, mock_logger)

            features_result = features_ext.extract()
            sections_result = sections_ext.extract()
            segments_result = segments_ext.extract()

            # All should extract something
            assert features_result is not None
            assert sections_result is not None
            assert segments_result is not None

    def test_hash_consistency_across_extractors(self, elf_binary_path, mock_logger):
        """Test that hashes are consistent across all extractors."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            features_ext = ELFFeaturesExtractor(elf_binary_path, mock_logger)
            sections_ext = ELFSectionExtractor(elf_binary_path, mock_logger)

            # Hashes should be the same
            assert features_ext.sha256 == sections_ext.sha256
            assert features_ext.md5 == sections_ext.md5
            assert features_ext.sha1 == sections_ext.sha1

    def test_clickhouse_tables_unique(self, elf_binary_path, mock_logger):
        """Test that each extractor has a unique ClickHouse table."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            features_ext = ELFFeaturesExtractor(elf_binary_path, mock_logger)
            sections_ext = ELFSectionExtractor(elf_binary_path, mock_logger)
            segments_ext = ELFSegmentExtractor(elf_binary_path, mock_logger)

            tables = {
                features_ext.get_clickhouse_table(),
                sections_ext.get_clickhouse_table(),
                segments_ext.get_clickhouse_table(),
            }

            # All tables should be unique
            assert len(tables) == 3


# ============================================================================
# Advanced Binary Tests
# ============================================================================

class TestELFAdvancedBinary:
    """Tests using the hello_advanced binary."""

    def test_advanced_features_extraction(self, elf_advanced_binary_path, mock_logger):
        """Test feature extraction from advanced ELF binary."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_advanced_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert result.number_of_sections > 0

    def test_advanced_sections_extraction(self, elf_advanced_binary_path, mock_logger):
        """Test section extraction from advanced ELF binary."""
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSectionExtractor(elf_advanced_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert len(result) > 0

            # Check for common ELF sections
            section_names = [s.section_name for s in result]
            # Most ELF files have .text section
            assert any('.text' in name for name in section_names)

    def test_advanced_segments_extraction(self, elf_advanced_binary_path, mock_logger):
        """Test segment extraction from advanced ELF binary."""
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSegmentExtractor(elf_advanced_binary_path, mock_logger)

            result = extractor.extract()

            assert result is not None
            assert len(result) > 0


# ============================================================================
# Export Data Tests
# ============================================================================

class TestELFExtractorExportData:
    """Tests for export data preparation."""

    def test_features_prepare_export_clickhouse(self, elf_binary_path, mock_logger):
        """Test ClickHouse export preparation for features."""
        from redb.extractors.elf_extractors.elf_features import ELFFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFFeaturesExtractor(elf_binary_path, mock_logger)
            extractor.extract()

            result = extractor.prepare_export_data("ClickHouseExporter")

            assert result is not None
            data, column_names, column_type_names = result

            assert 'sha256' in column_names
            assert 'ei_class' in column_names
            assert 'e_machine' in column_names
            assert 'is_pie' in column_names

    def test_sections_prepare_export_clickhouse(self, elf_binary_path, mock_logger):
        """Test ClickHouse export preparation for sections."""
        from redb.extractors.elf_extractors.elf_sections import ELFSectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSectionExtractor(elf_binary_path, mock_logger)
            extractor.extract()

            result = extractor.prepare_export_data("ClickHouseExporter")

            if result is not None:
                data, column_names, column_type_names = result
                assert 'section_name' in column_names
                assert 'section_entropy' in column_names

    def test_segments_prepare_export_clickhouse(self, elf_binary_path, mock_logger):
        """Test ClickHouse export preparation for segments."""
        from redb.extractors.elf_extractors.elf_segments import ELFSegmentExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = ELFSegmentExtractor(elf_binary_path, mock_logger)
            extractor.extract()

            result = extractor.prepare_export_data("ClickHouseExporter")

            if result is not None:
                data, column_names, column_type_names = result
                assert 'segment_type' in column_names