Fix some codespell warnings

Brought to you by

	codespell -w

(using codespell v2.1.0).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2022-03-30 18:45:16 -07:00 committed by Andrei Vagin
parent 3f18004778
commit 0194ed392f
83 changed files with 124 additions and 124 deletions

View file

@ -261,7 +261,7 @@ class sock:
# that hasn't contributed to some new states is
# just waste of time, so we close only connected
# sockets or listeners that has at least one
# incoming connection pendig or served
# incoming connection pending or served
if self.listen:
if self.icons:

View file

@ -129,7 +129,7 @@ class Sockets {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + e);
logger.log(Level.SEVERE, "Exception occurred:" + e);
logger.log(Level.FINE, writer.toString());
}
if (b != null) {

View file

@ -121,7 +121,7 @@ class SocketsClient {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
exception.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + exception);
logger.log(Level.SEVERE, "Exception occurred:" + exception);
logger.log(Level.FINE, writer.toString());
}

View file

@ -80,7 +80,7 @@ class SocketsConnect {
}
if (socketMappedBuffer.getChar(Helper.MAPPED_INDEX) == Helper.STATE_FAIL) {
logger.log(Level.SEVERE, "Killing the server process and client process");
logger.log(Level.SEVERE, "Exception occured in the client or server process: check their log for details");
logger.log(Level.SEVERE, "Exception occurred in the client or server process: check their log for details");
serverProcess.destroy();
clientProcess.destroy();
b.putChar(Helper.MAPPED_INDEX, Helper.STATE_END);
@ -145,7 +145,7 @@ class SocketsConnect {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + e);
logger.log(Level.SEVERE, "Exception occurred:" + e);
logger.log(Level.FINE, writer.toString());
}
if (b != null) {

View file

@ -68,7 +68,7 @@ class SocketsConnectClient {
try {
socket = new Socket(SocketHelper.IP_ADDRESS, port);
} catch (Exception e) {
logger.log(Level.SEVERE, "Exception occured when connecting to port: " + e);
logger.log(Level.SEVERE, "Exception occurred when connecting to port: " + e);
socketMappedBuffer.putChar(Helper.MAPPED_INDEX, Helper.STATE_FAIL);
System.exit(1);
}
@ -117,7 +117,7 @@ class SocketsConnectClient {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
exception.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + exception);
logger.log(Level.SEVERE, "Exception occurred:" + exception);
logger.log(Level.FINE, writer.toString());
}

View file

@ -80,7 +80,7 @@ class SocketsData {
}
if (socketMappedBuffer.getChar(Helper.MAPPED_INDEX) == Helper.STATE_FAIL) {
logger.log(Level.SEVERE, "Killing the server process and client process");
logger.log(Level.SEVERE, "Exception occured in the client or server process: check their log for details");
logger.log(Level.SEVERE, "Exception occurred in the client or server process: check their log for details");
serverProcess.destroy();
clientProcess.destroy();
b.putChar(Helper.MAPPED_INDEX, Helper.STATE_END);
@ -144,7 +144,7 @@ class SocketsData {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + e);
logger.log(Level.SEVERE, "Exception occurred:" + e);
logger.log(Level.FINE, writer.toString());
}
if (b != null) {

View file

@ -74,7 +74,7 @@ class SocketsDataClient {
try {
socket = new Socket(SocketHelper.IP_ADDRESS, port);
} catch (IOException e) {
logger.log(Level.SEVERE, "Exception occured when connecting to port: " + e);
logger.log(Level.SEVERE, "Exception occurred when connecting to port: " + e);
socketMappedBuffer.putChar(Helper.MAPPED_INDEX, Helper.STATE_FAIL);
System.exit(1);
}
@ -129,7 +129,7 @@ class SocketsDataClient {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
exception.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + exception);
logger.log(Level.SEVERE, "Exception occurred:" + exception);
logger.log(Level.FINE, writer.toString());
}
if (socketMappedBuffer != null) {

View file

@ -81,7 +81,7 @@ class SocketsListen {
}
if (socketMappedBuffer.getChar(Helper.MAPPED_INDEX) == Helper.STATE_FAIL) {
logger.log(Level.SEVERE, "Killing the server process and client process");
logger.log(Level.SEVERE, "Exception occured in the client or server process: check their log for details");
logger.log(Level.SEVERE, "Exception occurred in the client or server process: check their log for details");
serverProcess.destroy();
clientProcess.destroy();
b.putChar(Helper.MAPPED_INDEX, Helper.STATE_END);
@ -141,7 +141,7 @@ class SocketsListen {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + e);
logger.log(Level.SEVERE, "Exception occurred:" + e);
logger.log(Level.FINE, writer.toString());
}
if (b != null) {

View file

@ -75,7 +75,7 @@ class SocketsListenClient {
try {
socket = new Socket(SocketHelper.IP_ADDRESS, port);
} catch (Exception e) {
logger.log(Level.SEVERE, "Exception occured when connecting to port: " + e);
logger.log(Level.SEVERE, "Exception occurred when connecting to port: " + e);
socketMappedBuffer.putChar(Helper.MAPPED_INDEX, Helper.STATE_FAIL);
}
PrintStream out = new PrintStream(socket.getOutputStream());
@ -123,7 +123,7 @@ class SocketsListenClient {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
exception.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + exception);
logger.log(Level.SEVERE, "Exception occurred:" + exception);
logger.log(Level.FINE, writer.toString());
}

View file

@ -80,7 +80,7 @@ class SocketsMultiple {
}
if (socketMappedBuffer.getChar(Helper.MAPPED_INDEX) == Helper.STATE_FAIL) {
logger.log(Level.SEVERE, "Killing the server process and client process");
logger.log(Level.SEVERE, "Exception occured in the client or server process: check their log for details");
logger.log(Level.SEVERE, "Exception occurred in the client or server process: check their log for details");
serverProcess.destroy();
clientProcess.destroy();
b.putChar(Helper.MAPPED_INDEX, Helper.STATE_END);
@ -140,7 +140,7 @@ class SocketsMultiple {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
e.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + e);
logger.log(Level.SEVERE, "Exception occurred:" + e);
logger.log(Level.FINE, writer.toString());
}
if (b != null) {

View file

@ -161,7 +161,7 @@ class SocketsMultipleClient {
StringWriter writer = new StringWriter();
PrintWriter printWriter = new PrintWriter(writer);
exception.printStackTrace(printWriter);
logger.log(Level.SEVERE, "Exception occured:" + exception);
logger.log(Level.SEVERE, "Exception occurred:" + exception);
logger.log(Level.FINE, writer.toString());
}

View file

@ -50,7 +50,7 @@ int main(int argc, char *argv[])
snprintf(buf, sizeof(buf), "/proc/%d/fd", pid);
fd_dir = opendir(buf);
if (!fd_dir) {
printf("cant open %s\n", buf);
printf("can't open %s\n", buf);
return -1;
}
@ -70,13 +70,13 @@ int main(int argc, char *argv[])
closedir(fd_dir);
if (ioctl(fd, TIOCGSID, &tty_sid) < 0) {
printf("cant obtain sid on stdout\n");
printf("can't obtain sid on stdout\n");
return -1;
}
printf("stdout sid = %d\n", tty_sid);
if (ioctl(fd, TIOCGPGRP, &tty_gid) < 0) {
printf("cant obtain gid on stdout\n");
printf("can't obtain gid on stdout\n");
return -1;
}
printf("stdout gid = %d\n", tty_gid);

View file

@ -61,7 +61,7 @@ EXAMPLE
bers -d test/bers/dump -t 256 -m 54 -c 4 -f 200 --mem-fill dirtify --mem-cycle dirtify
We generate 256 tasks wit each allocating 54 megabytes of memory splitted
We generate 256 tasks with each allocating 54 megabytes of memory split
equally into 4 memory areas. Each task opens 200 files. On creation and
cycling we touch every page of every memory area.

View file

@ -8,7 +8,7 @@ grep NSpid /proc/self/status || exit 0
# This test creates a process in non-host pidns and then dumps it and restores
# it into host pidns. We use pid >100000 in non-host pidns to make sure it does
# not intersect with some host pid on restore but it is potentially racy so
# please run this test only in manualy.
# please run this test only in manually.
CRIU=../../../criu/criu

View file

@ -42,7 +42,7 @@ class test:
def check_resp(self, resp, typ, err):
if resp.type != typ:
raise Exception('Unexpected responce type ' + str(resp.type))
raise Exception('Unexpected response type ' + str(resp.type))
if resp.success:
raise Exception('Unexpected success = True')

View file

@ -118,7 +118,7 @@ int main(int argc, char *argv[])
ret = connect(fd, (struct sockaddr *)&addr, addr_len);
if (ret == -1) {
perror("Cant connect to socket");
perror("Can't connect to socket");
goto exit;
}

View file

@ -975,7 +975,7 @@ class criu_rpc:
if preexec:
raise test_fail_exc('RPC and PREEXEC not supported')
ctx = {} # Object used to keep info untill action is done
ctx = {} # Object used to keep info until action is done
criu = crpc.criu()
criu.use_binary(criu_bin)
criu_rpc.__set_opts(criu, args, ctx)

View file

@ -25,7 +25,7 @@ do_or_fail()
do_start_ipt()
{
[ -f "$statefile" ] && die "state file $statefile aleady exists"
[ -f "$statefile" ] && die "state file $statefile already exists"
do_or_fail "can't install a state match" \
iptables -A INPUT \
@ -47,7 +47,7 @@ do_stop_ipt()
do_start_nft()
{
[ -f "$statefile" ] && die "state file $statefile aleady exists"
[ -f "$statefile" ] && die "state file $statefile already exists"
do_or_fail "can't install a state match" \
nft add rule filter INPUT \
@ -83,7 +83,7 @@ tmpargs="$(../lib/parseargs.sh --name=$0 \
die "can't parse command line"
eval "$tmpargs"
[ -f "$outfile" ] && die "out file $outfile aleady exists"
[ -f "$outfile" ] && die "out file $outfile already exists"
# expect "start" or "stop"
do_$1

View file

@ -51,7 +51,7 @@ int main(int argc, char **argv)
}
tmp[2] = '\0';
if (strcmp(tmp, "xy")) {
fail("Smth's wron with file contents (%s)", tmp);
fail("Smth's wrong with file contents (%s)", tmp);
return 1;
}

View file

@ -152,7 +152,7 @@ test:
}
/*
* Setup futex for processes syncronization
* Setup futex for processes synchronization
*/
futex = mmap(NULL, sizeof(futex), PROT_WRITE | PROT_READ, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (futex == MAP_FAILED) {

View file

@ -139,7 +139,7 @@ int main(int argc, char **argv)
test_init(argc, argv);
/*
* Setup futex for processes syncronization
* Setup futex for processes synchronization
*/
futex = mmap(NULL, sizeof(futex), PROT_WRITE | PROT_READ, MAP_SHARED | MAP_ANONYMOUS, -1, 0);
if (futex == MAP_FAILED) {

View file

@ -30,7 +30,7 @@ if sys.argv[1] == "--post-start":
nsenter() # Enter test netns
subprocess.Popen(["ip", "link", "set", "up", "dev", "lo"]).wait()
# Lets test know that the netns is initilized successfully
# Lets test know that the netns is initialized successfully
# by checking the access of SYNCFILE
create_sync_file()

View file

@ -79,7 +79,7 @@ int main(int argc, char **argv)
goto err;
}
if (strcmp(TEST_STRING, buf)) {
pr_perror("data curruption");
pr_perror("data corruption");
goto err;
}
@ -109,7 +109,7 @@ int main(int argc, char **argv)
}
close(11);
if (strcmp(TEST_STRING, buf)) {
pr_perror("data curruption");
pr_perror("data corruption");
return 1;
}
}

View file

@ -40,7 +40,7 @@ int main(int argc, char *argv[])
}
if (ioctl(slave, TIOCSCTTY, 1)) {
pr_perror("Can't set a controll terminal");
pr_perror("Can't set a control terminal");
return 1;
}
@ -51,7 +51,7 @@ int main(int argc, char *argv[])
slave = open("/dev/tty", O_RDWR);
if (slave == -1) {
pr_perror("Can't open the controll terminal");
pr_perror("Can't open the control terminal");
return -1;
}

View file

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
}
if (ioctl(slave1, TIOCSCTTY, 1)) {
pr_perror("Can't set a controll terminal");
pr_perror("Can't set a control terminal");
return 1;
}

View file

@ -31,7 +31,7 @@ do_or_fail()
do_start()
{
[ -f "$statefile" ] && die "state file $statefile aleady exists"
[ -f "$statefile" ] && die "state file $statefile already exists"
# Get default route
dev_name=`ip route list match 0.0.0.0/0 | sed 's/.*dev \([^ ]*\).*/\1/'`
@ -66,7 +66,7 @@ tmpargs="$(../lib/parseargs.sh --name=$0 \
die "can't parse command line"
eval "$tmpargs"
[ -f "$outfile" ] && die "out file $outfile aleady exists"
[ -f "$outfile" ] && die "out file $outfile already exists"
# expect "start" or "stop"
action=${1:?Specify action$(die 'Specify action')}

View file

@ -154,7 +154,7 @@ static int child(const int c)
continue;
if (testcases[i].alive)
continue;
test_msg("Wait porcess %d (pid %d)\n", i, testcases[i].master.pid);
test_msg("Wait process %d (pid %d)\n", i, testcases[i].master.pid);
waitpid(testcases[i].master.pid, NULL, 0);
}
@ -244,7 +244,7 @@ int main(int argc, char **argv)
continue;
if (testcases[i].alive)
continue;
test_msg("Wait porcess %d (pid %d)\n", i, testcases[i].master.pid);
test_msg("Wait process %d (pid %d)\n", i, testcases[i].master.pid);
waitpid(testcases[i].master.pid, NULL, 0);
}

View file

@ -74,7 +74,7 @@ int main(int argc, char *argv[])
}
if (act.sa_handler != sigh) {
fail("unexpected sighanl hanlder");
fail("unexpected sighanl handler");
exit(1);
}

View file

@ -83,7 +83,7 @@ int main(int argc, char **argv)
}
if (tmp != sk_opts[i].lock) {
fail("SO_BUF_LOCK missmatch %u != %u", tmp, sk_opts[i].lock);
fail("SO_BUF_LOCK mismatch %u != %u", tmp, sk_opts[i].lock);
goto err;
}
}
@ -103,7 +103,7 @@ int main(int argc, char **argv)
}
if (tmp != sk_opts[i].lock) {
fail("SO_BUF_LOCK missmatch %u != %u", tmp, sk_opts[i].lock);
fail("SO_BUF_LOCK mismatch %u != %u", tmp, sk_opts[i].lock);
goto err;
}
}

View file

@ -18,7 +18,7 @@
#define ZDTM_SRV_FAMILY AF_INET
#endif
const char *test_doc = "Check, that a reseted TCP connection can be restored\n";
const char *test_doc = "Check, that a reset TCP connection can be restored\n";
const char *test_author = "Andrey Vagin <avagin@parallels.com";
#include <stdio.h>

View file

@ -71,7 +71,7 @@ err:
#ifdef __i386__
/*
* On i386 syscalls for speed are optimized trough vdso,
* On i386 syscalls for speed are optimized through vdso,
* call raw int80 as vdso is unmapped.
*/
#define __NR32_munmap 91