Jakub Kurzak

92 papers A 13B 3Misc 4Journal 41Unranked 24
YearRankTypeTitle / Venue / Authors
2024 A conf
SC
Ryan Stocks, Jorge L. Galvez Vallejo, Fiona C. Y. Yu, Calum Snowdon, Elise Palethorpe, Jakub Kurzak, Dmytro Bykov, Giuseppe M. J. Barca
2024 J jnl
CoRR
Ryan Stocks, Jorge L. Galvez Vallejo, Fiona C. Y. Yu, Calum Snowdon, Elise Palethorpe, Jakub Kurzak, Dmytro Bykov, Giuseppe M. J. Barca
2023 J jnl
CoRR
Paul T. Bauman, Reuben D. Budiardja, Dmytro Bykov, Noel Chalmers, Jacqueline Chen, Nicholas Curtis, Marc Day, Markus Eisenbach, Lucas Esclapez, Alessandro Fanfarillo, William Freitag, Nicholas Frontiere, Antigoni Georgiadou, Joseph Glenski, Kalyana C. Gottiparthi, Marc T. Henry de Frahan, Gustav R. Jansen, Wayne Joubert, Justin G. Lietz, Jakub Kurzak, Nicholas Malaya, Bronson Messer, Damon McDougall, Paul Mullowney, Stephen Nichols, Matthew R. Norman, Thomas Papatheodore, Jon S. Rood, Philip C. Roth, Sarat Sreepathi, James B. White III, Noah Wolfe
2023 A conf
SC
Nicholas Malaya, Bronson Messer, Joseph Glenski, Antigoni Georgiadou, Justin Lietz, Kalyana C. Gottiparthi, Marc Day, Jackie Chen, Jon S. Rood, Lucas Esclapez, James B. White III, Gustav R. Jansen, Nicholas Curtis, Stephen Nichols, Jakub Kurzak, Noel Chalmers, Chip Freitag, Paul T. Bauman, Alessandro Fanfarillo, Reuben D. Budiardja, Thomas Papatheodore, Nicholas Frontiere, Damon McDougall, Matthew R. Norman, Sarat Sreepathi, Philip C. Roth, Dmytro Bykov, Noah Wolfe, Paul Mullowney, Markus Eisenbach, Marc T. Henry de Frahan, Wayne Joubert
2023 A conf
SC
Noel Chalmers, Jakub Kurzak, Damon McDougall, Paul T. Bauman
2023 J jnl
CoRR
Noel Chalmers, Jakub Kurzak, Damon McDougall, Paul T. Bauman
2022 A conf
SC
Ramakrishnan Kannan, Piyush Sao, Hao Lu, Jakub Kurzak, Gundolf Schenk, Yongmei Shi, Seung-Hwan Lim, Sharat Israni, Vijay Thakkar, Guojing Cong, Robert M. Patton, Sergio E. Baranzini, Richard W. Vuduc, Thomas E. Potok
2021 J jnl
ACM Trans. Math. Softw.
Ahmad Abdelfattah, Timothy B. Costa, Jack J. Dongarra, Mark Gates, Azzam Haidar, Sven Hammarling, Nicholas J. Higham, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Mawussi Zounon
2019 A conf
ICS
Jakub Kurzak, Mark Gates, Ali Charara, Asim YarKhan, Jack J. Dongarra
2019 conf
Euro-Par
Jakub Kurzak, Mark Gates, Ali Charara, Asim YarKhan, Ichitaro Yamazaki, Jack J. Dongarra
2019 B conf
ICPP
Jakub Kurzak, Yaohung M. Tsai, Mark Gates, Ahmad Abdelfattah, Jack J. Dongarra
2019 J jnl
ACM Trans. Math. Softw.
Jack J. Dongarra, Mark Gates, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Panruo Wu, Ichitaro Yamazaki, Asim YarKhan, Maksims Abalenkovs, Negin Bagherpour, Sven Hammarling, Jakub Sístek, David Stevens, Mawussi Zounon, Samuel D. Relton
2019 A conf
SC
Mark Gates, Jakub Kurzak, Ali Charara, Asim YarKhan, Jack J. Dongarra
2018 J jnl
Proc. IEEE
Jack J. Dongarra, Mark Gates, Jakub Kurzak, Piotr Luszczek, Yaohung M. Tsai
2018 J jnl
Supercomput. Front. Innov.
Piotr Luszczek, Jakub Kurzak, Ichitaro Yamazaki, David J. Keffer, Vasileios Maroulas, Jack J. Dongarra
2018 conf
IPDPS Workshops
Osni Marques, Reiji Suda, Jakub Kurzak, Akihiro Fujii
2018 J jnl
IEEE Trans. Parallel Distributed Syst.
Ichitaro Yamazaki, Jakub Kurzak, Panruo Wu, Mawussi Zounon, Jack J. Dongarra
2018 J jnl
Int. J. Comput. Sci. Eng.
Joseph Dorris, Asim YarKhan, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2018 J jnl
SIAM Rev.
Jack J. Dongarra, Mark Gates, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Ichitaro Yamazaki
2017 conf
IPDPS Workshops
Mark Gates, Jakub Kurzak, Piotr Luszczek, Yu Pei, Jack J. Dongarra
2017 ch.
Handbook of Big Data Technologies
Hartwig Anzt, Jack J. Dongarra, Mark Gates, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Ichitaro Yamazaki
2017 J jnl
Supercomput. Front. Innov.
Jakub Kurzak, Piotr Luszczek, Ichitaro Yamazaki, Yves Robert, Jack J. Dongarra
2017 J jnl
Int. J. Parallel Program.
Asim YarKhan, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2017 conf
IEEE BigData
Piotr Luszczek, Jakub Kurzak, Ichitaro Yamazaki, David J. Keffer, Jack J. Dongarra
2017 conf
HPEC
Piotr Luszczek, Jakub Kurzak, Ichitaro Yamazaki, Jack J. Dongarra
2017 J jnl
Comput. Sci. Eng.
Jack J. Dongarra, Stanimire Tomov, Piotr Luszczek, Jakub Kurzak, Mark Gates, Ichitaro Yamazaki, Hartwig Anzt, Azzam Haidar, Ahmad Abdelfattah
2016 J jnl
IEEE Trans. Parallel Distributed Syst.
Jakub Kurzak, Hartwig Anzt, Mark Gates, Jack J. Dongarra
2016 J jnl
Acta Numer.
Ahmad Abdelfattah, Hartwig Anzt, Jack J. Dongarra, Mark Gates, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Ichitaro Yamazaki, Asim YarKhan
2016 conf
MLHPC@SC
Yaohung M. Tsai, Piotr Luszczek, Jakub Kurzak, Jack J. Dongarra
2016 conf
IPDPS Workshops
Piotr Luszczek, Mark Gates, Jakub Kurzak, Anthony Danalis, Jack J. Dongarra
2016 conf
ISC Workshops
Joseph Dorris, Jakub Kurzak, Piotr Luszczek, Asim YarKhan, Jack J. Dongarra
2015 J jnl
Concurr. Comput. Pract. Exp.
Simplice Donfack, Jack J. Dongarra, Mathieu Faverge, Mark Gates, Jakub Kurzak, Piotr Luszczek, Ichitaro Yamazaki
2015 conf
IEEE BigData
Mark Gates, Hartwig Anzt, Jakub Kurzak, Jack J. Dongarra
2015 A conf
IPDPS
Gregoire Pichon, Azzam Haidar, Mathieu Faverge, Jakub Kurzak
2015 J jnl
Concurr. Comput. Pract. Exp.
Hartwig Anzt, Blake Haugen, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2015 conf
ScalA@SC
Ichitaro Yamazaki, Stanimire Tomov, Jakub Kurzak, Jack J. Dongarra, Jesse L. Barlow
2015 J jnl
Supercomput. Front. Innov.
Jack J. Dongarra, Maksims Abalenkovs, Ahmad Abdelfattah, Mark Gates, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Ichitaro Yamazaki, Asim YarKhan
2015 A conf
SC
Théo Mary, Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Jack J. Dongarra
2015 A conf
SC
Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2015 conf
VPA@SC
Blake Haugen, Stephen Richmond, Jakub Kurzak, Chad A. Steed, Jack J. Dongarra
2014 ch.
Numerical Computations with GPUs
Jack J. Dongarra, Mark Gates, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Ichitaro Yamazaki
2014 conf
IEEE BigData
Ichitaro Yamazaki, Théo Mary, Jakub Kurzak, Stanimire Tomov, Jack J. Dongarra
2014 conf
IPDPS Workshops
Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2014 J jnl
Parallel Process. Lett.
Ichitaro Yamazaki, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2014 J jnl
J. Parallel Distributed Comput.
Piotr Luszczek, Jakub Kurzak, Jack J. Dongarra
2014 J jnl
Supercomput. Front. Innov.
Jack J. Dongarra, Azzam Haidar, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Asim YarKhan
2014 B conf
ICPP
Blake Haugen, Jakub Kurzak, Asim YarKhan, Piotr Luszczek, Jack J. Dongarra
2014 B conf
VISSOFT
Blake Haugen, Jakub Kurzak
2013 A conf
SC
Azzam Haidar, Jakub Kurzak, Piotr Luszczek
2013 conf
Euro-Par Workshops
Guillaume Aupy, Mathieu Faverge, Yves Robert, Jakub Kurzak, Piotr Luszczek, Jack J. Dongarra
2013 J jnl
IEEE Trans. Parallel Distributed Syst.
Jakub Kurzak, Piotr Luszczek, Mathieu Faverge, Jack J. Dongarra
2013 A conf
IPDPS
Jakub Kurzak, Piotr Luszczek, Mark Gates, Ichitaro Yamazaki, Jack J. Dongarra
2012 J jnl
IEEE Trans. Parallel Distributed Syst.
Jakub Kurzak, Stanimire Tomov, Jack J. Dongarra
2012 ch.
High-Performance Scientific Computing
Jack J. Dongarra, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov
2012 conf
VECPAR
Jakub Kurzak, Piotr Luszczek, Mathieu Faverge, Jack J. Dongarra
2012 Misc conf
High Performance Computing Workshop (2)
George Bosilca, Aurélien Bouteiller, Anthony Danalis, Thomas Hérault, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov, Jack J. Dongarra
2011 conf
IPDPS Workshops
George Bosilca, Aurélien Bouteiller, Anthony Danalis, Mathieu Faverge, Azzam Haidar, Thomas Hérault, Jakub Kurzak, Julien Langou, Pierre Lemarinier, Hatem Ltaief, Piotr Luszczek, Asim YarKhan, Jack J. Dongarra
2010 conf
PARA (2)
Jakub Kurzak, Rajib Nath, Peng Du, Jack J. Dongarra
2010 ch.
Scientific Computing with Multicore and Accelerators
Jakub Kurzak, Jack J. Dongarra
2010 ch.
Scientific Computing with Multicore and Accelerators
Wesley Alvaro, Jakub Kurzak, Jack J. Dongarra
2010 conf
Euro-Par (2)
Beniamino Di Martino, Fabrizio Petrini, Siegfried Benkner, Kirk W. Cameron, Dieter Kranzlmüller, Jakub Kurzak, Davide Pasetto, Jesper Larsson Träff
2010 J jnl
IEEE Trans. Parallel Distributed Syst.
Hatem Ltaief, Jakub Kurzak, Jack J. Dongarra
2010 J jnl
Concurr. Comput. Pract. Exp.
Jakub Kurzak, Hatem Ltaief, Jack J. Dongarra, Rosa M. Badia
2010 J jnl
Sci. Program.
Hatem Ltaief, Jakub Kurzak, Jack J. Dongarra, Rosa M. Badia
2010 book
Jakub Kurzak, David A. Bader, Jack J. Dongarra
2010 J jnl
CoRR
Emmanuel Agullo, Henricus Bouwmeester, Jack J. Dongarra, Jakub Kurzak, Julien Langou, Lee Rosenberg
2010 conf
VECPAR
Emmanuel Agullo, Henricus Bouwmeester, Jack J. Dongarra, Jakub Kurzak, Julien Langou, Lee Rosenberg
2009 J jnl
Parallel Comput.
Alfredo Buttari, Julien Langou, Jakub Kurzak, Jack J. Dongarra
2009 J jnl
Comput. Phys. Commun.
Marc Baboulin, Alfredo Buttari, Jack J. Dongarra, Jakub Kurzak, Julie Langou, Julien Langou, Piotr Luszczek, Stanimire Tomov
2009 J jnl
Parallel Comput.
Jakub Kurzak, Wesley Alvaro, Jack J. Dongarra
2009 J jnl
Sci. Program.
Jakub Kurzak, Jack J. Dongarra
2008 J jnl
CoRR
Marc Baboulin, Alfredo Buttari, Jack J. Dongarra, Jakub Kurzak, Julie Langou, Julien Langou, Piotr Luszczek, Stanimire Tomov
2008 J jnl
Int. J. High Perform. Comput. Appl.
Jakub Kurzak, Dragan Mirkovic, B. Montgomery Pettitt, S. Lennart Johnsson
2008 conf
ICCS (1)
Wesley Alvaro, Jakub Kurzak, Jack J. Dongarra
2008 J jnl
Concurr. Comput. Pract. Exp.
Alfredo Buttari, Julien Langou, Jakub Kurzak, Jack J. Dongarra
2008 Misc conf
High Performance Computing Workshop
Jakub Kurzak, Hatem Ltaief, Jack J. Dongarra, Rosa M. Badia
2008 J jnl
IEEE Trans. Parallel Distributed Syst.
Jakub Kurzak, Alfredo Buttari, Jack J. Dongarra
2008 J jnl
Comput. Sci. Eng.
Jakub Kurzak, Alfredo Buttari, Piotr Luszczek, Jack J. Dongarra
2008 J jnl
ACM Trans. Math. Softw.
Alfredo Buttari, Jack J. Dongarra, Jakub Kurzak, Piotr Luszczek, Stanimire Tomov
2007 J jnl
CoRR
Alfredo Buttari, Julien Langou, Jakub Kurzak, Jack J. Dongarra
2007 J jnl
Concurr. Comput. Pract. Exp.
Jakub Kurzak, Jack J. Dongarra
2007 conf
Hot Interconnects
Jakub Kurzak, Alfredo Buttari
2007 J jnl
Int. J. High Perform. Comput. Appl.
Alfredo Buttari, Jack J. Dongarra, Julie Langou, Julien Langou, Piotr Luszczek, Jakub Kurzak
2007 Misc conf
PPAM
Alfredo Buttari, Julien Langou, Jakub Kurzak, Jack J. Dongarra
2007 ch.
Handbook of Parallel Computing
Yozo Hida, James Demmel, Julien Langou, Jakub Kurzak, Ming Gu, Alfredo Buttari, Stanimire Tomov, Piotr Luszczek, Julie Langou, Osni Marques, Christof Vömel, Xiaoye S. Li, E. Jason Riedy, Jack J. Dongarra, William Kahan, Beresford N. Parlett, David Bindel
2006 Misc conf
High Performance Computing Workshop
Alfredo Buttari, Jack J. Dongarra, Jakub Kurzak, Julie Langou, Julien Langou, Piotr Luszczek, Stanimire Tomov
2006 conf
PARA
Jakub Kurzak, Jack J. Dongarra
2006 A conf
SC
Alfredo Buttari, Jakub Kurzak, Jack J. Dongarra
2006 conf
PARA
James Demmel, Jack J. Dongarra, Beresford N. Parlett, William Kahan, Ming Gu, David Bindel, Yozo Hida, Xiaoye S. Li, Osni Marques, E. Jason Riedy, Christof Vömel, Julien Langou, Piotr Luszczek, Jakub Kurzak, Alfredo Buttari, Julie Langou, Stanimire Tomov
2006 conf
PARA
Alfredo Buttari, Jack J. Dongarra, Jakub Kurzak, Julien Langou, Piotr Luszczek, Stanimire Tomov
2006 A conf
SC
Julie Langou, Julien Langou, Piotr Luszczek, Jakub Kurzak, Alfredo Buttari, Jack J. Dongarra
2005 J jnl
J. Parallel Distributed Comput.
Jakub Kurzak, B. Montgomery Pettitt
tests/integration/test_pe_extractor.py
← Index tests/integration/test_pe_extractor.py python
"""
Integration tests for the PEExtractor base class.
"""
import pytest
from unittest.mock import Mock, patch, MagicMock

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


