Jim Meyering 79c21ec0c4 skip ioctl-using tests when not supported
Summary:
[NB: this is a prerequisite for the /tmp-abuse-fixing patch]
This avoids spurious test failure on Linux systems
like Fedora for which /tmp is a tmpfs file system.

On a devtmpfs file
system, ioctl(fd, FS_IOC_GETVERSION, &version) returns -1 with
errno == ENOTTTY, indicating that that ioctl is not supported
on such a file system.  Do not let this cause test failures, e.g.,
where env_test would assert that file->GetUniqueId(...) > 0.

Before this change, ./env_test would fail these three tests
on a fedora rawhide system:

  [  FAILED  ] 3 tests, listed below:
  [  FAILED  ] EnvPosixTest.RandomAccessUniqueID
  [  FAILED  ] EnvPosixTest.RandomAccessUniqueIDConcurrent
  [  FAILED  ] EnvPosixTest.RandomAccessUniqueIDDeletes
   3 FAILED TESTS

The fix:
  When support for that ioctl is lacking, skip each affected test.
  Could be improved by noting which sub-tests are being skipped.

Test Plan:
run these on F21 and note that they now pass.

  TEST_TMPDIR=/dev/shm/rdb ./env_test
  ./env_test

Reviewers: ljin, rven, igor.sugak, yhchiang, sdong, igor

Reviewed By: igor

Subscribers: dhruba

Differential Revision: https://reviews.facebook.net/D37323
2015-04-17 20:39:02 -07:00
..
2015-03-17 14:08:00 -07:00
2014-11-21 14:11:40 -08:00
2015-03-12 21:13:53 +03:00
2015-03-17 14:08:00 -07:00
2014-11-07 15:04:30 -08:00
2015-03-17 14:08:00 -07:00
2014-08-19 06:48:21 -07:00
2015-02-26 11:28:41 -08:00
2015-04-06 12:50:44 -07:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2015-03-18 11:26:10 -07:00
2015-03-17 14:08:00 -07:00
2015-03-13 10:29:32 -07:00
2015-03-13 10:29:32 -07:00
2014-11-14 11:38:26 -08:00
2014-11-14 11:38:26 -08:00
2015-03-17 14:08:00 -07:00
2014-11-20 10:49:32 -08:00
2015-03-17 14:08:00 -07:00
2014-08-28 12:46:05 -04:00
2014-08-28 12:46:05 -04:00
2015-04-16 19:31:34 -07:00
2015-02-26 15:19:17 -08:00
2015-03-17 14:08:00 -07:00
2015-02-26 11:28:41 -08:00
2015-04-13 16:15:05 -07:00
2015-04-13 16:15:05 -07:00
2015-02-26 11:28:41 -08:00
2015-02-26 11:28:41 -08:00
2015-01-23 18:10:52 -08:00
2014-07-28 12:10:49 -07:00
2013-12-03 12:42:15 -08:00
2014-07-28 12:22:37 -07:00
2014-11-21 11:05:28 -05:00
2014-09-08 22:24:40 -07:00
2015-02-26 11:28:41 -08:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2015-04-13 17:33:24 -07:00