Re: [Fuego] Adding new test case to fuego

<[email protected]>
Newsgroups dev.linux.lists.fuego
Message-ID <[email protected]>

> -----Original Message-----
> From: Kumar Thangavel
> 
> Hi All,
> 
>           I would like to contribute to fuego framework. So I am planning to add a
> test for "file systems were mounted with correct permissions and
> attributes".
> 
> is this ok to start  or please suggest any good test case/test ideas to start
> working.

Thank you for wanting to contribute to Fuego.

Here is some feedback on your idea.

I think many people would like a simple test that verified that file systems
were mounted correctly.  Something can easily be done using the 'mount'
command, or by looking at mtab.

In order to make this test general-purpose, you will probably want to 
allow the user to hand in board-specific data to the test, that reflects
what their board is supposed to have mounted.  If the comparison
is just done with static code, it will be hard for others to use this test
in their scenario.

Also, you may want to consider whether you want to test all mounted
filesystems, or just the "real" ones (like those of type ext4, nfs, etc.
as opposed to pseudo filesystems of type tmpfs, cgroup, etc., or the
weird snap ones of type squashfs used by Ubuntu).

So you might define multiple test specs (variants), that let the user
choose whether to only check 'real' filesystems, or to check all
filesystems, or filesystems of a particular type.

I have been thinking for a while about how to make it easy for people
to generalize tests for their own use.  I think that the local customization
of tests (with expected values for the local use case) is one of the big 
barriers to people sharing tests.

I've been thinking it would be a good idea to allow the user to provide
data about their expected values.  Also, I think it would be good to 
have a way to very easily update the expected values to ones that
match their configuration of Linux.

One thing I've considered is adding a spec to perform an "expected value update".
What this would do is take the current data from the system, and set the 
expected value for the test to that data.

For example, if  your test had the spec "default", that did a mount command, and
compared with a text file that had the expected results for 'mount', then you could
easily detect if there was a difference in the data.

If your test had another spec "update", that did a mount command, and set the 
expected results from the data that was returned, then the following flow would
allow a user with a different mounted filesystem configuration to use your test:

1) you publish the test with the expected mount configuration for your board
2) another user runs the test and sees errors, because the mount configuration
for their board is different.
3) if the user verifies that their current mount configuration is actually OK, then
4) the user can run the test with the "update" spec, to save their mount configuration
data to the expected data file (saving it into, say, the /fuego-rw/boards/<board>/ directory)
5) the user can then use the test to verify that the mount status of their board(s)
6) the user could potentially publish their expected results, to augment your test,
for other people to use with boards that had a similar configuration as theirs

Does that all make sense?

Please let me know your ideas for making a mounted filesystem verification test.
I'd be happy to discuss with you ideas for making it a nice, generic, reusable test,
and a nice addition to Fuego.
 -- Tim


--------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.