class TestPEExtractorInitialization:
    """Tests for PEExtractor initialization."""

    def test_pe_extractor_with_valid_pe(self, pe_binary_path, mock_logger):
        """Test PEExtractor initialization with valid PE file."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            assert extractor.pe is not None
            assert extractor.filepath == pe_binary_path

    def test_pe_extractor_with_provided_pe_object(self, pe_binary_path, mock_logger, pe_object):
        """Test PEExtractor initialization with pre-existing PE object."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            # Should use the provided PE object, not create a new one
            assert extractor.pe is pe_object

    def test_pe_extractor_with_invalid_file(self, elf_binary_path, mock_logger):
        """Test PEExtractor initialization with non-PE file."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            # Should return None for pe when file is not a valid PE
            assert extractor.pe is None
            # Logger should have recorded an error
            assert mock_logger.error.called


class TestPEExtractorMethods:
    """Tests for PEExtractor helper methods."""

    def test_check_dotnet_true(self, pe_binary_path, mock_logger):
        """Test _check_dotnet returns True for .NET PE."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            # The test PE file is a .NET binary
            if extractor.pe is not None:
                result = extractor._check_dotnet()
                # d8637bdbcfc9112fcb1f0167b398e771 is a .NET binary
                assert result is True

    def test_check_dotnet_false(self, elf_binary_path, mock_logger):
        """Test _check_dotnet returns False for non-PE file."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            # Should return False when PE is None
            result = extractor._check_dotnet()
            assert result is False

    def test_is_signed_false(self, pe_binary_path, mock_logger):
        """Test _is_signed method."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            if extractor.pe is not None:
                result = extractor._is_signed()
                # Result depends on the actual binary
                assert isinstance(result, bool)

    def test_has_overlay(self, pe_binary_path, mock_logger):
        """Test _has_overlay method."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            if extractor.pe is not None:
                result = extractor._has_overlay()
                assert isinstance(result, bool)


class TestGeneratePEFileObject:
    """Tests for _generate_pefile_object method."""

    def test_generate_pefile_object_valid(self, pe_binary_path, mock_logger):
        """Test _generate_pefile_object with valid PE file."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            # The PE object should be created successfully
            assert extractor.pe is not None

    def test_generate_pefile_object_invalid(self, temp_text_file, mock_logger):
        """Test _generate_pefile_object with invalid file."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PEFeaturesExtractor(temp_text_file, mock_logger)

            # Should return None for invalid PE
            assert extractor.pe is None


class TestGenerateDotNetFileObject:
    """Tests for _generate_dotnetfile_object method."""

    def test_generate_dotnetfile_object_valid(self, pe_binary_path, mock_logger):
        """Test _generate_dotnetfile_object with .NET PE file."""
        from redb.extractors.pe_extractors.pe_dotnet import PEDotNetExtractor

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

            if extractor.pe is not None and extractor._check_dotnet():
                dotnet, error = extractor._generate_dotnetfile_object()
                # Should create dotnet object for .NET PE
                assert dotnet is not None
                assert error is None

    def test_generate_dotnetfile_object_invalid(self, elf_binary_path, mock_logger):
        """Test _generate_dotnetfile_object with non-.NET file."""
        from redb.extractors.pe_extractors.pe_dotnet import PEDotNetExtractor

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

            dotnet, error = extractor._generate_dotnetfile_object()
            # Should return error for non-.NET file
            assert dotnet is None
            assert error is not None


class TestPEExtractorTag:
    """Tests for tag method in PE extractors."""

    def test_pe_features_tag(self, pe_binary_path, mock_logger):
        """Test that PEFeaturesExtractor returns correct tag."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor
        from redb.extractors.enum import Tag

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PEFeaturesExtractor(pe_binary_path, mock_logger)
            assert extractor.tag() == Tag.PE_FEATURES.value

    def test_pe_import_tag(self, pe_binary_path, mock_logger):
        """Test that PEImportExtractor returns correct tag."""
        from redb.extractors.pe_extractors.pe_imports import PEImportExtractor
        from redb.extractors.enum import Tag

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PEImportExtractor(pe_binary_path, mock_logger)
            assert extractor.tag() == Tag.PE_IMPORT.value

    def test_pe_section_tag(self, pe_binary_path, mock_logger):
        """Test that PESectionExtractor returns correct tag."""
        from redb.extractors.pe_extractors.pe_sections import PESectionExtractor
        from redb.extractors.enum import Tag

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PESectionExtractor(pe_binary_path, mock_logger)
            assert extractor.tag() == Tag.PE_SECTION.value


