Skip to content

Commit e254ffc

Browse files
OSS-Fuzz Teamcopybara-github
authored andcommitted
Expose whether a program uses stdin for testcase input
PiperOrigin-RevId: 838000856
1 parent ff36f23 commit e254ffc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

infra/base-images/base-builder/indexer/manifest_types.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ class BinaryConfig:
139139

140140
binary_name: str
141141

142+
@property
143+
def uses_stdin(self) -> bool:
144+
"""Whether the binary uses stdin."""
145+
del self
146+
return False
147+
142148
@classmethod
143149
def from_dict(cls, config_dict: Mapping[str, Any]) -> Self:
144150
"""Deserializes the correct `BinaryConfig` subclass from a dict."""
@@ -188,6 +194,11 @@ class CommandLineBinaryConfig(BinaryConfig):
188194
# some targets like V8 require this to be false, see b/433718862.
189195
filter_compile_commands: bool = True
190196

197+
@property
198+
def uses_stdin(self) -> bool:
199+
"""Whether the binary uses stdin."""
200+
return manifest_constants.INPUT_FILE not in self.binary_args
201+
191202
@classmethod
192203
def from_dict(cls, config_dict: Mapping[str, Any]) -> Self:
193204
"""Deserializes the `CommandLineBinaryConfig` from a dict."""

0 commit comments

Comments
 (0)