From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Tue, 29 Aug 2017 12:16:28 +0200 Subject: [LTP] [RFC][PATCH 1/2] libltp: add support to mount tmpfs In-Reply-To: <20170829001126.142076-2-sspatil@google.com> References: <20170829001126.142076-1-sspatil@google.com> <20170829001126.142076-2-sspatil@google.com> Message-ID: <20170829101627.GA31839@rei.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > Some tests go through losetup, create, format and mount > filesystems only to run tests for 'EROFS' return value from > system calls. The tests end up being flaky depending on the tools > available on the platform. e.g. mkfs. tool is required for > mounting a device with filesystem. > > If the test is only to check for EROFS, this can be achieved by simply > doing a 'tmpfs' read-only mount in $tmpdir. Using tmpfs for EROFS sounds like a good idea, that should be much faster than loop device as well, but there is a catch. There most likely are embedded Linux devices that do not have tmpfs support compiled in and as it is this would break these testcases on such platforms. What about we created even more high-level interface for this? For instance we can add .needs_rofs flag to the tst_test structure (reuse the mntpoint to mount it) and let the library handle the details. I.e. go for tmpfs and if that fails fall back to loop mounted device. -- Cyril Hrubis chrubis@suse.cz