class TestPEExtractorClickHouseTable:
    """Tests for get_clickhouse_table method in PE extractors."""

    def test_pe_features_clickhouse_table(self, pe_binary_path, mock_logger):
        """Test that PEFeaturesExtractor returns correct ClickHouse table name."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PEFeaturesExtractor(pe_binary_path, mock_logger)
            assert extractor.get_clickhouse_table() == "redb_pe_features"

    def test_pe_import_clickhouse_table(self, pe_binary_path, mock_logger):
        """Test that PEImportExtractor returns correct ClickHouse table name."""
        from redb.extractors.pe_extractors.pe_imports import PEImportExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PEImportExtractor(pe_binary_path, mock_logger)
            assert extractor.get_clickhouse_table() == "redb_pe_imports"

    def test_pe_section_clickhouse_table(self, pe_binary_path, mock_logger):
        """Test that PESectionExtractor returns correct ClickHouse table name."""
        from redb.extractors.pe_extractors.pe_sections import PESectionExtractor

        with patch('redb.settings.ELASTIC_BINARIES_COLLECTION', 'test'):
            extractor = PESectionExtractor(pe_binary_path, mock_logger)
            assert extractor.get_clickhouse_table() == "redb_pe_sections"


class TestPEExtractorPrepareExportData:
    """Tests for prepare_export_data method in PE extractors."""

    def test_pe_features_prepare_export_elasticsearch(self, pe_binary_path, mock_logger):
        """Test prepare_export_data for Elasticsearch."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            if extractor.pe is not None:
                # First extract
                extractor.extract()
                result = extractor.prepare_export_data("ElasticsearchExporter")
                # Should return the pe_features dataclass
                assert result is extractor.pe_features

    def test_pe_features_prepare_export_clickhouse(self, pe_binary_path, mock_logger):
        """Test prepare_export_data for ClickHouse."""
        from redb.extractors.pe_extractors.pe_features import PEFeaturesExtractor

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

            if extractor.pe is not None:
                # First extract
                extractor.extract()
                result = extractor.prepare_export_data("ClickHouseExporter")

                # Should return tuple of (data, column_names, column_type_names)
                assert isinstance(result, tuple)
                assert len(result) == 3
                data, column_names, column_type_names = result
                assert isinstance(data, list)
                assert isinstance(column_names, list)
                assert isinstance(column_type_names, list)
                # Column names and types should match in length
                assert len(column_names) == len(column_type_names)