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 2458EC3DA49 for ; Thu, 25 Jul 2024 16:02:04 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id A48733D1CB1 for ; Thu, 25 Jul 2024 18:02:02 +0200 (CEST) Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 76E9F3C9469 for ; Thu, 25 Jul 2024 18:01:46 +0200 (CEST) Authentication-Results: in-6.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.130; helo=smtp-out1.suse.de; envelope-from=mdoucha@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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-6.smtp.seeweb.it (Postfix) with ESMTPS id C9C8914044A2 for ; Thu, 25 Jul 2024 18:01:45 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B902E21A70; Thu, 25 Jul 2024 16:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1721923304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=8E/u4YMjbDrL1opn++ESkW7gXp7NhzK6xdpkw/8eSug=; b=JorNANgRUgxUSKKLF8OdhEyJxrrNlkTSNU3ojAwWjQsWrwSAJfqwtmiwCh+gQbrVmMqr9o 91oB7BCf2Xt5LcwS5o4bPvT0oPOYj8qclmmv39lp1gApIlbk113vyRCLT4OyfpStw8owY4 9L4KgO9WrAQd09YyMkOsp6ZLQJkq4ZE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1721923304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=8E/u4YMjbDrL1opn++ESkW7gXp7NhzK6xdpkw/8eSug=; b=5PKgydB1KcGqZWe6xNnj7XNUdU2Ub/A7+8FIJDMoc/+4FC3+Yz5OL9Pz60TeWG/AIBlOAt ZjV+j8zVWRnEEADA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=JorNANgR; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=5PKgydB1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1721923304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=8E/u4YMjbDrL1opn++ESkW7gXp7NhzK6xdpkw/8eSug=; b=JorNANgRUgxUSKKLF8OdhEyJxrrNlkTSNU3ojAwWjQsWrwSAJfqwtmiwCh+gQbrVmMqr9o 91oB7BCf2Xt5LcwS5o4bPvT0oPOYj8qclmmv39lp1gApIlbk113vyRCLT4OyfpStw8owY4 9L4KgO9WrAQd09YyMkOsp6ZLQJkq4ZE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1721923304; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=8E/u4YMjbDrL1opn++ESkW7gXp7NhzK6xdpkw/8eSug=; b=5PKgydB1KcGqZWe6xNnj7XNUdU2Ub/A7+8FIJDMoc/+4FC3+Yz5OL9Pz60TeWG/AIBlOAt ZjV+j8zVWRnEEADA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9851D1368A; Thu, 25 Jul 2024 16:01:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id oYbFJOh2omapMgAAD6G6ig (envelope-from ); Thu, 25 Jul 2024 16:01:44 +0000 Message-ID: <9066c23e-444e-4975-a3c8-505fbd4b6042@suse.cz> Date: Thu, 25 Jul 2024 18:01:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Petr Vorel References: <20240716153604.22984-1-chrubis@suse.cz> <20240716153604.22984-3-chrubis@suse.cz> <20240725110206.GA982789@pevik> Content-Language: en-US From: Martin Doucha Autocrypt: addr=mdoucha@suse.cz; keydata= xsFNBF1D6M0BEAC5BHC0NuN/v+UBXDYuwuYeAJA4leuKz0H76YBevziJKUtnzMsBA+GT9vdH bs60wdsTbBJ1XqmQ/HWDPBV0OIGox195G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rzABEBAAHCwXwEGAEIACYWIQQVDLGCnz0cKgXPEznziytmREF32QUCXUPozQIb DAUJCWYBgAAKCRDziytmREF32XWvD/0fuW2SC3dOOk1XhHua2JOezT1HQpxyFpCNPESRoL8N J1PCMyDWO4l7NhsAGbqCfA6a7XpsYpD3VC8kIZk/P3JOFM11OSUszK/pSUdiKuaURy6TAxFZ 3FO9OZ016uJuBQ8J9qdpvcGRtNnyL9gOmvSWkUV4mHokJeQ4CFWV5A38vg1EGpR49UOm6RhH LDyXxng1uJ58RuaXRAUvM/RG0vg7O2+4TP/IelhKGIYtNc4louyPZEAjaXJ3eNt4Selo5RFe uCl8/k6dNvUc3ZWUxd5CISdwn0GsVbCBnpYDhPgoCEbP30Sr+Jdo8asicZ3XUhQ0aPFLb7D0 IMfRwEkXUK0LvwnBJ2hTtLZRxrqusibeRSj14j0xAuEsDZD3VbMD7fnlTDSyjdY0ghHygq/5 YchPWWq+T2P32r/hxymkw0EiQptA13TElxj13Pbc2hP+e0SoEKFkHfyb63rik3dlPmxGk5eM Rz4zFhW8KQ9+zrae5rL/6vwz3d/MpEeOmDm9uutE6xyzXRl/RxeFZ8P7KlACXWm7VjSyc74E eCNL6GOOeqzE77fDcBf4HvNGn8w7IX/FvNzmu78wzT2MDwMi8ug8T4KEKzIYUIRibe7cl0LG 2dSj02pOT7E5/x4gKQB/OZqnTTQxJ0OL8BJKNFeSYqaMzKFKiYaArwuFkGnCknwh5A== In-Reply-To: <20240725110206.GA982789@pevik> X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: B902E21A70 X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; MX_GOOD(-0.01)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.cz:+] X-Virus-Scanned: clamav-milter 1.0.3 at in-6.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [RFC PATCH 2/2] testcaes/lib: Add shell loader 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: ltp@lists.linux.it Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" On 25. 07. 24 13:02, Petr Vorel wrote: > Hi Martin, Cyril, > >>> +mounted=$(grep $TST_MNTPOINT /proc/mounts) > >> This check might produce false positive for example when another LTP shell >> script runs in parallel in another temp directory. I'd recommend using >> $(realpath ...) to disambiguate the mountpoints. > > FYI this is just a test, not a library script. > > Also maybe just prepend it with $PWD/ would be enough: > > mounted=$(grep $PWD/$TST_MNTPOINT /proc/mounts) > > (Not to require yet another binary. It's ok to have it here, because developers > have coreutils, but in case it's in the tst_test.sh or its dependencies some > minimal systems might have problem - busybox based embedded systems realpath is > configurable via CONFIG_REALPATH=y. It would help if we specify shell library > dependencies). The test could still get confused by leftover mounts from other tests or failed runs of itself. That'll be annoying to deal with when you try to modify something in the shell loader. I've checked what happens if you mount a filesystem on a mountpoint path that contains symlinks and in that case, /proc/mounts will report the real path. So $(realpath $TST_MNTPOINT) is what you need to search for. Grep might get confused by special characters in the path, though. Another problem is that /proc/mounts converts spaces to octal codes to prevent column parsing issues. -- Martin Doucha mdoucha@suse.cz SW Quality Engineer SUSE LINUX, s.r.o. CORSO IIa Krizikova 148/34 186 00 Prague 8 Czech Republic -- Mailing list info: https://lists.linux.it/listinfo/ltp