testsuite: add test for install-commands loop

This loop is similar to the one that comes with install rules of
alsa-utils package. It can be easily verified by reverting commit
abd5557 and running the testsuite.
This commit is contained in:
Lucas De Marchi 2012-06-06 01:44:23 -03:00
parent 34db3f2d3e
commit 01d9ee642d
12 changed files with 167 additions and 0 deletions

View File

@ -0,0 +1 @@
install snd $MODPROBE --ignore-install snd && { $MODPROBE --quiet snd-ioctl32 ; $MODPROBE --quiet snd-pcm ; }

View File

@ -0,0 +1,2 @@
# Aliases extracted from modules themselves.
alias char-major-116-* snd

View File

@ -0,0 +1,2 @@
kernel/sound/core/snd.ko.gz:
kernel/sound/core/snd-pcm.ko.gz: kernel/sound/core/snd.ko.gz

View File

@ -0,0 +1 @@
# Device nodes to trigger on-demand module loading.

View File

@ -0,0 +1,2 @@
# Soft dependencies extracted from modules themselves.
# Copy, with a .conf extension, to /etc/modprobe.d to use it with modprobe.

View File

@ -0,0 +1,133 @@
# Aliases for symbols, used by symbol_request().
alias symbol:copy_from_user_toio snd
alias symbol:snd_kctl_jack_new snd
alias symbol:snd_pcm_hw_constraint_minmax snd_pcm
alias symbol:snd_ctl_register_ioctl_compat snd
alias symbol:snd_pcm_period_elapsed snd_pcm
alias symbol:snd_pcm_format_linear snd_pcm
alias symbol:snd_pcm_format_big_endian snd_pcm
alias symbol:snd_request_card snd
alias symbol:snd_pcm_lib_ioctl snd_pcm
alias symbol:snd_add_device_sysfs_file snd
alias symbol:snd_card_proc_new snd
alias symbol:snd_ctl_boolean_stereo_info snd
alias symbol:snd_unregister_oss_device snd
alias symbol:snd_card_free snd
alias symbol:snd_pcm_sgbuf_ops_page snd_pcm
alias symbol:snd_pcm_new_stream snd_pcm
alias symbol:snd_card_create snd
alias symbol:snd_card_register snd
alias symbol:snd_ctl_free_one snd
alias symbol:snd_register_device_for_dev snd
alias symbol:snd_lookup_oss_minor_data snd
alias symbol:snd_pcm_hw_constraint_step snd_pcm
alias symbol:snd_seq_root snd
alias symbol:snd_pcm_new snd_pcm
alias symbol:snd_card_set_id snd
alias symbol:snd_info_register snd
alias symbol:snd_pcm_lib_preallocate_pages snd_pcm
alias symbol:snd_pcm_hw_rule_noresample snd_pcm
alias symbol:snd_ctl_remove snd
alias symbol:snd_pcm_lib_read snd_pcm
alias symbol:snd_pcm_mmap_data snd_pcm
alias symbol:snd_pcm_hw_constraint_list snd_pcm
alias symbol:snd_oss_info_register snd
alias symbol:snd_dma_pointer snd
alias symbol:snd_ctl_new1 snd
alias symbol:snd_interval_ratnum snd_pcm
alias symbol:snd_pcm_release_substream snd_pcm
alias symbol:snd_pcm_suspend_all snd_pcm
alias symbol:snd_ctl_register_ioctl snd
alias symbol:snd_ctl_rename_id snd
alias symbol:snd_card_file_add snd
alias symbol:snd_pcm_limit_hw_rates snd_pcm
alias symbol:snd_jack_set_parent snd
alias symbol:snd_pcm_format_width snd_pcm
alias symbol:snd_jack_new snd
alias symbol:snd_ctl_make_virtual_master snd
alias symbol:snd_jack_report snd
alias symbol:snd_pcm_format_little_endian snd_pcm
alias symbol:snd_ctl_notify snd
alias symbol:snd_pcm_set_sync snd_pcm
alias symbol:snd_component_add snd
alias symbol:_snd_ctl_add_slave snd
alias symbol:snd_device_register snd
alias symbol:snd_iprintf snd
alias symbol:snd_pcm_lib_default_mmap snd_pcm
alias symbol:_snd_pcm_hw_params_any snd_pcm
alias symbol:snd_card_file_remove snd
alias symbol:snd_ctl_replace snd
alias symbol:snd_pcm_link_rwlock snd_pcm
alias symbol:snd_info_get_line snd
alias symbol:snd_ctl_activate_id snd
alias symbol:snd_pcm_format_signed snd_pcm
alias symbol:snd_pcm_open_substream snd_pcm
alias symbol:snd_dma_disable snd
alias symbol:snd_pcm_set_ops snd_pcm
alias symbol:release_and_free_resource snd
alias symbol:snd_ecards_limit snd
alias symbol:snd_pcm_hw_param_value snd_pcm
alias symbol:snd_cards snd
alias symbol:snd_device_free snd
alias symbol:snd_dma_program snd
alias symbol:snd_interval_refine snd_pcm
alias symbol:snd_pcm_lib_preallocate_free_for_all snd_pcm
alias symbol:snd_pcm_hw_constraint_msbits snd_pcm
alias symbol:snd_pcm_lib_mmap_iomem snd_pcm
alias symbol:snd_pcm_lib_get_vmalloc_page snd_pcm
alias symbol:snd_pcm_suspend snd_pcm
alias symbol:snd_pcm_format_unsigned snd_pcm
alias symbol:snd_card_free_when_closed snd
alias symbol:snd_ctl_unregister_ioctl_compat snd
alias symbol:snd_interval_list snd_pcm
alias symbol:snd_pcm_lib_malloc_pages snd_pcm
alias symbol:snd_unregister_device snd
alias symbol:snd_pcm_lib_readv snd_pcm
alias symbol:snd_pcm_hw_constraint_ratnums snd_pcm
alias symbol:snd_pcm_hw_constraint_ratdens snd_pcm
alias symbol:snd_major snd
alias symbol:copy_to_user_fromio snd
alias symbol:snd_pcm_format_name snd_pcm
alias symbol:snd_pcm_lib_preallocate_pages_for_all snd_pcm
alias symbol:snd_ctl_add snd
alias symbol:snd_info_create_card_entry snd
alias symbol:snd_pcm_hw_rule_add snd_pcm
alias symbol:snd_pcm_lib_writev snd_pcm
alias symbol:snd_pcm_format_set_silence snd_pcm
alias symbol:snd_pcm_hw_param_last snd_pcm
alias symbol:snd_card_disconnect snd
alias symbol:snd_info_get_str snd
alias symbol:snd_lookup_minor_data snd
alias symbol:snd_pci_quirk_lookup_id snd
alias symbol:snd_pcm_rate_to_rate_bit snd_pcm
alias symbol:snd_pcm_lib_free_vmalloc_buffer snd_pcm
alias symbol:snd_pcm_format_silence_64 snd_pcm
alias symbol:snd_pcm_sgbuf_get_chunk_size snd_pcm
alias symbol:snd_pci_quirk_lookup snd
alias symbol:snd_pcm_notify snd_pcm
alias symbol:_snd_pcm_hw_param_setempty snd_pcm
alias symbol:snd_power_wait snd
alias symbol:snd_pcm_hw_constraint_pow2 snd_pcm
alias symbol:snd_register_oss_device snd
alias symbol:snd_ctl_find_numid snd
alias symbol:snd_pcm_kernel_ioctl snd_pcm
alias symbol:snd_pcm_hw_constraint_integer snd_pcm
alias symbol:snd_pcm_lib_write snd_pcm
alias symbol:snd_kctl_jack_report snd
alias symbol:snd_pcm_lib_free_pages snd_pcm
alias symbol:snd_pcm_hw_param_first snd_pcm
alias symbol:snd_ctl_enum_info snd
alias symbol:snd_jack_set_key snd
alias symbol:snd_device_new snd
alias symbol:snd_ctl_find_id snd
alias symbol:snd_pcm_hw_refine snd_pcm
alias symbol:snd_ctl_boolean_mono_info snd
alias symbol:snd_mixer_oss_notify_callback snd
alias symbol:snd_pcm_format_size snd_pcm
alias symbol:snd_pcm_format_physical_width snd_pcm
alias symbol:snd_info_free_entry snd
alias symbol:snd_ctl_remove_id snd
alias symbol:_snd_pcm_lib_alloc_vmalloc_buffer snd_pcm
alias symbol:snd_pcm_stop snd_pcm
alias symbol:snd_ctl_unregister_ioctl snd
alias symbol:snd_info_create_module_entry snd

View File

@ -108,11 +108,37 @@ static DEFINE_TEST(modprobe_softdep_loop,
[TC_INIT_MODULE_RETCODES] = "",
});
static __noreturn int modprobe_install_cmd_loop(const struct test *t)
{
const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
const char *const args[] = {
progname,
"snd-pcm",
NULL,
};
test_spawn_prog(progname, args);
exit(EXIT_FAILURE);
}
static DEFINE_TEST(modprobe_install_cmd_loop,
.description = "check if modprobe breaks softdep loop",
.config = {
[TC_UNAME_R] = "4.4.4",
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/install-cmd-loop",
[TC_INIT_MODULE_RETCODES] = "",
},
.env_vars = (const struct keyval[]) {
{ "MODPROBE", ABS_TOP_BUILDDIR "/tools/modprobe" },
{ }
},
);
static const struct test *tests[] = {
&smodprobe_show_depends,
&smodprobe_show_depends2,
&smodprobe_builtin,
&smodprobe_softdep_loop,
&smodprobe_install_cmd_loop,
NULL,
};