Skip to content

Fix alignment tests on 32-bit architectures - #809

Open
michel-slm wants to merge 1 commit into
time-rs:mainfrom
michel-slm:fix-32-bit-alignment-tests
Open

Fix alignment tests on 32-bit architectures#809
michel-slm wants to merge 1 commit into
time-rs:mainfrom
michel-slm:fix-32-bit-alignment-tests

Conversation

@michel-slm

Copy link
Copy Markdown

On i686, for instance, 64-bit integers are 32-bit aligned

See

https://koji.fedoraproject.org/koji/taskinfo?taskID=149783770 https://kojipkgs.fedoraproject.org//work/tasks/4350/149784350/build.log

---- meta::alignment::case_02 stdout ----
thread 'meta::alignment::case_02' (3516) panicked at tests/integration/meta.rs:91:5:
assertion `left == right` failed: alignment of `time::signed_duration::SignedDuration` was 8
  left: 4
 right: 8

On i686, for instance, 64-bit integers are 32-bit aligned

See

https://koji.fedoraproject.org/koji/taskinfo?taskID=149783770
https://kojipkgs.fedoraproject.org//work/tasks/4350/149784350/build.log

```
---- meta::alignment::case_02 stdout ----
thread 'meta::alignment::case_02' (3516) panicked at tests/integration/meta.rs:91:5:
assertion `left == right` failed: alignment of `time::signed_duration::SignedDuration` was 8
  left: 4
 right: 8
```

Signed-off-by: Michel Lind <salimma@fedoraproject.org>
@jhpratt

jhpratt commented Sep 7, 2026

Copy link
Copy Markdown
Member

Can this be extracted into a const to make it more readable? As-is, it's not the best. You'll also want to rebase so that CI can run correctly — I had to make a minor change.

@jhpratt jhpratt added the C-bug Category: bug in current code label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category: bug in current code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants