[1/3] test-self-compare-linux: Add a test that reads DWARF
Commit Message
From: Dodji Seketeli <dodji@seketeli.org>
The self-comparison test harness currently comprises tests that read
type information coming from BTF and CTF. This patch adds a test that
reads DWARF as well.
As DWARF handling takes much more time than BTF and CTF, I had to
restrict the size of the public interfaces that make up the kernel ABI
(really, the Kernel-Module-Interface, a.k.a KMI). That restriction is
made using a list of symbols (which defines the KMI) that I got from
the package kernel-abi-stablelists-5.14.0-427.31.1.el9_4.noarch.rpm,
from the Almalinux distribution. That "stablelist" is in the file
data/test-self-compare-linux/test-minimal-ctf-1/kmi-el94-stablelist-x86_6,
included in this patch.
With that stablelist, analyzing vmlinux and its 3000+ modules from
data/test-self-compare-linux/test-minimal-ctf-1/ takes less than one
minute on my machine, using a non-optimized build of libabigail.
Otherwise, it takes 35 minutes.
The patch modifies test-self-compare-linux.cc to teach it how to take
into account stablelists that define the KMI to be used for
self-comparison.
* data/test-self-compare-linux/test-minimal-ctf-1/kmi-el94-stablelist-x86_6:
New KMI stablelist.
* test-self-compare-linux.cc (InOutSpec::in_kmi_stablelist_path):
Add a new data member. Also, document the other data members.
(in_out_specs): Adjust for the addition of the
"in_kmi_stablelist_path" data member. Do some cleanup by removing
redundant options. Also, add a new test entry to perform
self-comparison by reading the DWARF information and by reducing
the size of the KMI using the stablelist kmi-el94-stablelist-x86_6
above.
(main): Pass the stablelist to abidw. Allow using nullptr as
empty arguments for Struct InOutSpec data members. Also, if no
InOutSpec::in_kernel_tree_path is not provided and yet a , then it
means abidw is going to analyze the vmlinux binary without using
the --linux-tree option, thus without using a corpus group, but a
simple corpus. Ensure that the InOutSpec::{in_vmlinux_path,
in_report_path, out_report_path} are always non empty.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@seketeli.org>
---
.../kmi-el94-stablelist-x86_6 | 1429 +++++++++++++++++
test-self-compare-linux.cc | 90 +-
2 files changed, 1506 insertions(+), 13 deletions(-)
create mode 100644 data/test-self-compare-linux/test-minimal-ctf-1/kmi-el94-stablelist-x86_6
new file mode 100644
@@ -0,0 +1,1429 @@
+[rhel9_x86_64_stablelist]
+ I_BDEV
+ __SCK__tp_func_xdp_exception
+ __SCT__cond_resched
+ __SCT__might_resched
+ __SCT__preempt_schedule
+ __SCT__preempt_schedule_notrace
+ __SCT__tp_func_xdp_exception
+ ___ratelimit
+ __alloc_pages
+ __alloc_percpu
+ __alloc_skb
+ __auxiliary_device_add
+ __auxiliary_driver_register
+ __bitmap_and
+ __bitmap_andnot
+ __bitmap_equal
+ __bitmap_intersects
+ __bitmap_or
+ __bitmap_set
+ __bitmap_subset
+ __bitmap_weight
+ __bitmap_xor
+ __blk_alloc_disk
+ __blk_mq_end_request
+ __blk_rq_map_sg
+ __break_lease
+ __check_object_size
+ __cond_resched
+ __const_udelay
+ __copy_overflow
+ __cpu_online_mask
+ __cpu_possible_mask
+ __cpu_present_mask
+ __cpuhp_remove_state
+ __cpuhp_setup_state
+ __d_drop
+ __delay
+ __destroy_inode
+ __dynamic_dev_dbg
+ __dynamic_netdev_dbg
+ __dynamic_pr_debug
+ __fentry__
+ __flush_workqueue
+ __folio_put
+ __free_pages
+ __generic_file_write_iter
+ __get_free_pages
+ __get_user_1
+ __get_user_2
+ __get_user_nocheck_1
+ __hw_addr_init
+ __ib_alloc_pd
+ __ib_create_cq
+ __init_rwsem
+ __init_swait_queue_head
+ __init_waitqueue_head
+ __insert_inode_hash
+ __ip_dev_find
+ __irq_apply_affinity_hint
+ __kmalloc
+ __kmalloc_node
+ __list_add_valid
+ __list_del_entry_valid
+ __local_bh_enable_ip
+ __mark_inode_dirty
+ __mmap_lock_do_trace_acquire_returned
+ __mmap_lock_do_trace_released
+ __mmap_lock_do_trace_start_locking
+ __module_get
+ __msecs_to_jiffies
+ __mutex_init
+ __ndelay
+ __netdev_alloc_skb
+ __netif_napi_del
+ __node_distance
+ __num_online_cpus
+ __page_frag_cache_drain
+ __pagevec_release
+ __pci_register_driver
+ __per_cpu_offset
+ __pm_runtime_resume
+ __printk_ratelimit
+ __pskb_pull_tail
+ __put_cred
+ __put_devmap_managed_page_refs
+ __put_user_2
+ __put_user_4
+ __put_user_8
+ __rcu_read_lock
+ __rcu_read_unlock
+ __rdma_create_kernel_id
+ __read_overflow2_field
+ __refrigerator
+ __register_binfmt
+ __register_blkdev
+ __register_chrdev
+ __register_nmi_handler
+ __release_region
+ __request_module
+ __request_region
+ __rht_bucket_nested
+ __root_device_register
+ __set_page_dirty_nobuffers
+ __sg_page_iter_dma_next
+ __sg_page_iter_start
+ __skb_flow_dissect
+ __skb_pad
+ __skb_recv_udp
+ __stack_chk_fail
+ __sw_hweight32
+ __sw_hweight64
+ __symbol_get
+ __symbol_put
+ __task_pid_nr_ns
+ __tasklet_hi_schedule
+ __tasklet_schedule
+ __tracepoint_mmap_lock_acquire_returned
+ __tracepoint_mmap_lock_released
+ __tracepoint_mmap_lock_start_locking
+ __tracepoint_xdp_exception
+ __tty_alloc_driver
+ __udelay
+ __unregister_chrdev
+ __uv_cpu_info
+ __uv_hub_info_list
+ __var_waitqueue
+ __vfs_getxattr
+ __vfs_removexattr
+ __vfs_setxattr
+ __virt_addr_valid
+ __vmalloc
+ __wait_on_buffer
+ __wake_up
+ __warn_printk
+ __write_overflow_field
+ __x86_indirect_thunk_r10
+ __x86_indirect_thunk_r11
+ __x86_indirect_thunk_r12
+ __x86_indirect_thunk_r13
+ __x86_indirect_thunk_r14
+ __x86_indirect_thunk_r15
+ __x86_indirect_thunk_r8
+ __x86_indirect_thunk_r9
+ __x86_indirect_thunk_rax
+ __x86_indirect_thunk_rbp
+ __x86_indirect_thunk_rbx
+ __x86_indirect_thunk_rcx
+ __x86_indirect_thunk_rdi
+ __x86_indirect_thunk_rdx
+ __x86_indirect_thunk_rsi
+ __x86_return_thunk
+ __xa_alloc
+ __xa_alloc_cyclic
+ __xa_insert
+ _atomic_dec_and_lock
+ _copy_from_user
+ _copy_to_user
+ _ctype
+ _dev_crit
+ _dev_err
+ _dev_info
+ _dev_warn
+ _find_first_bit
+ _find_first_zero_bit
+ _find_last_bit
+ _find_next_and_bit
+ _find_next_andnot_bit
+ _find_next_bit
+ _find_next_zero_bit
+ _printk
+ _raw_read_lock
+ _raw_read_lock_bh
+ _raw_read_lock_irq
+ _raw_read_lock_irqsave
+ _raw_read_unlock
+ _raw_read_unlock_bh
+ _raw_read_unlock_irq
+ _raw_read_unlock_irqrestore
+ _raw_spin_lock
+ _raw_spin_lock_bh
+ _raw_spin_lock_irq
+ _raw_spin_lock_irqsave
+ _raw_spin_trylock
+ _raw_spin_trylock_bh
+ _raw_spin_unlock
+ _raw_spin_unlock_bh
+ _raw_spin_unlock_irq
+ _raw_spin_unlock_irqrestore
+ _raw_write_lock
+ _raw_write_lock_bh
+ _raw_write_lock_irq
+ _raw_write_lock_irqsave
+ _raw_write_trylock
+ _raw_write_unlock
+ _raw_write_unlock_bh
+ _raw_write_unlock_irq
+ _raw_write_unlock_irqrestore
+ _totalram_pages
+ abort_creds
+ acpi_disabled
+ acpi_get_table
+ add_timer
+ add_wait_queue
+ add_wait_queue_exclusive
+ alloc_chrdev_region
+ alloc_cpu_rmap
+ alloc_etherdev_mqs
+ alloc_netdev_mqs
+ alloc_pages
+ alloc_workqueue
+ arch_touch_nmi_watchdog
+ argv_free
+ argv_split
+ arp_tbl
+ async_schedule_node
+ async_synchronize_full
+ async_synchronize_full_domain
+ atomic_notifier_call_chain
+ atomic_notifier_chain_register
+ atomic_notifier_chain_unregister
+ autoremove_wake_function
+ auxiliary_device_init
+ auxiliary_driver_unregister
+ avenrun
+ balance_dirty_pages_ratelimited
+ bin2hex
+ bio_add_page
+ bio_alloc_bioset
+ bio_alloc_clone
+ bio_associate_blkg
+ bio_clone_blkg_association
+ bio_endio
+ bio_init
+ bio_integrity_prep
+ bio_kmalloc
+ bio_put
+ bioset_exit
+ bioset_init
+ bitmap_find_free_region
+ bitmap_find_next_zero_area_off
+ bitmap_free
+ bitmap_from_arr32
+ bitmap_parselist
+ bitmap_print_to_pagebuf
+ bitmap_release_region
+ bitmap_zalloc
+ bitmap_zalloc_node
+ blk_execute_rq
+ blk_finish_plug
+ blk_integrity_register
+ blk_mq_alloc_request
+ blk_mq_alloc_tag_set
+ blk_mq_complete_request
+ blk_mq_end_request
+ blk_mq_free_request
+ blk_mq_free_tag_set
+ blk_mq_freeze_queue
+ blk_mq_init_queue
+ blk_mq_map_queues
+ blk_mq_run_hw_queue
+ blk_mq_run_hw_queues
+ blk_mq_start_request
+ blk_mq_stop_hw_queues
+ blk_mq_unfreeze_queue
+ blk_queue_bounce_limit
+ blk_queue_dma_alignment
+ blk_queue_flag_clear
+ blk_queue_flag_set
+ blk_queue_io_min
+ blk_queue_io_opt
+ blk_queue_logical_block_size
+ blk_queue_max_discard_sectors
+ blk_queue_max_hw_sectors
+ blk_queue_max_segments
+ blk_queue_physical_block_size
+ blk_queue_segment_boundary
+ blk_rq_map_kern
+ blk_rq_map_user
+ blk_rq_map_user_iov
+ blk_set_queue_depth
+ blk_stack_limits
+ blk_start_plug
+ blk_status_to_errno
+ blkdev_get_by_dev
+ blkdev_get_by_path
+ blkdev_put
+ block_write_begin
+ block_write_full_page
+ blockdev_superblock
+ blocking_notifier_call_chain
+ blocking_notifier_chain_register
+ blocking_notifier_chain_unregister
+ boot_cpu_data
+ bpf_master_redirect_enabled_key
+ bpf_prog_add
+ bpf_prog_inc
+ bpf_prog_put
+ bpf_stats_enabled_key
+ bpf_trace_run1
+ bpf_trace_run2
+ bpf_trace_run3
+ bpf_trace_run4
+ bpf_trace_run5
+ bpf_trace_run7
+ build_skb
+ bus_find_device
+ bus_for_each_dev
+ bus_register
+ bus_register_notifier
+ bus_unregister
+ bus_unregister_notifier
+ cachemode2protval
+ call_netdevice_notifiers
+ call_rcu
+ call_srcu
+ call_switchdev_notifiers
+ call_usermodehelper
+ cancel_delayed_work
+ cancel_delayed_work_sync
+ cancel_work
+ cancel_work_sync
+ capable
+ cc_mkdec
+ cdev_add
+ cdev_alloc
+ cdev_del
+ cdev_init
+ class_destroy
+ class_register
+ class_unregister
+ clear_inode
+ clear_nlink
+ clear_page_dirty_for_io
+ clock_t_to_jiffies
+ commit_creds
+ complete
+ complete_all
+ congestion_wait
+ consume_skb
+ convert_art_ns_to_tsc
+ copy_user_enhanced_fast_string
+ copy_user_generic_string
+ copy_user_generic_unrolled
+ cpu_bit_bitmap
+ cpu_info
+ cpu_khz
+ cpu_sibling_map
+ cpufreq_quick_get
+ cpumask_local_spread
+ crc32_le
+ create_empty_buffers
+ csum_ipv6_magic
+ csum_partial
+ current_time
+ current_umask
+ d_add
+ d_alloc_anon
+ d_drop
+ d_find_alias
+ d_hash_and_lookup
+ d_instantiate
+ d_invalidate
+ d_make_root
+ d_move
+ d_obtain_alias
+ d_path
+ d_prune_aliases
+ d_rehash
+ d_set_d_op
+ dca3_get_tag
+ dca_add_requester
+ dca_register_notify
+ dca_remove_requester
+ dca_unregister_notify
+ dcb_getapp
+ dcb_ieee_delapp
+ dcb_ieee_setapp
+ dcb_setapp
+ dcbnl_ieee_notify
+ deactivate_super
+ debugfs_attr_read
+ debugfs_attr_write
+ debugfs_create_atomic_t
+ debugfs_create_blob
+ debugfs_create_dir
+ debugfs_create_file
+ debugfs_create_file_unsafe
+ debugfs_create_size_t
+ debugfs_create_u32
+ debugfs_create_u64
+ debugfs_create_u8
+ debugfs_create_x32
+ debugfs_lookup
+ debugfs_lookup_and_remove
+ debugfs_remove
+ dec_zone_page_state
+ default_llseek
+ default_wake_function
+ del_gendisk
+ delayed_work_timer_fn
+ dentry_open
+ destroy_workqueue
+ dev_add_pack
+ dev_addr_add
+ dev_addr_del
+ dev_base_lock
+ dev_change_flags
+ dev_close
+ dev_driver_string
+ dev_get_by_index
+ dev_get_by_index_rcu
+ dev_get_by_name
+ dev_get_iflink
+ dev_get_stats
+ dev_kfree_skb_any_reason
+ dev_kfree_skb_irq_reason
+ dev_mc_add
+ dev_mc_add_excl
+ dev_mc_add_global
+ dev_mc_del
+ dev_mc_del_global
+ dev_open
+ dev_printk_emit
+ dev_remove_pack
+ dev_set_mac_address
+ dev_set_mtu
+ dev_set_name
+ dev_set_promiscuity
+ dev_uc_add
+ dev_uc_add_excl
+ dev_uc_del
+ device_add_disk
+ device_create
+ device_create_file
+ device_del
+ device_destroy
+ device_register
+ device_remove_file
+ device_set_wakeup_enable
+ device_unregister
+ devl_assert_locked
+ devl_health_reporter_create
+ devl_health_reporter_destroy
+ devl_lock
+ devl_param_driverinit_value_get
+ devl_param_driverinit_value_set
+ devl_params_register
+ devl_params_unregister
+ devl_port_health_reporter_create
+ devl_port_unregister
+ devl_rate_leaf_create
+ devl_rate_leaf_destroy
+ devl_rate_node_create
+ devl_rate_nodes_destroy
+ devl_resource_register
+ devl_resource_size_get
+ devl_resources_unregister
+ devl_trap_groups_register
+ devl_trap_groups_unregister
+ devl_traps_register
+ devl_traps_unregister
+ devl_unlock
+ devlink_alloc_ns
+ devlink_flash_update_status_notify
+ devlink_flash_update_timeout_notify
+ devlink_fmsg_arr_pair_nest_end
+ devlink_fmsg_arr_pair_nest_start
+ devlink_fmsg_binary_pair_nest_end
+ devlink_fmsg_binary_pair_nest_start
+ devlink_fmsg_binary_pair_put
+ devlink_fmsg_binary_put
+ devlink_fmsg_bool_pair_put
+ devlink_fmsg_obj_nest_end
+ devlink_fmsg_obj_nest_start
+ devlink_fmsg_pair_nest_end
+ devlink_fmsg_pair_nest_start
+ devlink_fmsg_string_pair_put
+ devlink_fmsg_u32_pair_put
+ devlink_fmsg_u32_put
+ devlink_fmsg_u64_pair_put
+ devlink_fmsg_u8_pair_put
+ devlink_free
+ devlink_health_report
+ devlink_health_reporter_create
+ devlink_health_reporter_destroy
+ devlink_health_reporter_priv
+ devlink_health_reporter_state_update
+ devlink_info_serial_number_put
+ devlink_info_version_fixed_put
+ devlink_info_version_running_put
+ devlink_info_version_stored_put
+ devlink_net
+ devlink_params_register
+ devlink_params_unregister
+ devlink_port_attrs_pci_pf_set
+ devlink_port_attrs_pci_sf_set
+ devlink_port_attrs_pci_vf_set
+ devlink_port_attrs_set
+ devlink_port_health_reporter_create
+ devlink_port_type_clear
+ devlink_port_unregister
+ devlink_priv
+ devlink_region_create
+ devlink_region_destroy
+ devlink_register
+ devlink_remote_reload_actions_performed
+ devlink_resource_occ_get_register
+ devlink_resource_occ_get_unregister
+ devlink_resource_register
+ devlink_resources_unregister
+ devlink_to_dev
+ devlink_trap_report
+ devlink_unregister
+ devm_free_irq
+ devm_hwmon_device_register_with_groups
+ devm_kasprintf
+ devm_kfree
+ devm_kmalloc
+ devm_kmemdup
+ devm_request_threaded_irq
+ devmap_managed_key
+ dget_parent
+ disable_irq
+ dma_alloc_attrs
+ dma_free_attrs
+ dma_map_page_attrs
+ dma_pool_alloc
+ dma_pool_create
+ dma_pool_destroy
+ dma_pool_free
+ dma_set_coherent_mask
+ dma_set_mask
+ dma_sync_single_for_cpu
+ dma_sync_single_for_device
+ dma_unmap_page_attrs
+ dmam_alloc_attrs
+ dmam_free_coherent
+ dmi_find_device
+ dmi_get_system_info
+ do_trace_netlink_extack
+ done_path_create
+ down
+ down_interruptible
+ down_read
+ down_read_trylock
+ down_trylock
+ down_write
+ down_write_trylock
+ downgrade_write
+ dput
+ dql_completed
+ dql_reset
+ driver_create_file
+ driver_for_each_device
+ driver_register
+ driver_remove_file
+ driver_unregister
+ drop_super
+ dst_release
+ dump_stack
+ efi
+ elfcorehdr_addr
+ emergency_restart
+ empty_zero_page
+ enable_irq
+ end_page_writeback
+ eth_get_headlen
+ eth_platform_get_mac_address
+ eth_type_trans
+ eth_validate_addr
+ ether_setup
+ ethtool_convert_legacy_u32_to_link_mode
+ ethtool_convert_link_mode_to_legacy_u32
+ ethtool_intersect_link_masks
+ ethtool_op_get_link
+ ethtool_op_get_ts_info
+ ethtool_sprintf
+ event_triggers_call
+ fd_install
+ fget
+ file_ns_capable
+ file_write_and_wait_range
+ filemap_fault
+ filemap_write_and_wait_range
+ filp_close
+ filp_open
+ find_get_pages_range_tag
+ find_get_pid
+ find_pid_ns
+ find_vma
+ finish_no_open
+ finish_open
+ finish_wait
+ firmware_request_nowarn
+ flow_block_cb_alloc
+ flow_block_cb_free
+ flow_block_cb_lookup
+ flow_block_cb_setup_simple
+ flow_indr_block_cb_alloc
+ flow_indr_dev_register
+ flow_indr_dev_unregister
+ flush_signals
+ flush_work
+ follow_up
+ fortify_panic
+ fput
+ free_cpumask_var
+ free_fib_info
+ free_irq
+ free_irq_cpu_rmap
+ free_netdev
+ free_pages
+ free_percpu
+ freeze_bdev
+ freezing_slow_path
+ fs_bio_set
+ fsync_bdev
+ gcd
+ generic_delete_inode
+ generic_error_remove_page
+ generic_file_llseek
+ generic_file_open
+ generic_file_read_iter
+ generic_file_splice_read
+ generic_file_write_iter
+ generic_fillattr
+ generic_permission
+ generic_pipe_buf_get
+ generic_read_dir
+ generic_setlease
+ generic_shutdown_super
+ generic_write_checks
+ generic_write_end
+ get_device
+ get_device_system_crosststamp
+ get_fs_type
+ get_random_bytes
+ get_unused_fd_flags
+ get_user_pages_remote
+ get_zeroed_page
+ gnss_allocate_device
+ gnss_deregister_device
+ gnss_insert_raw
+ gnss_put_device
+ gnss_register_device
+ groups_alloc
+ groups_free
+ hrtimer_cancel
+ hrtimer_forward
+ hrtimer_init
+ hrtimer_start_range_ns
+ hugetlb_optimize_vmemmap_key
+ hwmon_device_register_with_groups
+ hwmon_device_register_with_info
+ hwmon_device_unregister
+ hyperv_read_cfg_blk
+ hyperv_reg_block_invalidate
+ hyperv_write_cfg_blk
+ ib_dealloc_pd_user
+ ib_dereg_mr_user
+ ib_destroy_cq_user
+ ib_resize_cq
+ ida_alloc_range
+ ida_destroy
+ ida_free
+ idr_alloc
+ idr_alloc_u32
+ idr_destroy
+ idr_find
+ idr_get_next_ul
+ idr_preload
+ idr_remove
+ igrab
+ ilookup
+ import_iovec
+ in4_pton
+ in6_pton
+ in_aton
+ in_group_p
+ inet_add_protocol
+ inet_del_protocol
+ init_net
+ init_special_inode
+ init_task
+ init_timer_key
+ init_user_ns
+ init_uts_ns
+ init_wait_entry
+ init_wait_var_entry
+ inode_init_always
+ inode_permission
+ int_pow
+ int_to_scsilun
+ invalidate_bdev
+ invalidate_inode_pages2_range
+ invalidate_mapping_pages
+ iomem_resource
+ ioread16be
+ ioread32be
+ ioread8
+ ioremap
+ ioremap_wc
+ iounmap
+ iov_iter_advance
+ iov_iter_init
+ iov_iter_kvec
+ iowrite32be
+ ip6_dst_hoplimit
+ ip_queue_xmit
+ ip_route_output_flow
+ ip_send_check
+ iput
+ ipv6_find_hdr
+ ipv6_skip_exthdr
+ ipv6_stub
+ irq_cpu_rmap_add
+ irq_get_irq_data
+ irq_poll_disable
+ irq_poll_enable
+ irq_set_affinity_notifier
+ is_uv_system
+ is_vmalloc_addr
+ iscsi_boot_create_host_kset
+ iter_file_splice_write
+ iterate_dir
+ jiffies
+ jiffies_64
+ jiffies_to_msecs
+ jiffies_to_usecs
+ kasprintf
+ kblockd_schedule_work
+ kern_path
+ kern_path_create
+ kernel_fpu_begin_mask
+ kernel_fpu_end
+ kernel_read
+ kernel_recvmsg
+ kernel_sendmsg
+ kernel_sigaction
+ kernel_write
+ kexec_crash_loaded
+ kfree
+ kfree_skb_reason
+ kill_anon_super
+ kill_block_super
+ kill_fasync
+ kill_pgrp
+ kill_pid
+ kmalloc_caches
+ kmalloc_large
+ kmalloc_trace
+ kmem_cache_alloc
+ kmem_cache_create
+ kmem_cache_create_usercopy
+ kmem_cache_destroy
+ kmem_cache_free
+ kmem_cache_shrink
+ kmemdup
+ kobject_create_and_add
+ kobject_get_unless_zero
+ kobject_init_and_add
+ kobject_put
+ kobject_set_name
+ kobject_uevent
+ kobject_uevent_env
+ krealloc
+ kstrdup
+ kstrtobool
+ kstrtoint
+ kstrtoll
+ kstrtou16
+ kstrtou8
+ kstrtouint
+ kstrtoull
+ kthread_bind
+ kthread_cancel_delayed_work_sync
+ kthread_cancel_work_sync
+ kthread_complete_and_exit
+ kthread_create_on_node
+ kthread_create_worker
+ kthread_delayed_work_timer_fn
+ kthread_destroy_worker
+ kthread_queue_delayed_work
+ kthread_queue_work
+ kthread_should_stop
+ kthread_stop
+ kthread_unuse_mm
+ kthread_use_mm
+ ktime_get
+ ktime_get_coarse_real_ts64
+ ktime_get_real_seconds
+ ktime_get_real_ts64
+ ktime_get_ts64
+ ktime_get_with_offset
+ kvfree
+ kvfree_call_rcu
+ kvmalloc_node
+ llist_add_batch
+ lockref_get
+ locks_delete_block
+ locks_lock_inode_wait
+ lookup_bdev
+ lookup_one_len
+ loops_per_jiffy
+ mark_buffer_dirty
+ mark_page_accessed
+ mds_idle_clear
+ mem_section
+ memchr_inv
+ memcmp
+ memcpy
+ memdup_user
+ memmove
+ memory_read_from_buffer
+ memparse
+ mempool_alloc
+ mempool_alloc_slab
+ mempool_create
+ mempool_create_node
+ mempool_destroy
+ mempool_free
+ mempool_free_slab
+ memset
+ metadata_dst_alloc
+ metadata_dst_free
+ misc_deregister
+ misc_register
+ mlxfw_firmware_flash
+ mmput
+ mmu_notifier_get_locked
+ mmu_notifier_put
+ mntget
+ mntput
+ mod_delayed_work_on
+ mod_timer
+ module_layout
+ module_put
+ module_refcount
+ mount_bdev
+ mount_nodev
+ mpage_readahead
+ mpage_writepages
+ msleep
+ msleep_interruptible
+ mutex_is_locked
+ mutex_lock
+ mutex_lock_interruptible
+ mutex_trylock
+ mutex_unlock
+ names_cachep
+ napi_build_skb
+ napi_busy_loop
+ napi_complete_done
+ napi_consume_skb
+ napi_disable
+ napi_enable
+ napi_gro_receive
+ napi_schedule_prep
+ ndo_dflt_bridge_getlink
+ ndo_dflt_fdb_add
+ neigh_destroy
+ neigh_lookup
+ net_dim
+ net_ratelimit
+ netdev_bind_sb_channel_queue
+ netdev_crit
+ netdev_err
+ netdev_features_change
+ netdev_info
+ netdev_lower_get_next
+ netdev_master_upper_dev_get
+ netdev_master_upper_dev_get_rcu
+ netdev_notice
+ netdev_pick_tx
+ netdev_port_same_parent_id
+ netdev_printk
+ netdev_refcnt_read
+ netdev_reset_tc
+ netdev_rss_key_fill
+ netdev_rx_handler_register
+ netdev_rx_handler_unregister
+ netdev_set_num_tc
+ netdev_set_sb_channel
+ netdev_set_tc_queue
+ netdev_state_change
+ netdev_unbind_sb_channel
+ netdev_update_features
+ netdev_warn
+ netif_carrier_event
+ netif_carrier_off
+ netif_carrier_on
+ netif_device_attach
+ netif_device_detach
+ netif_napi_add_weight
+ netif_rx
+ netif_schedule_queue
+ netif_set_real_num_rx_queues
+ netif_set_real_num_tx_queues
+ netif_set_tso_max_size
+ netif_set_xps_queue
+ netif_tx_lock
+ netif_tx_stop_all_queues
+ netif_tx_unlock
+ netif_tx_wake_queue
+ new_inode
+ nla_find
+ node_data
+ node_states
+ node_to_cpumask_map
+ noop_llseek
+ notify_change
+ nr_cpu_ids
+ ns_to_timespec64
+ numa_node
+ on_each_cpu_cond_mask
+ override_creds
+ page_frag_free
+ page_offset_base
+ page_pool_alloc_pages
+ page_pool_create
+ page_pool_destroy
+ page_pool_get_stats
+ page_pool_put_defragged_page
+ page_pool_release_page
+ page_pool_update_nid
+ pagecache_get_page
+ pagevec_lookup_range_tag
+ panic
+ panic_notifier_list
+ param_array_ops
+ param_get_int
+ param_ops_bool
+ param_ops_byte
+ param_ops_charp
+ param_ops_int
+ param_ops_long
+ param_ops_short
+ param_ops_string
+ param_ops_uint
+ param_ops_ulong
+ param_ops_ushort
+ param_set_bool
+ param_set_int
+ path_put
+ pci_aer_clear_nonfatal_status
+ pci_alloc_irq_vectors
+ pci_bus_type
+ pci_cfg_access_lock
+ pci_cfg_access_unlock
+ pci_clear_master
+ pci_dev_driver
+ pci_dev_get
+ pci_dev_put
+ pci_device_is_present
+ pci_disable_device
+ pci_disable_link_state
+ pci_disable_msi
+ pci_disable_msix
+ pci_disable_sriov
+ pci_enable_atomic_ops_to_root
+ pci_enable_device
+ pci_enable_device_mem
+ pci_enable_msi
+ pci_enable_msix_range
+ pci_enable_sriov
+ pci_enable_wake
+ pci_find_capability
+ pci_find_ext_capability
+ pci_free_irq_vectors
+ pci_get_device
+ pci_get_dsn
+ pci_iomap
+ pci_ioremap_bar
+ pci_iounmap
+ pci_iov_get_pf_drvdata
+ pci_iov_vf_id
+ pci_iov_virtfn_devfn
+ pci_irq_vector
+ pci_num_vf
+ pci_prepare_to_sleep
+ pci_read_config_byte
+ pci_read_config_dword
+ pci_read_config_word
+ pci_release_regions
+ pci_release_selected_regions
+ pci_request_regions
+ pci_request_selected_regions
+ pci_restore_msi_state
+ pci_restore_state
+ pci_save_state
+ pci_select_bars
+ pci_set_master
+ pci_set_power_state
+ pci_sriov_get_totalvfs
+ pci_sriov_set_totalvfs
+ pci_unregister_driver
+ pci_vfs_assigned
+ pci_wait_for_pending_transaction
+ pci_wake_from_d3
+ pci_write_config_dword
+ pci_write_config_word
+ pcie_bandwidth_available
+ pcie_capability_read_dword
+ pcie_capability_read_word
+ pcie_flr
+ pcie_print_link_status
+ pcie_relaxed_ordering_enabled
+ pcpu_hot
+ percpu_ref_exit
+ percpu_ref_init
+ perf_trace_buf_alloc
+ perf_trace_run_bpf_submit
+ pgdir_shift
+ pgprot_writecombine
+ phys_base
+ physical_mask
+ pid_task
+ pipe_lock
+ pipe_unlock
+ pldmfw_flash_image
+ pldmfw_op_pci_match_record
+ pm_schedule_suspend
+ poll_freewait
+ poll_initwait
+ posix_acl_alloc
+ posix_acl_from_xattr
+ posix_acl_to_xattr
+ posix_acl_valid
+ posix_lock_file
+ posix_test_lock
+ prepare_creds
+ prepare_to_wait
+ prepare_to_wait_event
+ prepare_to_wait_exclusive
+ print_hex_dump
+ priv_to_devlink
+ proc_create
+ proc_create_data
+ proc_dointvec
+ proc_dointvec_minmax
+ proc_dostring
+ proc_mkdir
+ proc_mkdir_mode
+ proc_remove
+ psample_sample_packet
+ pskb_expand_head
+ ptp_classify_raw
+ ptp_clock_event
+ ptp_clock_index
+ ptp_clock_register
+ ptp_clock_unregister
+ ptp_find_pin
+ ptp_parse_header
+ ptp_schedule_worker
+ ptrs_per_p4d
+ put_device
+ put_disk
+ put_unused_fd
+ pv_ops
+ qdisc_reset
+ qed_put_eth_ops
+ qed_put_iscsi_ops
+ queue_delayed_work_on
+ queue_work_on
+ radix_tree_delete
+ radix_tree_insert
+ radix_tree_lookup
+ radix_tree_next_chunk
+ radix_tree_tag_set
+ rb_erase
+ rb_first
+ rb_insert_color
+ rb_next
+ rcu_barrier
+ rdma_accept
+ rdma_bind_addr
+ rdma_connect
+ rdma_create_qp
+ rdma_destroy_id
+ rdma_destroy_qp
+ rdma_disconnect
+ rdma_listen
+ rdma_reject
+ rdma_resolve_addr
+ rdma_resolve_route
+ recalc_sigpending
+ refcount_dec_and_mutex_lock
+ refcount_dec_if_one
+ refcount_warn_saturate
+ register_chrdev_region
+ register_fib_notifier
+ register_filesystem
+ register_inet6addr_notifier
+ register_inetaddr_notifier
+ register_kprobe
+ register_netdev
+ register_netdevice_notifier
+ register_netdevice_notifier_dev_net
+ register_netdevice_notifier_net
+ register_netevent_notifier
+ register_reboot_notifier
+ register_shrinker
+ register_switchdev_blocking_notifier
+ register_switchdev_notifier
+ register_sysctl_table
+ release_firmware
+ remap_pfn_range
+ remove_proc_entry
+ remove_wait_queue
+ request_firmware
+ request_firmware_direct
+ request_threaded_irq
+ revert_creds
+ rhashtable_destroy
+ rhashtable_free_and_destroy
+ rhashtable_init
+ rhashtable_insert_slow
+ rhltable_init
+ rht_bucket_nested
+ rht_bucket_nested_insert
+ root_device_unregister
+ round_jiffies
+ rps_may_expire_flow
+ rtnl_lock
+ rtnl_trylock
+ rtnl_unlock
+ sched_clock
+ sched_clock_cpu
+ sched_numa_hop_mask
+ schedule
+ schedule_timeout
+ scnprintf
+ scsi_add_device
+ scsi_add_host_with_dma
+ scsi_alloc_request
+ scsi_bus_type
+ scsi_change_queue_depth
+ scsi_command_size_tbl
+ scsi_device_get
+ scsi_device_put
+ scsi_device_type
+ scsi_done
+ scsi_host_alloc
+ scsi_host_busy
+ scsi_host_lookup
+ scsi_host_put
+ scsi_is_fc_rport
+ scsi_is_sdev_device
+ scsi_register_driver
+ scsi_remove_device
+ scsi_remove_host
+ scsi_vpd_lun_id
+ scsicam_bios_param
+ scsilun_to_int
+ sdev_prefix_printk
+ security_d_instantiate
+ security_free_mnt_opts
+ security_inode_init_security
+ security_sb_eat_lsm_opts
+ security_sb_set_mnt_opts
+ send_sig
+ send_sig_info
+ seq_lseek
+ seq_open
+ seq_printf
+ seq_putc
+ seq_puts
+ seq_read
+ seq_release
+ seq_write
+ set_blocksize
+ set_capacity
+ set_cpus_allowed_ptr
+ set_current_groups
+ set_disk_ro
+ set_freezable
+ set_nlink
+ set_normalized_timespec64
+ set_page_dirty
+ set_page_dirty_lock
+ set_user_nice
+ setattr_prepare
+ sg_copy_from_buffer
+ sg_copy_to_buffer
+ sg_next
+ sget
+ shrink_dcache_parent
+ shrink_dcache_sb
+ si_meminfo
+ sigprocmask
+ simple_attr_open
+ simple_attr_release
+ simple_open
+ simple_read_from_buffer
+ simple_statfs
+ simple_strtol
+ simple_strtoul
+ simple_strtoull
+ simple_write_to_buffer
+ single_open
+ single_open_size
+ single_release
+ sk_alloc
+ sk_free
+ skb_add_rx_frag
+ skb_checksum
+ skb_checksum_help
+ skb_clone
+ skb_clone_tx_timestamp
+ skb_copy
+ skb_copy_bits
+ skb_dequeue
+ skb_ext_add
+ skb_pull
+ skb_push
+ skb_put
+ skb_queue_tail
+ skb_realloc_headroom
+ skb_tstamp_tx
+ skb_vlan_pop
+ sme_me_mask
+ smp_call_function_many
+ smp_call_function_single
+ smp_call_function_single_async
+ sn_partition_id
+ sn_region_size
+ snprintf
+ sock_alloc_file
+ sock_create
+ sock_create_kern
+ sock_gen_put
+ sock_recvmsg
+ sock_release
+ sock_sendmsg
+ sock_setsockopt
+ softnet_data
+ sort
+ sprintf
+ sscanf
+ static_key_count
+ static_key_slow_dec
+ static_key_slow_inc
+ strcat
+ strchr
+ strcmp
+ strcpy
+ strcspn
+ strim
+ strlcat
+ strlcpy
+ strlen
+ strncasecmp
+ strncmp
+ strncpy
+ strncpy_from_user
+ strnlen
+ strnlen_user
+ strrchr
+ strscpy
+ strscpy_pad
+ strsep
+ strstr
+ submit_bio
+ submit_bio_noacct
+ sync_blockdev
+ sync_mapping_buffers
+ synchronize_irq
+ synchronize_net
+ synchronize_rcu
+ sys_tz
+ sysfs_add_file_to_group
+ sysfs_create_bin_file
+ sysfs_create_file_ns
+ sysfs_create_group
+ sysfs_emit
+ sysfs_remove_bin_file
+ sysfs_remove_file_ns
+ sysfs_remove_group
+ sysfs_streq
+ system_freezing_cnt
+ system_state
+ system_wq
+ tasklet_init
+ tasklet_kill
+ tasklet_setup
+ tasklet_unlock_wait
+ tcp_hashinfo
+ thaw_bdev
+ this_cpu_off
+ time64_to_tm
+ timecounter_cyc2time
+ timecounter_init
+ timecounter_read
+ timer_delete
+ timer_delete_sync
+ tls_get_record
+ tls_validate_xmit_skb
+ touch_softlockup_watchdog
+ trace_event_buffer_commit
+ trace_event_buffer_reserve
+ trace_event_ignore_this_pid
+ trace_event_printf
+ trace_event_raw_init
+ trace_event_reg
+ trace_handle_return
+ trace_print_flags_seq
+ trace_raw_output_prep
+ trace_seq_printf
+ trace_seq_putc
+ truncate_inode_pages
+ truncate_inode_pages_final
+ truncate_inode_pages_range
+ truncate_pagecache
+ try_module_get
+ try_wait_for_completion
+ tsc_khz
+ tty_buffer_request_room
+ tty_driver_kref_put
+ tty_flip_buffer_push
+ tty_insert_flip_string_fixed_flag
+ tty_port_destroy
+ tty_port_init
+ tty_port_link_device
+ tty_register_driver
+ tty_std_termios
+ tty_termios_encode_baud_rate
+ tty_unregister_driver
+ udp4_hwcsum
+ udp_tunnel_nic_ops
+ unlock_page
+ unmap_mapping_range
+ unregister_binfmt
+ unregister_blkdev
+ unregister_chrdev_region
+ unregister_fib_notifier
+ unregister_filesystem
+ unregister_inet6addr_notifier
+ unregister_inetaddr_notifier
+ unregister_kprobe
+ unregister_netdev
+ unregister_netdevice_notifier
+ unregister_netdevice_notifier_dev_net
+ unregister_netdevice_notifier_net
+ unregister_netevent_notifier
+ unregister_nmi_handler
+ unregister_reboot_notifier
+ unregister_shrinker
+ unregister_switchdev_blocking_notifier
+ unregister_switchdev_notifier
+ unregister_sysctl_table
+ up
+ up_read
+ up_write
+ usleep_range_state
+ uv_bios_enum_objs
+ uv_bios_enum_ports
+ uv_bios_get_geoinfo
+ uv_bios_get_heapsize
+ uv_bios_get_master_nasid
+ uv_bios_get_pci_topology
+ uv_bios_install_heap
+ uv_bios_obj_count
+ uv_get_hubless_system
+ uv_possible_blades
+ uv_setup_irq
+ uv_teardown_irq
+ uv_undefined
+ vfree
+ vfs_create
+ vfs_fsync
+ vfs_fsync_range
+ vfs_getattr
+ vfs_iter_read
+ vfs_iter_write
+ vfs_link
+ vfs_llseek
+ vfs_mkdir
+ vfs_mknod
+ vfs_readlink
+ vfs_rename
+ vfs_rmdir
+ vfs_statfs
+ vfs_symlink
+ vfs_unlink
+ vlan_dev_real_dev
+ vlan_dev_vlan_id
+ vlan_dev_vlan_proto
+ vm_event_states
+ vm_mmap
+ vm_munmap
+ vm_zone_stat
+ vmalloc
+ vmalloc_32
+ vmalloc_base
+ vmalloc_node
+ vmalloc_to_page
+ vmemmap_base
+ vprintk
+ vsnprintf
+ vsprintf
+ vzalloc
+ wait_for_completion
+ wait_for_completion_interruptible
+ wait_for_completion_timeout
+ wake_up_process
+ write_inode_now
+ x86_cpu_to_apicid
+ x86_spec_ctrl_base
+ xa_clear_mark
+ xa_destroy
+ xa_erase
+ xa_find
+ xa_find_after
+ xa_get_mark
+ xa_load
+ xa_set_mark
+ xa_store
+ xas_find
+ xattr_full_name
+ xz_dec_end
+ xz_dec_init
+ xz_dec_run
+ yield
+ zap_vma_ptes
+ zlib_inflate
+ zlib_inflateEnd
+ zlib_inflateInit2
+ zlib_inflate_workspacesize
@@ -13,6 +13,7 @@
/// Each test entry runs the abidw --abidiff with various configurations.
#include <sys/wait.h>
+#include <cstring>
#include <string>
#include <iostream>
#include <sstream>
@@ -29,13 +30,36 @@ using abigail::tests::get_libabigail_tools_dir;
using abigail::tests::emit_test_status_and_update_counters;
using abigail::tests::emit_test_summary;
+/// This is a test specification.
struct InOutSpec
{
+ /// The path to the kernel tree. If this is non-nil, it means the
+ /// union of vmlinux and the kernel modules is going to have an ABI
+ /// representation carried by a Corpus Group. This is doing by
+ /// using the --linux-tree option of abidw.
const char* in_kernel_tree_path;
+
+ /// The path to the vmlinux binary. This is never nullptr or empty.
const char* in_vmlinux_path;
+
+ /// The path to the stable list that defines the KMI
+ /// (kernel-module-interface). We provide one of these for DWARF
+ /// tests, otherwise, they take too much time, in general. This
+ /// might be nullptr if none is provided.
+ const char* in_kmi_stablelist_path;
+
+ /// The additional options to pass to abidw. This might be nullptr
+ /// if none is required.
const char* options;
+
+ /// The expected status returned by the abidw tool.
abidiff_status status;
+
+ /// The path to the expected output result file.
const char* in_report_path;
+
+ /// The actual path of the output file. This is going to be emitted
+ /// by the test.
const char* out_report_path;
}; // end struct InOutSpec
@@ -45,7 +69,8 @@ static InOutSpec in_out_specs[] =
{
"data/test-self-compare-linux/test-minimal-ctf-1",
"data/test-self-compare-linux/test-minimal-ctf-1/vmlinux",
- "--ctf --linux-tree --vmlinux ",
+ nullptr,
+ "--ctf",
abigail::tools_utils::ABIDIFF_OK,
"data/test-self-compare-linux/test-minimal-ctf-1/test1-output.txt",
"output/test-self-compare-linux/test-minimal-ctf-1/test1-output.txt"
@@ -54,22 +79,36 @@ static InOutSpec in_out_specs[] =
{
"",
"data/test-self-compare-linux/test-minimal-ctf-1/vmlinux",
- "--ctf --annotate ",
+ nullptr,
+ "--ctf",
abigail::tools_utils::ABIDIFF_OK,
"data/test-self-compare-linux/test-minimal-ctf-1/test1-output.txt",
"output/test-self-compare-linux/test-minimal-ctf-1/test3-output.txt"
},
#endif
+
#if WITH_BTF
{
"data/test-self-compare-linux/test-minimal-ctf-1",
"data/test-self-compare-linux/test-minimal-ctf-1/vmlinux",
- "--btf --linux-tree --vmlinux ",
+ nullptr,
+ "--btf",
abigail::tools_utils::ABIDIFF_OK,
"data/test-self-compare-linux/test-minimal-ctf-1/test1-output.txt",
"output/test-self-compare-linux/test-minimal-ctf-1/test2-output.txt"
},
#endif
+
+ /// DWARF tests go here.
+ {
+ "data/test-self-compare-linux/test-minimal-ctf-1",
+ "data/test-self-compare-linux/test-minimal-ctf-1/vmlinux",
+ "data/test-self-compare-linux/test-minimal-ctf-1/kmi-el94-stablelist-x86_6",
+ nullptr, // DWARF
+ abigail::tools_utils::ABIDIFF_OK,
+ "data/test-self-compare-linux/test-minimal-ctf-1/test1-output.txt",
+ "output/test-self-compare-linux/test-minimal-ctf-1/test3-output.txt"
+ },
{}
};
@@ -81,7 +120,8 @@ main()
string tests_src_dir = string(abigail::tests::get_src_dir()) + "/";
string build_dir = string(abigail::tests::get_build_dir()) + "/";
- string in_kernel_tree_path, in_vmlinux_path, in_test_ouput_path,
+ string in_kernel_tree_path, in_vmlinux_path,
+ in_kmi_stablelist_path, in_test_ouput_path,
out_test_output_path, abidw, cmd, diff_cmd;
unsigned int total_count = 0, passed_count = 0, failed_count = 0;
@@ -93,8 +133,26 @@ main()
in_kernel_tree_path = tests_src_dir + spec->in_kernel_tree_path;
else
in_kernel_tree_path = "";
+
+ // The path to vmlinux must always be non-empty.
+ ABG_ASSERT(spec->in_vmlinux_path != nullptr);
+ ABG_ASSERT(strcmp(spec->in_vmlinux_path, "") != 0);
+
in_vmlinux_path = tests_src_dir + spec->in_vmlinux_path;
+
+ if (spec->in_kmi_stablelist_path && spec->in_kmi_stablelist_path != "")
+ in_kmi_stablelist_path = tests_src_dir + spec->in_kmi_stablelist_path;
+ else
+ in_kmi_stablelist_path = "";
+
+ // Report paths must always be non empty.
+ ABG_ASSERT(spec->in_report_path != nullptr);
+ ABG_ASSERT(strcmp(spec->in_report_path, "") != 0);
+ ABG_ASSERT(spec->out_report_path != nullptr);
+ ABG_ASSERT(strcmp(spec->out_report_path, "") != 0);
+
in_test_ouput_path = tests_src_dir + spec->in_report_path;
+
out_test_output_path = build_dir + spec->out_report_path;
if (!ensure_parent_dir_created(out_test_output_path))
@@ -106,15 +164,21 @@ main()
}
std::ostringstream o;
- o << abidw
- << " --abidiff "
- << spec->options
- << " "
- << in_vmlinux_path
- << " "
- << in_kernel_tree_path
- << " > "
- << out_test_output_path;
+ o << abidw << " --abidiff ";
+
+ if (spec->options && spec->options != "")
+ o << spec->options;
+
+ if (in_kmi_stablelist_path != "")
+ o << " --kmi-stablelist " << in_kmi_stablelist_path;
+
+ if (in_kernel_tree_path != "")
+ o << " --linux-tree --vmlinux " << in_vmlinux_path
+ << " " << in_kernel_tree_path;
+ else
+ o << " " << in_vmlinux_path;
+
+ o << " > " << out_test_output_path;
cmd = o.str();