tools/testing/selftests/powerpc/papr_attributes/attr_test.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/powerpc/papr_attributes/attr_test.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/powerpc/papr_attributes/attr_test.c- Extension
.c- Size
- 2094 bytes
- Lines
- 114
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
errno.hstdio.hstring.hdirent.hsys/types.hsys/stat.hunistd.hstdlib.hutils.h
Detected Declarations
enum energy_freq_attrsenum typefunction value_typefunction verify_energy_infofunction main
Annotated Snippet
if (attr_type == STR_VAL) {
sprintf(file_name, "%s/%d/value_desc", path, id);
f = fopen(file_name, "r");
FAIL_IF(!f);
FAIL_IF(fgetc(f) == EOF);
}
}
return 0;
}
int main(void)
{
return test_harness(verify_energy_info, "papr_attributes");
}
Annotation
- Immediate include surface: `errno.h`, `stdio.h`, `string.h`, `dirent.h`, `sys/types.h`, `sys/stat.h`, `unistd.h`, `stdlib.h`.
- Detected declarations: `enum energy_freq_attrs`, `enum type`, `function value_type`, `function verify_energy_info`, `function main`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.