Skip to content

Commit

Permalink
Remove stat and lstat
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Oct 21, 2024
1 parent 1f898e6 commit 2b8b6de
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ trait CommonTests {
Arguments.of("readfile", "/tmp/dummy", 15),
Arguments.of("file_get_contents", "/tmp/dummy", 15),
Arguments.of("fopen", "/tmp/dummy", 12),
Arguments.of("stat", "/tmp/dummy", 15),
Arguments.of("lstat", "/tmp/dummy", 15),
});
}

Expand Down
2 changes: 0 additions & 2 deletions ext/integrations/integrations.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ void ddtrace_integrations_minit(void) {
"DDTrace\\Integrations\\Filesystem\\FilesystemIntegration");
DD_SET_UP_DEFERRED_LOADING_BY_FUNCTION(DDTRACE_INTEGRATION_FILESYSTEM, "fopen", "DDTrace\\Integrations\\Filesystem\\FilesystemIntegration");
DD_SET_UP_DEFERRED_LOADING_BY_FUNCTION(DDTRACE_INTEGRATION_FILESYSTEM, "readfile", "DDTrace\\Integrations\\Filesystem\\FilesystemIntegration");
DD_SET_UP_DEFERRED_LOADING_BY_FUNCTION(DDTRACE_INTEGRATION_FILESYSTEM, "stat", "DDTrace\\Integrations\\Filesystem\\FilesystemIntegration");
DD_SET_UP_DEFERRED_LOADING_BY_FUNCTION(DDTRACE_INTEGRATION_FILESYSTEM, "lstat", "DDTrace\\Integrations\\Filesystem\\FilesystemIntegration");

DD_SET_UP_DEFERRED_LOADING_BY_FUNCTION(DDTRACE_INTEGRATION_CURL, "curl_exec",
"DDTrace\\Integrations\\Curl\\CurlIntegration");
Expand Down
12 changes: 0 additions & 12 deletions src/DDTrace/Integrations/Filesystem/FilesystemIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ public function init(): int
null
);

\DDTrace\install_hook(
'stat',
self::preHook('stat'),
null
);

\DDTrace\install_hook(
'lstat',
self::preHook('lstat'),
null
);

return Integration::LOADED;
}

Expand Down
18 changes: 0 additions & 18 deletions tests/Integrations/Filesystem/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,4 @@ public function testReadFile()
});
$this->assertEvent('./dummy', $traces);
}

public function testStat()
{
$traces = $this->tracesFromWebRequest(function () {
$response = $this->call(GetSpec::create('Root', '/?function=stat&path=./dummy'));
TestCase::assertSame("OK", $response);
});
$this->assertEvent('./dummy', $traces);
}

public function testLstat()
{
$traces = $this->tracesFromWebRequest(function () {
$response = $this->call(GetSpec::create('Root', '/?function=lstat&path=./dummy'));
TestCase::assertSame("OK", $response);
});
$this->assertEvent('./dummy', $traces);
}
}

0 comments on commit 2b8b6de

Please sign in to comment.