Whamcloud - gitweb
LU-4030 tests: use free_fd() to allocate file descriptor 11/8811/2
authorVladmir Saveliev <vladimir_saveliev@xyratex.com>
Sun, 12 Jan 2014 03:21:28 +0000 (11:21 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 13 Jan 2014 21:16:55 +0000 (21:16 +0000)
commit95b852177325aa80b7c397c350bd343f0d8a64a8
treebcb59a44779a24fe84b73047e04b7381aedbed57
parent01336dda00a9124b579cac715d041a18fb69a4a7
LU-4030 tests: use free_fd() to allocate file descriptor

free_fd() lists /proc/self/fd to find the smallest unused file
descriptor
sanity test_31n is changed to use free_fd() instead of using hardcoded
173
sanity test_236 is changed to use free_fd() instead of using "{FD}<>"
which is not available on eariler bash

Since test_31n now uses the function free_fd to find an unused file
descriptor, it no longer depends on fd 173 being free.  This change
also removes that test on whether fd 173 is in use.

This patch is back-ported from the following ones:
Lustre-commit: 1f9235152b2f44c7bd64c5c021066f1984f341e6
Lustre-change: http://review.whamcloud.com/8181
and
Lustre-commit: 73e816e57167eb92425b6cf29fc570e56c88f6bd
Lustre-change: http://review.whamcloud.com/8622

Signed-off-by: Vladmir Saveliev <vladimir_saveliev@xyratex.com>
Change-Id: I0c9c04787d45dfe6ba5ed01adb0a8ee265c6b3c5
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/8811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
lustre/tests/sanity.sh
lustre/tests/test-framework.sh