Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

[tests] F: Add x86_64 compatibility#9

Open
ppenna wants to merge 1 commit into
mainfrom
feature-x86_64-compat
Open

[tests] F: Add x86_64 compatibility#9
ppenna wants to merge 1 commit into
mainfrom
feature-x86_64-compat

Conversation

@ppenna

@ppenna ppenna commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Add x86_64 compatibility fixes to C/C++ POSIX tests. These changes were originally developed in nanvix/nanvix on the feature-kernel-x64 branch and are now ported here after the C test sources were moved to this repository.

Changes

  • c-bindings/main.c: Fix long, size_t, and ssize_t type size assertions for x86_64 (pointer-width dependent)
  • dlfcn-c/Makefile: Add x86_64 ELF relocation types (R_X86_64_*)
  • file-c/ftruncate.c: Cast size comparison to off_t to avoid sign comparison warning
  • file-c/main.c: Add alignment padding checks for struct stat and struct posix_dent on x86_64; skip faccessat/access tests (DAC bypass for root)
  • memory-c/aligned_alloc_free.c: Use sizeof(void *) instead of hardcoded 4
  • thread-c/main.c: Add alignment padding checks for pthread_attr_t and pthread_condattr_t on x86_64
  • thread-c/thread_local.c: Use uintptr_t casts for pointer/int conversions

- Fix type size assertions for x86_64 (long, size_t, ssize_t use pointer width)
- Add struct alignment padding checks for x86_64 (stat, posix_dent, pthread_attr_t, pthread_condattr_t)
- Add x86_64 ELF relocation types in dlfcn-c Makefile
- Use sizeof(void*) instead of hardcoded 4 in aligned_alloc test
- Use uintptr_t casts for pointer/int conversions in thread_local test
- Cast ftruncate size comparison to off_t
- Skip faccessat/access tests (DAC bypass for root)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant