Skip to content

Commit

Permalink
Fix abi check for SLE
Browse files Browse the repository at this point in the history
instead of pulling the current ABI from a branch, just add the
reference abi (which should be more or less stable) to the git repo.
Note: Ubuntu focal/jammy ship older version of abigail which will
dump core if they read abi generated on TW

Signed-off-by: Martin Wilck <[email protected]>
  • Loading branch information
mwilck committed Sep 20, 2023
1 parent e881dd0 commit 0d0ec87
Show file tree
Hide file tree
Showing 7 changed files with 7,169 additions and 24 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,13 @@ name: check-abi
on:
- push
- pull_request
env:
ABI_BRANCH: ${{ secrets.ABI_BRANCH }}

jobs:
save-and-test-ABI:
test-ABI:
runs-on: ubuntu-20.04
steps:
- name: set ABI branch
if: ${{ env.ABI_BRANCH == '' }}
run: echo "ABI_BRANCH=master" >> $GITHUB_ENV
- name: checkout
uses: actions/checkout@v2
- name: get reference ABI
id: reference
continue-on-error: true
uses: dawidd6/action-download-artifact@v2
with:
workflow: abi.yaml
branch: ${{ env.ABI_BRANCH }}
name: abi
path: reference-abi
- name: update
run: sudo apt-get update
- name: dependencies
Expand All @@ -31,17 +17,10 @@ jobs:
gcc make pkg-config abigail-tools
libdevmapper-dev libreadline-dev libaio-dev libsystemd-dev
libudev-dev libjson-c-dev liburcu-dev libcmocka-dev libedit-dev
- name: create ABI
run: make -Orecurse -j$(grep -c ^processor /proc/cpuinfo) abi.tar.gz
- name: save ABI
uses: actions/upload-artifact@v1
with:
name: abi
path: abi
libmount-dev
- name: compare ABI against reference
id: compare
continue-on-error: true
if: ${{ steps.reference.outcome == 'success' }}
run: make abi-test
- name: save differences
if: ${{ steps.compare.outcome == 'failure' }}
Expand All @@ -50,5 +29,5 @@ jobs:
name: abi-test
path: abi-test
- name: fail
if: ${{ env.ABI_BRANCH != github.ref_name && steps.compare.outcome == 'failure' }}
if: ${{ steps.compare.outcome == 'failure' }}
run: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ libdmmp/test/libdmmp_test
libdmmp/test/libdmmp_speed_test
tests/*-test
tests/*.out
!reference-abi/*.abi
tests/*.vgr
libmultipath/nvme-ioctl.c
libmultipath/nvme-ioctl.h
429 changes: 429 additions & 0 deletions reference-abi/libdmmp.abi

Large diffs are not rendered by default.

107 changes: 107 additions & 0 deletions reference-abi/libmpathcmd-nv.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<abi-corpus path='libmpathcmd-nv.so' architecture='elf-amd-x86_64' soname='libmpathcmd-nv.so'>
<elf-needed>
<dependency name='libc.so.6'/>
</elf-needed>
<elf-function-symbols>
<elf-symbol name='__mpath_connect' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_connect' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_disconnect' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_process_cmd' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_recv_reply' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_recv_reply_data' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_recv_reply_len' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
<elf-symbol name='mpath_send_cmd' version='NOVERSION' is-default-version='yes' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
</elf-function-symbols>
<abi-instr version='1.0' address-size='64' path='mpath_cmd.c' comp-dir-path='/build/libmpathcmd' language='LANG_C99'>
<type-decl name='int' size-in-bits='32' id='type-id-1'/>
<type-decl name='char' size-in-bits='8' id='type-id-2'/>
<qualified-type-def type-id='type-id-2' const='yes' id='type-id-3'/>
<pointer-type-def type-id='type-id-3' size-in-bits='64' id='type-id-4'/>
<pointer-type-def type-id='type-id-2' size-in-bits='64' id='type-id-5'/>
<pointer-type-def type-id='type-id-5' size-in-bits='64' id='type-id-6'/>
<type-decl name='unsigned int' size-in-bits='32' id='type-id-7'/>
<function-decl name='mpath_process_cmd' mangled-name='mpath_process_cmd' filepath='/build/libmpathcmd/mpath_cmd.c' line='220' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_process_cmd@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='220' column='1'/>
<parameter type-id='type-id-4' name='cmd' filepath='/build/libmpathcmd/mpath_cmd.c' line='220' column='1'/>
<parameter type-id='type-id-6' name='reply' filepath='/build/libmpathcmd/mpath_cmd.c' line='220' column='1'/>
<parameter type-id='type-id-7' name='timeout' filepath='/build/libmpathcmd/mpath_cmd.c' line='221' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<function-decl name='mpath_send_cmd' mangled-name='mpath_send_cmd' filepath='/build/libmpathcmd/mpath_cmd.c' line='205' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_send_cmd@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='205' column='1'/>
<parameter type-id='type-id-4' name='cmd' filepath='/build/libmpathcmd/mpath_cmd.c' line='205' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<function-decl name='mpath_disconnect' mangled-name='mpath_disconnect' filepath='/build/libmpathcmd/mpath_cmd.c' line='144' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_disconnect@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='144' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<function-decl name='mpath_connect' mangled-name='mpath_connect' filepath='/build/libmpathcmd/mpath_cmd.c' line='139' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_connect@@NOVERSION'>
<return type-id='type-id-1'/>
</function-decl>
<function-decl name='__mpath_connect' mangled-name='__mpath_connect' filepath='/build/libmpathcmd/mpath_cmd.c' line='97' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='__mpath_connect@@NOVERSION'>
<parameter type-id='type-id-1' name='nonblocking' filepath='/build/libmpathcmd/mpath_cmd.c' line='97' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<type-decl name='long int' size-in-bits='64' id='type-id-8'/>
<typedef-decl name='__ssize_t' type-id='type-id-8' filepath='/usr/include/x86_64-linux-gnu/bits/types.h' line='193' column='1' id='type-id-9'/>
<typedef-decl name='ssize_t' type-id='type-id-9' filepath='/usr/include/x86_64-linux-gnu/sys/types.h' line='108' column='1' id='type-id-10'/>
<function-decl name='mpath_recv_reply_len' mangled-name='mpath_recv_reply_len' filepath='/build/libmpathcmd/mpath_cmd.c' line='149' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_recv_reply_len@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='149' column='1'/>
<parameter type-id='type-id-7' name='timeout' filepath='/build/libmpathcmd/mpath_cmd.c' line='149' column='1'/>
<return type-id='type-id-10'/>
</function-decl>
<type-decl name='unsigned long int' size-in-bits='64' id='type-id-11'/>
<typedef-decl name='size_t' type-id='type-id-11' filepath='/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h' line='209' column='1' id='type-id-12'/>
<function-decl name='mpath_recv_reply_data' mangled-name='mpath_recv_reply_data' filepath='/build/libmpathcmd/mpath_cmd.c' line='168' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_recv_reply_data@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='168' column='1'/>
<parameter type-id='type-id-5' name='reply' filepath='/build/libmpathcmd/mpath_cmd.c' line='168' column='1'/>
<parameter type-id='type-id-12' name='len' filepath='/build/libmpathcmd/mpath_cmd.c' line='168' column='1'/>
<parameter type-id='type-id-7' name='timeout' filepath='/build/libmpathcmd/mpath_cmd.c' line='169' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<function-decl name='mpath_recv_reply' mangled-name='mpath_recv_reply' filepath='/build/libmpathcmd/mpath_cmd.c' line='184' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='mpath_recv_reply@@NOVERSION'>
<parameter type-id='type-id-1' name='fd' filepath='/build/libmpathcmd/mpath_cmd.c' line='184' column='1'/>
<parameter type-id='type-id-6' name='reply' filepath='/build/libmpathcmd/mpath_cmd.c' line='184' column='1'/>
<parameter type-id='type-id-7' name='timeout' filepath='/build/libmpathcmd/mpath_cmd.c' line='184' column='1'/>
<return type-id='type-id-1'/>
</function-decl>
<type-decl name='void' id='type-id-13'/>
<function-decl name='strlen' mangled-name='strlen' filepath='/usr/include/string.h' line='385' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='__stack_chk_fail' mangled-name='__stack_chk_fail' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='close' mangled-name='close' filepath='/usr/include/unistd.h' line='353' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='__errno_location' mangled-name='__errno_location' filepath='/usr/include/errno.h' line='37' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='socket' mangled-name='socket' filepath='/usr/include/x86_64-linux-gnu/sys/socket.h' line='102' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='connect' mangled-name='connect' filepath='/usr/include/x86_64-linux-gnu/sys/socket.h' line='126' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='fcntl' mangled-name='fcntl' filepath='/usr/include/fcntl.h' line='148' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='send' mangled-name='send' filepath='/usr/include/x86_64-linux-gnu/sys/socket.h' line='138' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='__poll_alias' mangled-name='poll' filepath='/usr/include/x86_64-linux-gnu/bits/poll2.h' line='26' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='__recv_alias' mangled-name='recv' filepath='/usr/include/x86_64-linux-gnu/bits/socket2.h' line='25' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='free' mangled-name='free' filepath='/usr/include/stdlib.h' line='565' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
<function-decl name='malloc' mangled-name='malloc' filepath='/usr/include/stdlib.h' line='539' column='1' visibility='default' binding='global' size-in-bits='64'>
<return type-id='type-id-13'/>
</function-decl>
</abi-instr>
</abi-corpus>
Loading

0 comments on commit 0d0ec87

Please sign in to comment.