Linux 4.13.2
Greg KH
maintainerI'm announcing the release of the 4.13.2 kernel.
All users of the 4.13 kernel series must upgrade.
The updated 4.13.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.13.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/driver-api/firmware/request_firmware.rst | 11 - Makefile | 2 arch/arm/mm/fault.c | 5 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 1 arch/x86/kvm/mmu.c | 3 drivers/base/firmware_class.c | 99 ---------- drivers/mtd/nand/mxc_nand.c | 7 drivers/mtd/nand/nand_base.c | 7 drivers/mtd/nand/nand_hynix.c | 4 drivers/mtd/nand/qcom_nandc.c | 18 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 5 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 5 drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 23 +- drivers/nvme/host/fabrics.c | 2 fs/btrfs/super.c | 2 fs/nfs/file.c | 6 fs/nfs/internal.h | 1 fs/nfs/pagelist.c | 99 +++++----- fs/nfs/pnfs.c | 2 fs/xfs/xfs_linux.h | 9 lib/radix-tree.c | 9 mm/memory.c | 10 - mm/sparse.c | 2 mm/swapfile.c | 3 net/bluetooth/l2cap_core.c | 80 ++++---- tools/testing/selftests/timers/Makefile | 26 +- tools/testing/selftests/timers/leap-a-day.c | 17 - tools/testing/selftests/x86/fsgsbase.c | 41 +++- 29 files changed, 236 insertions(+), 266 deletions(-)
Abhishek Sahu (2):
mtd: nand: qcom: fix read failure without complete bootchain
mtd: nand: qcom: fix config error for BCH
Aleksa Sarai (1):
btrfs: resume qgroup rescan on rw remount
Andy Lutomirski (1):
selftests/x86/fsgsbase: Test selectors 1, 2, and 3
Ben Seri (1):
Bluetooth: Properly check L2CAP config option output buffer length
Boris Brezillon (1):
mtd: nand: mxc: Fix mxc_v1 ooblayout
Brijesh Singh (1):
KVM: SVM: Limit PFERR_NESTED_GUEST_PAGE error_code check to L1 guest
Daniel Verkamp (1):
nvme-fabrics: generate spec-compliant UUID NQNs
Darrick J. Wong (1):
mm: kvfree the swap cluster info if the swap file is unsatisfactory
David Rientjes (1):
mm/swapfile.c: fix swapon frontswap_map memory leak on error
Eric Dumazet (1):
radix-tree: must check __radix_tree_preload() return value
Greg Kroah-Hartman (1):
Linux 4.13.2
Ian W MORRISON (1):
brcmfmac: feature check for multi-scheduled scan fails on bcm4345 devices
John Stultz (1):
kselftests: timers: leap-a-day: Change default arguments to help test runs
Larry Finger (2):
rtlwifi: btcoexist: Fix breakage of ant_sel for rtl8723be
rtlwifi: btcoexist: Fix antenna selection code
Laurent Dufour (1):
mm/memory.c: fix mem_cgroup_oom_disable() call missing
Linus Torvalds (1):
Revert "firmware: add sanity check on shutdown/suspend"
Lothar Waßmann (1):
mtd: nand: make Samsung SLC NAND usable again
Marc Zyngier (1):
ARM64: dts: marvell: armada-37xx: Fix GIC maintenance interrupt
Mark Rutland (1):
ARM: 8692/1: mm: abort uaccess retries upon fatal signal
Martin Blumenstingl (1):
mtd: nand: hynix: add support for 20nm NAND chips
Michal Hocko (1):
mm/sparse.c: fix typo in online_mem_sections
Richard Wareing (1):
xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present
Shuah Khan (1):
selftests: timers: Fix run_destructive_tests target to handle skipped tests
Stanislaw Gruszka (1):
rt2800: fix TX_PIN_CFG setting for non MT7620 chips
Trond Myklebust (2):
NFS: Fix 2 use after free issues in the I/O code
NFSv4: Fix up mirror allocation
[email protected] (1):
NFS: Sync the correct byte range during synchronous writes
Greg KH
maintainerDocumentation/driver-api/firmware/request_firmware.rst +0 -11
@@ -44,17 +44,6 @@ request_firmware_nowait .. kernel-doc:: drivers/base/firmware_class.c :functions: request_firmware_nowait -Considerations for suspend and resume -===================================== - -During suspend and resume only the built-in firmware and the firmware cache -elements of the firmware API can be used. This is managed by fw_pm_notify(). - -fw_pm_notify ------------- -.. kernel-doc:: drivers/base/firmware_class.c - :functions: fw_pm_notify - request firmware API expected driver use ========================================
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 13 -SUBLEVEL = 1 +SUBLEVEL = 2 EXTRAVERSION = NAME = Fearless Coyote
arch/arm/mm/fault.c +4 -1
@@ -315,8 +315,11 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)* signal first. We do not need to release the mmap_sem because * it would already be released in __lock_page_or_retry in * mm/filemap.c. */ -if ((fault &VM_FAULT_RETRY ) &&fatal_signal_pending (current)) +if ((fault &VM_FAULT_RETRY ) &&fatal_signal_pending (current)) { +if (!user_mode (regs)) + goto no_context;return 0 ; + }/* * Major/minor page fault accounting is only done on the
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -0
@@ -323,6 +323,7 @@ interrupt-controller; reg = <0x1d00000 0x10000>, /* GICD */ <0x1d40000 0x40000>; /* GICR */ + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; };
arch/x86/kvm/mmu.c +2 -1
@@ -4839,7 +4839,8 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u64 error_code,* Note: AMD only (since it supports the PFERR_GUEST_PAGE_MASK used * in PFERR_NEXT_GUEST_PAGE) */ -if (error_code ==PFERR_NESTED_GUEST_PAGE ) { +if (vcpu->arch.mmu.direct_map && + error_code ==PFERR_NESTED_GUEST_PAGE ) {kvm_mmu_unprotect_page (vcpu->kvm,gpa_to_gfn (cr2));return 1 ; }
drivers/base/firmware_class.c +0 -99
147 lines not on this page · raw message
drivers/mtd/nand/mxc_nand.c +4 -3
@@ -876,6 +876,8 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) } } +#define MXC_V1_ECCBYTES 5 +static int mxc_v1_ooblayout_ecc (struct mtd_info *mtd,int section,struct mtd_oob_region *oobregion) {
@@ -885,7 +887,7 @@ static int mxc_v1_ooblayout_ecc(struct mtd_info *mtd, int section,return -ERANGE ; oobregion->offset = (section *16 ) +6 ; - oobregion->length = nand_chip->ecc.bytes; + oobregion->length =MXC_V1_ECCBYTES ;return 0 ; }
@@ -907,8 +909,7 @@ static int mxc_v1_ooblayout_free(struct mtd_info *mtd, int section, oobregion->length =4 ; } }else { - oobregion->offset = ((section -1 ) *16 ) + - nand_chip->ecc.bytes +6 ; + oobregion->offset = ((section -1 ) *16 ) +MXC_V1_ECCBYTES +6 ;if (section < nand_chip->ecc.steps) oobregion->length = (section *16 ) +6 - oobregion->offset;
drivers/mtd/nand/nand_base.c +5 -2
@@ -3993,10 +3993,13 @@ static void nand_manufacturer_detect(struct nand_chip *chip)* nand_decode_ext_id() otherwise. */ if (chip->manufacturer.desc && chip->manufacturer.desc->ops && - chip->manufacturer.desc->ops->detect) + chip->manufacturer.desc->ops->detect) { +/* The 3rd id byte holds MLC / multichip data */ + chip->bits_per_cell =nand_get_bits_per_cell (chip->id.data[2 ]); chip->manufacturer.desc->ops->detect (chip); -else + }else {nand_decode_ext_id (chip); + } }/*
drivers/mtd/nand/nand_hynix.c +2 -2
@@ -477,7 +477,7 @@ static void hynix_nand_extract_ecc_requirements(struct nand_chip *chip,* The ECC requirements field meaning depends on the * NAND technology. */ -u8 nand_tech = chip->id.data[5 ] &0x3 ; +u8 nand_tech = chip->id.data[5 ] &0x7 ;if (nand_tech <3 ) {/* > 26nm, reference: H27UBG8T2A datasheet */
@@ -533,7 +533,7 @@ static void hynix_nand_extract_scrambling_requirements(struct nand_chip *chip,if (nand_tech >0 ) chip->options |=NAND_NEED_SCRAMBLING ; }else { - nand_tech = chip->id.data[5 ] &0x3 ; + nand_tech = chip->id.data[5 ] &0x7 ;/* < 32nm */ if (nand_tech >2 )
drivers/mtd/nand/qcom_nandc.c +13 -5
@@ -109,7 +109,11 @@#define READ_ADDR 0/* NAND_DEV_CMD_VLD bits */ -#define READ_START_VLD 0 +#define READ_START_VLD BIT(0) +#define READ_STOP_VLD BIT(1) +#define WRITE_START_VLD BIT(2) +#define ERASE_START_VLD BIT(3) +#define SEQ_READ_START_VLD BIT(4)/* NAND_EBI2_ECC_BUF_CFG bits */ #define NUM_STEPS 0
@@ -148,6 +152,10 @@#define FETCH_ID 0xb#define RESET_DEVICE 0xd +/* Default Value for NAND_DEV_CMD_VLD */ +#define NAND_DEV_CMD_VLD_VAL (READ_START_VLD | WRITE_START_VLD | \ + ERASE_START_VLD | SEQ_READ_START_VLD) +/* * the NAND controller performs reads/writes with ECC in 516 byte chunks. * the driver calls the chunks 'step' or 'codeword' interchangeably
@@ -672,8 +680,7 @@ static int nandc_param(struct qcom_nand_host *host)/* configure CMD1 and VLD for ONFI param probing */ nandc_set_reg (nandc,NAND_DEV_CMD_VLD , - (nandc->vld & ~(1 <<READ_START_VLD )) - |0 <<READ_START_VLD ); + (nandc->vld & ~READ_START_VLD ));nandc_set_reg (nandc,NAND_DEV_CMD1 , (nandc->cmd1 & ~(0xFF <<READ_ADDR )) |NAND_CMD_PARAM <<READ_ADDR );
@@ -1893,7 +1900,7 @@ static int qcom_nand_host_setup(struct qcom_nand_host *host) | wide_bus << WIDE_FLASH |1 <<DEV0_CFG1_ECC_DISABLE ; - host->ecc_bch_cfg = host->bch_enabled <<ECC_CFG_ECC_DISABLE + host->ecc_bch_cfg = !host->bch_enabled <<ECC_CFG_ECC_DISABLE |0 <<ECC_SW_RESET | host->cw_data <<ECC_NUM_DATA_BYTES |1 <<ECC_FORCE_CLK_OPEN
@@ -1972,13 +1979,14 @@ static int qcom_nandc_setup(struct qcom_nand_controller *nandc) {/* kill onenand */ nandc_write (nandc,SFLASHC_BURST_CFG ,0 ); +nandc_write (nandc,NAND_DEV_CMD_VLD ,NAND_DEV_CMD_VLD_VAL );/* enable ADM DMA */ nandc_write (nandc,NAND_FLASH_CHIP_SELECT ,DM_EN );/* save the original values of these registers */ nandc->cmd1 =nandc_read (nandc,NAND_DEV_CMD1 ); - nandc->vld =nandc_read (nandc,NAND_DEV_CMD_VLD ); + nandc->vld =NAND_DEV_CMD_VLD_VAL ;return 0 ; }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +2 -1
@@ -159,7 +159,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)brcmf_feat_firmware_capabilities (ifp);memset (&gscan_cfg,0 ,sizeof (gscan_cfg)); -if (drvr->bus_if->chip !=BRCM_CC_43430_CHIP_ID ) +if (drvr->bus_if->chip !=BRCM_CC_43430_CHIP_ID && + drvr->bus_if->chip !=BRCM_CC_4345_CHIP_ID )brcmf_feat_iovar_data_set (ifp,BRCMF_FEAT_GSCAN ,"pfn_gscan_cfg" , &gscan_cfg,sizeof (gscan_cfg));
drivers/net/wireless/ralink/rt2x00/rt2800lib.c +4 -1
@@ -3702,7 +3702,10 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,if (rt2x00_rt (rt2x00dev,RT3572 ))rt2800_rfcsr_write (rt2x00dev,8 ,0 ); - tx_pin =rt2800_register_read (rt2x00dev,TX_PIN_CFG ); +if (rt2x00_rt (rt2x00dev,RT6352 )) + tx_pin =rt2800_register_read (rt2x00dev,TX_PIN_CFG ); +else + tx_pin =0 ;switch (rt2x00dev->default_ant.tx_chain_num) {case 3 :
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +4 -1
@@ -1183,7 +1183,10 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, }/* fixed internal switch S1->WiFi, S0->BT */ - btcoexist->btc_write_4byte (btcoexist,0x948 ,0x0 ); +if (board_info->btdm_ant_pos ==BTC_ANTENNA_AT_MAIN_PORT ) + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x0 ); +else + btcoexist->btc_write_2byte (btcoexist,0x948 ,0x280 );switch (antpos_type) {case BTC_ANT_WIFI_AT_MAIN :
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +16 -7
@@ -173,6 +173,16 @@ static u8 halbtc_get_wifi_central_chnl(struct btc_coexist *btcoexist)u8 rtl_get_hwpg_single_ant_path (struct rtl_priv *rtlpriv) { +struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params; + +/* override ant_num / ant_path */ +if (mod_params->ant_sel) { + rtlpriv->btcoexist.btc_info.ant_num = + (mod_params->ant_sel ==1 ?ANT_X2 :ANT_X1 ); + + rtlpriv->btcoexist.btc_info.single_ant_path = + (mod_params->ant_sel ==1 ?0 :1 ); + }return rtlpriv->btcoexist.btc_info.single_ant_path; }
@@ -183,6 +193,7 @@ u8 rtl_get_hwpg_bt_type(struct rtl_priv *rtlpriv)u8 rtl_get_hwpg_ant_num (struct rtl_priv *rtlpriv) { +struct rtl_mod_params *mod_params = rtlpriv->cfg->mod_params;u8 num;if (rtlpriv->btcoexist.btc_info.ant_num ==ANT_X2 )
@@ -190,6 +201,10 @@ u8 rtl_get_hwpg_ant_num(struct rtl_priv *rtlpriv)else num =1 ; +/* override ant_num / ant_path */ +if (mod_params->ant_sel) + num = (mod_params->ant_sel ==1 ?ANT_X2 :ANT_X1 ) +1 ; +return num; }
@@ -861,7 +876,7 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) {struct btc_coexist *btcoexist = &gl_bt_coexist;struct rtl_priv *rtlpriv = adapter; -u8 ant_num =2 , chip_type, single_ant_path =0 ; +u8 ant_num =2 , chip_type;if (btcoexist->binded)return false;
@@ -896,12 +911,6 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) ant_num =rtl_get_hwpg_ant_num (rtlpriv);exhalbtc_set_ant_num (rtlpriv,BT_COEX_ANT_TYPE_PG , ant_num); -/* set default antenna position to main port */ - btcoexist->board_info.btdm_ant_pos =BTC_ANTENNA_AT_MAIN_PORT ; - - single_ant_path =rtl_get_hwpg_single_ant_path (rtlpriv); -exhalbtc_set_single_ant_path (single_ant_path); -if (rtl_get_hwpg_package_type (rtlpriv) ==0 ) btcoexist->board_info.tfbga_package = false;else if (rtl_get_hwpg_package_type (rtlpriv) ==1 )
drivers/nvme/host/fabrics.c +1 -1
@@ -75,7 +75,7 @@ static struct nvmf_host *nvmf_host_default(void)kref_init (&host->ref);snprintf (host->nqn,NVMF_NQN_SIZE , -"nqn.2014-08.org.nvmexpress:NVMf:uuid:%pUb" , &host->id); +"nqn.2014-08.org.nvmexpress:uuid:%pUb" , &host->id);mutex_lock (&nvmf_hosts_mutex);list_add_tail (&host->list, &nvmf_hosts);
fs/btrfs/super.c +2 -0
@@ -1814,6 +1814,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) goto restore; } +btrfs_qgroup_rescan_resume (fs_info); +if (!fs_info->uuid_root) {btrfs_info (fs_info,"creating UUID tree" ); ret =btrfs_create_uuid_tree (fs_info);
fs/nfs/file.c +3 -3
@@ -631,11 +631,11 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)if (result <=0 ) goto out; - result =generic_write_sync (iocb, result); -if (result <0 ) - goto out; written = result; iocb->ki_pos += written; + result =generic_write_sync (iocb, written); +if (result <0 ) + goto out;/* Return error values */ if (nfs_need_check_write (file, inode)) {
fs/nfs/internal.h +0 -1
@@ -251,7 +251,6 @@ int nfs_iocounter_wait(struct nfs_lock_context *l_ctx);extern const struct nfs_pageio_ops nfs_pgio_rw_ops;struct nfs_pgio_header *nfs_pgio_header_alloc (const struct nfs_rw_ops *);void nfs_pgio_header_free (struct nfs_pgio_header *); -void nfs_pgio_data_destroy (struct nfs_pgio_header *);int nfs_generic_pgio (struct nfs_pageio_descriptor *,struct nfs_pgio_header *); int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr, struct rpc_cred *cred, const struct nfs_rpc_ops *rpc_ops,
fs/nfs/pagelist.c +51 -48
157 lines not on this page · raw message
fs/nfs/pnfs.c +0 -2
@@ -2274,7 +2274,6 @@ pnfs_write_through_mds(struct nfs_pageio_descriptor *desc,nfs_pageio_reset_write_mds (desc); mirror->pg_recoalesce =1 ; } -nfs_pgio_data_destroy (hdr); hdr->release (hdr); }
@@ -2398,7 +2397,6 @@ pnfs_read_through_mds(struct nfs_pageio_descriptor *desc,nfs_pageio_reset_read_mds (desc); mirror->pg_recoalesce =1 ; } -nfs_pgio_data_destroy (hdr); hdr->release (hdr); }
fs/xfs/xfs_linux.h +8 -1
@@ -270,7 +270,14 @@ static inline uint64_t howmany_64(uint64_t x, uint32_t y)#endif /* DEBUG */ #ifdef CONFIG_XFS_RT -#define XFS_IS_REALTIME_INODE (ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) + +/* +* make sure we ignore the inode flag if the filesystem doesn't have a +* configured realtime device. +*/ +#define XFS_IS_REALTIME_INODE (ip) \ + (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) && \ + (ip)->i_mount->m_rtdev_targp)#else #define XFS_IS_REALTIME_INODE (ip) (0)#endif
lib/radix-tree.c +5 -4
@@ -463,7 +463,7 @@ radix_tree_node_free(struct radix_tree_node *node)* To make use of this facility, the radix tree must be initialised without * __GFP_DIRECT_RECLAIM being passed to INIT_RADIX_TREE(). */ -static int __radix_tree_preload (gfp_t gfp_mask,unsigned nr) +static __must_check int __radix_tree_preload (gfp_t gfp_mask,unsigned nr) {struct radix_tree_preload *rtp;struct radix_tree_node *node;
@@ -2103,7 +2103,8 @@ EXPORT_SYMBOL(radix_tree_tagged);*/ void idr_preload (gfp_t gfp_mask) { -__radix_tree_preload (gfp_mask,IDR_PRELOAD_SIZE ); +if (__radix_tree_preload (gfp_mask,IDR_PRELOAD_SIZE )) +preempt_disable (); }EXPORT_SYMBOL (idr_preload);
@@ -2117,13 +2118,13 @@ EXPORT_SYMBOL(idr_preload);*/ int ida_pre_get (struct ida *ida,gfp_t gfp) { -__radix_tree_preload (gfp,IDA_PRELOAD_SIZE );/* * The IDA API has no preload_end() equivalent. Instead, * ida_get_new() can return -EAGAIN, prompting the caller * to return to the ida_pre_get() step. */ -preempt_enable (); +if (!__radix_tree_preload (gfp,IDA_PRELOAD_SIZE )) +preempt_enable ();if (!this_cpu_read (ida_bitmap)) {struct ida_bitmap *bitmap =kmalloc (sizeof (*bitmap), gfp);
mm/memory.c +5 -5
@@ -3888,6 +3888,11 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,/* do counter updates before entering really critical section. */ check_sync_rss_stat (current); +if (!arch_vma_access_permitted (vma, flags &FAULT_FLAG_WRITE , + flags &FAULT_FLAG_INSTRUCTION , + flags &FAULT_FLAG_REMOTE )) +return VM_FAULT_SIGSEGV ; +/* * Enable the memcg OOM handling for faults triggered in user * space. Kernel faults are handled more gracefully.
@@ -3895,11 +3900,6 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,if (flags &FAULT_FLAG_USER )mem_cgroup_oom_enable (); -if (!arch_vma_access_permitted (vma, flags &FAULT_FLAG_WRITE , - flags &FAULT_FLAG_INSTRUCTION , - flags &FAULT_FLAG_REMOTE )) -return VM_FAULT_SIGSEGV ; -if (unlikely (is_vm_hugetlb_page (vma))) ret =hugetlb_fault (vma->vm_mm, vma, address, flags);else
mm/sparse.c +1 -1
@@ -630,7 +630,7 @@ void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn)unsigned long pfn;for (pfn = start_pfn; pfn < end_pfn; pfn +=PAGES_PER_SECTION ) { -unsigned long section_nr =pfn_to_section_nr (start_pfn); +unsigned long section_nr =pfn_to_section_nr (pfn);struct mem_section *ms;/* onlining code should never touch invalid ranges */
mm/swapfile.c +2 -1
@@ -3052,7 +3052,8 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) p->flags =0 ;spin_unlock (&swap_lock);vfree (swap_map); -vfree (cluster_info); +kvfree (cluster_info); +kvfree (frontswap_map);if (swap_file) {if (inode &&S_ISREG (inode->i_mode)) {inode_unlock (inode);
net/bluetooth/l2cap_core.c +43 -37
304 lines not on this page · raw message
tools/testing/selftests/timers/Makefile +13 -13
@@ -14,20 +14,20 @@ TEST_GEN_PROGS_EXTENDED = alarmtimer-suspend valid-adjtimex adjtick change_skew include ../lib.mk +define RUN_DESTRUCTIVE_TESTS + @for TEST in $(TEST_GEN_PROGS_EXTENDED); do \ + BASENAME_TEST=`basename $$TEST`; \ + if [ ! -x $$BASENAME_TEST ]; then \ + echo "selftests: Warning: file $$BASENAME_TEST is not executable, correct this.";\ + echo "selftests: $$BASENAME_TEST [FAIL]"; \ + else \ + cd `dirname $$TEST`; (./$$BASENAME_TEST && echo "selftests: $$BASENAME_TEST [PASS]") || echo "selftests: $$BASENAME_TEST [FAIL]"; cd -;\ + fi; \ + done; +endef + # these tests require escalated privileges # and may modify the system time or trigger # other behavior like suspend run_destructive_tests: run_tests - ./alarmtimer-suspend - ./valid-adjtimex - ./adjtick - ./change_skew - ./skew_consistency - ./clocksource-switch - ./freq-step - ./leap-a-day -s -i 10 - ./leapcrash - ./set-tz - ./set-tai - ./set-2038 - + $(RUN_DESTRUCTIVE_TESTS)
tools/testing/selftests/timers/leap-a-day.c +9 -8
@@ -190,18 +190,18 @@ int main(int argc, char **argv)struct sigevent se;struct sigaction act;int signum =SIGRTMAX ; -int settime =0 ; +int settime =1 ;int tai_time =0 ;int insert =1 ; -int iterations =-1 ; +int iterations =10 ;int opt;/* Process arguments */ while ((opt =getopt (argc, argv,"sti:" )) !=-1 ) {switch (opt) { -case 's' : -printf ("Setting time to speed up testing\n" ); - settime =1 ; +case 'w' : +printf ("Only setting leap-flag, not changing time. It could take up to a day for leap to trigger.\n" ); + settime =0 ;break ;case 'i' : iterations =atoi (optarg);
@@ -210,9 +210,10 @@ int main(int argc, char **argv) tai_time =1 ;break ;default : -printf ("Usage: %s [-s] [-i <iterations>]\n" , argv[0 ]); -printf (" -s: Set time to right before leap second each iteration\n" ); -printf (" -i: Number of iterations\n" ); +printf ("Usage: %s [-w] [-i <iterations>]\n" , argv[0 ]); +printf (" -w: Set flag and wait for leap second each iteration" ); +printf (" (default sets time to right before leapsecond)\n" ); +printf (" -i: Number of iterations (-1 = infinite, default is 10)\n" );printf (" -t: Print TAI time\n" );exit (-1 ); }
tools/testing/selftests/x86/fsgsbase.c +35 -6
76 lines not on this page · raw message