[LU-8603] improve metadata-updates.sh with sub-tests Created: 12/Sep/16  Updated: 19/Apr/17  Resolved: 19/Apr/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.9.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Saurabh Tandan (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-8446 metadata-updates: FAIL: wrong timestamps Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Currently, there are no sub-tests in metadata-updates.sh, which causes test failure logs are not gathered with proper names that can be imported by Maloo. Such as:
https://testing.hpdd.intel.com/test_sets/12cab8e0-2c5c-11e6-a0ce-5254006e85c2

We need improve metadata-updates.sh to wrap the tests with test_x().



 Comments   
Comment by Niu Yawei (Inactive) [ 14/Sep/16 ]

Debug marker needs be made at the begining of each test case (operation), that'll be helpful for reading the debug log. For example:

do_change_timestamps () {
    echo "Changing atime, mtime ..."

    do_nodes $NODES_TO_USE " set $TRACE;
TESTFILE=$TESTDIR/\\\$(hostname)/$FILE;
touch -c --date=\\\"$NEW_ATIME\\\" -a \\\$TESTFILE;
touch -c --date=\\\"$NEW_MTIME\\\" -m \\\$TESTFILE " || return ${PIPESTATUS[0]}
    return 0
}

Besides this "echo", a debug marker will be helpful.

Comment by Gerrit Updater [ 20/Dec/16 ]

James Nunez (james.a.nunez@intel.com) uploaded a new patch: https://review.whamcloud.com/24450
Subject: LU-8603 test: Separate tests in metadata_updates
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ec5d2a24c1cf9287e9884d240215bdd25d68a7f5

Comment by James Nunez (Inactive) [ 21/Dec/16 ]

Niu - The patch to break up the subtest of metadata-updates is failing with

trevis-35vm1: /mnt/lustre/d0.metadata-updates/trevis-35vm1.trevis.hpdd.intel.com/testfile [ uid gid size mode ] expected : root root 0 0644 ;  got : root root 0 0222 
trevis-35vm1: Wrong file attributes
trevis-35vm2: /mnt/lustre/d0.metadata-updates/trevis-35vm1.trevis.hpdd.intel.com/testfile [ uid gid size mode ] expected : root root 0 0644 ;  got : root root 0 0222 
trevis-35vm2: Wrong file attributes
 metadata-updates test_3: @@@@@@ FAIL: wrong attributes after truncate 

Logs are at https://testing.hpdd.intel.com/test_sets/21227fca-c7c7-11e6-9e78-5254006e85c2.

Previously, the call to get_stat to check the file attributes after truncate was not a fatal error, but a "error_noexit". So, we never failed the test if the attributes were incorrect after truncate.

Should we error out if the attributes are not correct or is there a reason to ignore the new attributes if they do not match what is expected?

Comment by Niu Yawei (Inactive) [ 22/Dec/16 ]

The original script will update CURRENT_MODE (0644) to NEW_MODE (0222) in do_chmod() of 2nd test case, but looks it failed to update the value now when you moved them into sub tests.

Another problem is that all test cases are depended each other, none of them can be executed individually (except the first one), so it doesn't make much sense to separate them into sub-tests.

Rather than moving them into separate sub-tests, I think probably just use debug marker (lctl mark ...) to make the test cases distinguishable in debug log is good enough? (and replace most 'echo' with 'log' to make sure the important messages saved in test log).

Comment by Gerrit Updater [ 19/Apr/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24450/
Subject: LU-8603 test: Separate tests in metadata_updates
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d5fbf74a2f4fbd796a4009bf8d10dcdeb029b44b

Comment by Peter Jones [ 19/Apr/17 ]

Landed for 2.10

Generated at Sat Feb 10 02:19:00 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.