From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73E64C433F5 for ; Wed, 22 Dec 2021 10:08:14 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 586DE3C9283 for ; Wed, 22 Dec 2021 11:08:12 +0100 (CET) Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [217.194.8.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3C6363C84C1 for ; Wed, 22 Dec 2021 11:08:02 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id B698D601A71 for ; Wed, 22 Dec 2021 11:08:01 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E1B1721101; Wed, 22 Dec 2021 10:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1640167680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2xud+MCbrHGZdF6dnYs15IJ+mhfyMaM9+S1OrlS42ZI=; b=GFZhUNMacGJg6ErPiY5/Y943vIs2eDNh0tB3eXu3oaiA8wLN86Qrska5MyDoS/yh1Fv1k3 jsGt/64mWkxDKYh3lSsBpcaUCojzYSu/tLLmj+fyUL2Bia4OhwC5T2IWZuR/tSPPiI2FVn MyRL89OnE+g+6bZd2nA1LjtzJ5aI74M= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1640167680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2xud+MCbrHGZdF6dnYs15IJ+mhfyMaM9+S1OrlS42ZI=; b=UToGEJ8A2KECSMVw1GlgWNWxNQf+hwV0Uq0WTLAWo118f7VAfU46uKs/F3pwqr8QDPXDkw 7xRlB+GXO1HGJNDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7A68F13CDA; Wed, 22 Dec 2021 10:08:00 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FOv5HAD5wmExbwAAMHmgww (envelope-from ); Wed, 22 Dec 2021 10:08:00 +0000 Date: Wed, 22 Dec 2021 11:09:32 +0100 From: Cyril Hrubis To: Li Wang Message-ID: References: <20211221193500.31950-1-pvorel@suse.cz> <61C28CB8.3050209@fujitsu.com> <61C2C02A.90104@fujitsu.com> <61C2E3DB.9070004@fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Virus-Scanned: clamav-milter 0.102.4 at in-2.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH 1/1] lib: Skip tst_{disable, enable}_oom_protection() for non-root X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Palethorpe , "ltp@lists.linux.it" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi! > > >>> This is not working as expected in Github CI. I'm still looking at the > > >>> problem. > > >>> > > https://github.com/wangli5665/ltp/runs/4602025797?check_suite_focus=true > > >> I tested local but it works well. I guess ci fails because of linux user > > >> namespace. Maybe we should require CAP_SYS_RESOURCE cap instead of using > > >> geteuid. > > > Good catch, verifying. > > You can refer to my ltp fork > > https://github.com/xuyang0410/ltp/commits/oom_kill_ci_fixes > > > +1 > > I was thinking of adding the permission but that's > might not be a good way for the namespace. Like your > method which only does check and return is better. Wouldn't it be actually easier just to catch the error from the actual write? The whole problem here is that we use SAFE_PRINTF() on something that may actualy fail and the failure shouldn't be fatal at all. -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp