tools/testing/selftests/timers/set-tz.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/timers/set-tz.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/timers/set-tz.c- Extension
.c- Size
- 2341 bytes
- Lines
- 111
- 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
stdio.hstdlib.htime.hsys/time.hsys/timex.hstring.hsignal.hunistd.hkselftest.h
Detected Declarations
function set_tzfunction get_tz_minfunction get_tz_dstfunction main
Annotated Snippet
if (ret != i) {
printf("[FAILED] expected: %i got %i\n", i, ret);
goto err;
}
}
printf("[OK]\n");
printf("Checking invalid tz_minuteswest values are caught: ");
fflush(stdout);
if (!set_tz(-15*60-1, dst)) {
printf("[FAILED] %i didn't return failure!\n", -15*60-1);
goto err;
}
if (!set_tz(15*60+1, dst)) {
printf("[FAILED] %i didn't return failure!\n", 15*60+1);
goto err;
}
if (!set_tz(-24*60, dst)) {
printf("[FAILED] %i didn't return failure!\n", -24*60);
goto err;
}
if (!set_tz(24*60, dst)) {
printf("[FAILED] %i didn't return failure!\n", 24*60);
goto err;
}
printf("[OK]\n");
set_tz(min, dst);
ksft_exit_pass();
err:
set_tz(min, dst);
ksft_exit_fail();
}
Annotation
- Immediate include surface: `stdio.h`, `stdlib.h`, `time.h`, `sys/time.h`, `sys/timex.h`, `string.h`, `signal.h`, `unistd.h`.
- Detected declarations: `function set_tz`, `function get_tz_min`, `function get_tz_dst`, `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.