From 2a2df8fbc6d1e28fbca4800e721eb7fe59f71153 Mon Sep 17 00:00:00 2001 From: fsgqa Date: Thu, 1 Jul 2004 00:05:11 +0000 Subject: [PATCH] QA test updates - fix 044 check, shorten 083 runtime, check for EAGAIN as well as EBUSY in the mtab lock tester program. --- 044 | 7 ++++++- 083 | 2 +- src/t_mtab.c | 12 ++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/044 b/044 index 8a1e4243..d247c5ad 100755 --- a/044 +++ b/044 @@ -127,12 +127,17 @@ echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/co echo "*** mkfs" +# this test only works for version 1 logs currently lversion=1 lsize=16777216 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1 [ $? -ne 0 ] && \ _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified" -_filter_mkfs <$tmp.mkfs0 2>/dev/null +_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1 +. $tmp.mkfs1 +[ $lversion -ne 1 ] && \ + _notrun "Cannot run this test yet using MKFS_OPTIONS specified" + _check_mount _check_require_logdev diff --git a/083 b/083 index 0a02e784..c2300e7c 100755 --- a/083 +++ b/083 @@ -93,7 +93,7 @@ echo "*** test out-of-space handling for random write operations" # args: filesystem size/ag count/number fsstress processes -workout 100m 6 30 +workout 100m 6 15 echo "*** done" status=0 diff --git a/src/t_mtab.c b/src/t_mtab.c index 2d5df378..2931887a 100644 --- a/src/t_mtab.c +++ b/src/t_mtab.c @@ -59,7 +59,9 @@ setlkw_timeout (int sig) { void lock_mtab (void) { +#if 0 /* nathans: dont limit, we are forcing lots of parallel accesses */ int tries = 3; +#endif char linktargetfile[PATH_MAX + 20]; if (!signals_have_been_setup) { @@ -120,10 +122,12 @@ lock_mtab (void) { if (fd < 0) { int errsv = errno; /* Strange... Maybe the file was just deleted? */ +#if 0 /* nathans: dont limit, we are forcing lots of parallel accesses */ if (errno == ENOENT && tries-- > 0) +#endif + if (errno == ENOENT) continue; - fprintf(stderr, "can't open lock file %s: %s " - "(use -n flag to override)", + fprintf(stderr, "can't open lock file %s: %s\n", mounted_lock, strerror (errsv)); exit(1); } @@ -136,7 +140,7 @@ lock_mtab (void) { if (j == 0) { /* We made the link. Now claim the lock. */ if (fcntl (fd, F_SETLK, &flock) == -1 && - errno != EBUSY) { + errno != EBUSY && errno != EAGAIN) { int errsv = errno; printf(_("Can't lock lock file %s: %s\n"), mounted_lock, strerror (errsv)); @@ -151,7 +155,7 @@ lock_mtab (void) { /* Someone else made the link. Wait. */ alarm(LOCK_TIMEOUT); if (fcntl (fd, F_SETLKW, &flock) == -1 && - errno != EBUSY) { + errno != EBUSY && errno != EAGAIN) { int errsv = errno; fprintf(stderr, "can't lock lock file %s: %s", mounted_lock, (errno == EINTR) ? -- 2.47.3