Commit 02bc220
selftests: harness: fix printing of mismatch values in __EXPECT()
intptr_t and uintptr_t are not big enough types on 32-bit architectures
when printing 64-bit values, resulting to the following incorrect
diagnostic output:
# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (3134324433)
Replace intptr_t and uintptr_t with intmax_t and uintmax_t, respectively.
With this fix, the same test produces more usable diagnostic output:
# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753)
Link: https://lore.kernel.org/r/[email protected]
Fixes: b5bb6d3 ("selftests/seccomp: fix 32-bit build warnings")
Signed-off-by: Dmitry V. Levin <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>1 parent b6f9cd8 commit 02bc220
1 file changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
764 | | - | |
765 | | - | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
780 | | - | |
781 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
789 | | - | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| |||
0 commit comments