aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2020-06-23 21:28:19 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2020-06-23 21:28:19 +0200
commit5fa5c4bde8b9ab75fa0ed37ee2fafca3fd46288a (patch)
treede564d978ea2bbf5484f71ea3f181cb4b0a7f541
parentd206b1651ac4dc4db1d9bbd172a81da0568b42e8 (diff)
downloadbusybox-w32-5fa5c4bde8b9ab75fa0ed37ee2fafca3fd46288a.tar.gz
busybox-w32-5fa5c4bde8b9ab75fa0ed37ee2fafca3fd46288a.tar.bz2
busybox-w32-5fa5c4bde8b9ab75fa0ed37ee2fafca3fd46288a.zip
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/patch.c3
-rw-r--r--include/libbb.h1
-rw-r--r--libbb/duration.c1
-rwxr-xr-xscripts/randomtest22
-rwxr-xr-xtestsuite/cpio.tests6
-rwxr-xr-xtestsuite/patch.tests4
6 files changed, 31 insertions, 6 deletions
diff --git a/editors/patch.c b/editors/patch.c
index 0ce0210fd..aaa253591 100644
--- a/editors/patch.c
+++ b/editors/patch.c
@@ -264,7 +264,7 @@ static int apply_one_hunk(void)
264 if (!plist && matcheof) break; 264 if (!plist && matcheof) break;
265 265
266 if (backwarn) 266 if (backwarn)
267 fdprintf(2,"Possibly reversed hunk %d at %ld\n", 267 fdprintf(2, "Possibly reversed hunk %d at %ld\n",
268 TT.hunknum, TT.linenum); 268 TT.hunknum, TT.linenum);
269 269
270 // File ended before we found a place for this hunk. 270 // File ended before we found a place for this hunk.
@@ -593,6 +593,7 @@ int patch_main(int argc UNUSED_PARAM, char **argv)
593 TT.linenum = 0; 593 TT.linenum = 0;
594 TT.hunknum = 0; 594 TT.hunknum = 0;
595 } 595 }
596 fflush_all(); // make "patching file F" visible
596 } 597 }
597 598
598 TT.hunknum++; 599 TT.hunknum++;
diff --git a/include/libbb.h b/include/libbb.h
index d9858f5df..6be934994 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -298,6 +298,7 @@ typedef unsigned long uoff_t;
298/* scary. better ideas? (but do *test* them first!) */ 298/* scary. better ideas? (but do *test* them first!) */
299#define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) 299#define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1)))
300/* Users report bionic to use 32-bit off_t even if LARGEFILE support is requested. 300/* Users report bionic to use 32-bit off_t even if LARGEFILE support is requested.
301 * On musl, !ENABLE_LFS on 32-bit arches thinks that off_t is 32-bit.
301 * We misdetected that. Don't let it build: 302 * We misdetected that. Don't let it build:
302 */ 303 */
303struct BUG_off_t_size_is_misdetected { 304struct BUG_off_t_size_is_misdetected {
diff --git a/libbb/duration.c b/libbb/duration.c
index 5acd0dba3..22b209f4d 100644
--- a/libbb/duration.c
+++ b/libbb/duration.c
@@ -17,6 +17,7 @@
17//kbuild:lib-$(CONFIG_TIMEOUT) += duration.o 17//kbuild:lib-$(CONFIG_TIMEOUT) += duration.o
18//kbuild:lib-$(CONFIG_PING) += duration.o 18//kbuild:lib-$(CONFIG_PING) += duration.o
19//kbuild:lib-$(CONFIG_PING6) += duration.o 19//kbuild:lib-$(CONFIG_PING6) += duration.o
20//kbuild:lib-$(CONFIG_WATCH) += duration.o
20 21
21#include "libbb.h" 22#include "libbb.h"
22 23
diff --git a/scripts/randomtest b/scripts/randomtest
index 94709a99f..ec2f095b2 100755
--- a/scripts/randomtest
+++ b/scripts/randomtest
@@ -113,6 +113,28 @@ if test x"$LIBC" = x"uclibc"; then
113 echo 'CONFIG_ASH_INTERNAL_GLOB=y' >>.config 113 echo 'CONFIG_ASH_INTERNAL_GLOB=y' >>.config
114fi 114fi
115 115
116# If musl
117if test x"$LIBC" = x"musl"; then
118 cat .config \
119 | grep -v CONFIG_STATIC \
120 | grep -v CONFIG_LFS \
121 | grep -v CONFIG_EXTRA_COMPAT \
122 | grep -v CONFIG_FEATURE_2_4_MODULES \
123 | grep -v CONFIG_FEATURE_VI_REGEX_SEARCH \
124 | grep -v CONFIG_FEATURE_MOUNT_NFS \
125 | grep -v CONFIG_FEATURE_INETD_RPC \
126 >.config.new
127 mv .config.new .config
128 echo 'CONFIG_STATIC=y' >>.config
129 # with LFS off, uoff_t will have wrong width:
130 echo 'CONFIG_LFS=y' >>.config
131 echo '# CONFIG_EXTRA_COMPAT is not set' >>.config
132 echo '# CONFIG_FEATURE_2_4_MODULES is not set' >>.config
133 echo '# CONFIG_FEATURE_VI_REGEX_SEARCH is not set' >>.config
134 echo '# CONFIG_FEATURE_MOUNT_NFS is not set' >>.config
135 echo '# CONFIG_FEATURE_INETD_RPC is not set' >>.config
136fi
137
116# If STATIC, remove some things. 138# If STATIC, remove some things.
117# PAM with static linking is probably pointless 139# PAM with static linking is probably pointless
118# (but I need to try - now I don't have libpam.a on my system, only libpam.so) 140# (but I need to try - now I don't have libpam.a on my system, only libpam.so)
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests
index 88ec086b6..85e746589 100755
--- a/testsuite/cpio.tests
+++ b/testsuite/cpio.tests
@@ -129,7 +129,7 @@ SKIP=
129 129
130optional FEATURE_CPIO_O 130optional FEATURE_CPIO_O
131testing "cpio uses by default uid/gid" \ 131testing "cpio uses by default uid/gid" \
132"echo $0 | cpio -o -H newc | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \ 132"echo $0 | cpio -o -H newc | cpio -tv 2>&1 | head -n1 | awk ' { print \$2 } '; echo \$?" \
133"\ 133"\
134$user/$group 134$user/$group
1350 1350
@@ -138,7 +138,7 @@ SKIP=
138 138
139optional FEATURE_CPIO_O 139optional FEATURE_CPIO_O
140testing "cpio -R with create" \ 140testing "cpio -R with create" \
141"echo $0 | cpio -o -H newc -R 1234:5678 | cpio -tv 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \ 141"echo $0 | cpio -o -H newc -R 1234:5678 | cpio -tv 2>&1 | head -n1 | awk ' { print \$2 } '; echo \$?" \
142"\ 142"\
1431234/5678 1431234/5678
1440 1440
@@ -147,7 +147,7 @@ SKIP=
147 147
148optional FEATURE_CPIO_O 148optional FEATURE_CPIO_O
149testing "cpio -R with extract" \ 149testing "cpio -R with extract" \
150"echo $0 | cpio -o -H newc | cpio -tv -R 8765:4321 2>&1 | tail -n +2 | awk ' { print \$2 } '; echo \$?" \ 150"echo $0 | cpio -o -H newc | cpio -tv -R 8765:4321 2>&1 | head -n1 | awk ' { print \$2 } '; echo \$?" \
151"\ 151"\
1528765/4321 1528765/4321
1530 1530
diff --git a/testsuite/patch.tests b/testsuite/patch.tests
index 39205242c..1d48e90be 100755
--- a/testsuite/patch.tests
+++ b/testsuite/patch.tests
@@ -75,12 +75,12 @@ zxc
75testing "patch detects already applied hunk" \ 75testing "patch detects already applied hunk" \
76 'patch 2>&1; echo $?; cat input' \ 76 'patch 2>&1; echo $?; cat input' \
77"\ 77"\
78patching file input
78Possibly reversed hunk 1 at 4 79Possibly reversed hunk 1 at 4
79Hunk 1 FAILED 1/1. 80Hunk 1 FAILED 1/1.
80 abc 81 abc
81+def 82+def
82 123 83 123
83patching file input
841 841
85abc 85abc
86def 86def
@@ -103,12 +103,12 @@ def
103testing "patch detects already applied hunk at the EOF" \ 103testing "patch detects already applied hunk at the EOF" \
104 'patch 2>&1; echo $?; cat input' \ 104 'patch 2>&1; echo $?; cat input' \
105"\ 105"\
106patching file input
106Possibly reversed hunk 1 at 4 107Possibly reversed hunk 1 at 4
107Hunk 1 FAILED 1/1. 108Hunk 1 FAILED 1/1.
108 abc 109 abc
109 123 110 123
110+456 111+456
111patching file input
1121 1121
113abc 113abc
114123 114123