diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-28 14:10:00 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-06-28 14:10:00 +0200 |
commit | 335766602b2598f29a3dd854654b9ba9edb6d7cb (patch) | |
tree | 96a4ab55d3574f294a7283694bdc7167724b07bd | |
parent | 8825cb6660b66c412296c2b1e10ca2f965a0a9cd (diff) | |
download | busybox-w32-335766602b2598f29a3dd854654b9ba9edb6d7cb.tar.gz busybox-w32-335766602b2598f29a3dd854654b9ba9edb6d7cb.tar.bz2 busybox-w32-335766602b2598f29a3dd854654b9ba9edb6d7cb.zip |
testsuite/mount.tests: fix false positive
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/loop.c | 4 | ||||
-rwxr-xr-x | testsuite/mount.tests | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libbb/loop.c b/libbb/loop.c index f0d4296ae..c78535a20 100644 --- a/libbb/loop.c +++ b/libbb/loop.c | |||
@@ -106,6 +106,10 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse | |||
106 | return -errno; | 106 | return -errno; |
107 | } | 107 | } |
108 | 108 | ||
109 | //TODO: use LOOP_CTL_GET_FREE instead of trying every loopN in sequence? a-la: | ||
110 | // fd = open("/dev/loop-control", O_RDWR); | ||
111 | // loopN = ioctl(fd, LOOP_CTL_GET_FREE); | ||
112 | // | ||
109 | /* Find a loop device. */ | 113 | /* Find a loop device. */ |
110 | try = *device ? *device : dev; | 114 | try = *device ? *device : dev; |
111 | /* 1048575 (0xfffff) is a max possible minor number in Linux circa 2010 */ | 115 | /* 1048575 (0xfffff) is a max possible minor number in Linux circa 2010 */ |
diff --git a/testsuite/mount.tests b/testsuite/mount.tests index a0bc50888..91c2e8b42 100755 --- a/testsuite/mount.tests +++ b/testsuite/mount.tests | |||
@@ -10,9 +10,11 @@ test "`id -u`" = 0 || { | |||
10 | exit 0 | 10 | exit 0 |
11 | } | 11 | } |
12 | 12 | ||
13 | # Without MOUNT_LOOP_CREATE, the test will fail if /dev/loopN's do not exist | ||
13 | if test x"$CONFIG_MKFS_MINIX" != x"y" \ | 14 | if test x"$CONFIG_MKFS_MINIX" != x"y" \ |
14 | || test x"$CONFIG_FEATURE_MINIX2" != x"y" \ | 15 | || test x"$CONFIG_FEATURE_MINIX2" != x"y" \ |
15 | || test x"$CONFIG_FEATURE_MOUNT_LOOP" != x"y" \ | 16 | || test x"$CONFIG_FEATURE_MOUNT_LOOP" != x"y" \ |
17 | || test x"$CONFIG_FEATURE_MOUNT_LOOP_CREATE" != x"y" \ | ||
16 | || test x"$CONFIG_FEATURE_MOUNT_FLAGS" != x"y" \ | 18 | || test x"$CONFIG_FEATURE_MOUNT_FLAGS" != x"y" \ |
17 | || test x"$CONFIG_FEATURE_DEVFS" = x"y" \ | 19 | || test x"$CONFIG_FEATURE_DEVFS" = x"y" \ |
18 | ; then | 20 | ; then |