[CRIU] [PATCH 2/5] Fix typos

Radostin Stoyanov rstoyanov1 at gmail.com
Wed Aug 22 22:54:30 MSK 2018


Most of the typos were found by codespell.

Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
 Documentation/criu.txt                         |  2 +-
 compel/arch/x86/src/lib/include/uapi/asm/cpu.h |  2 +-
 criu/arch/ppc64/vdso-pie.c                     |  2 +-
 criu/arch/x86/cpu.c                            |  4 ++--
 criu/cgroup.c                                  |  2 +-
 criu/config.c                                  |  2 +-
 criu/cr-restore.c                              |  4 ++--
 criu/crtools.c                                 |  2 +-
 criu/eventpoll.c                               |  2 +-
 criu/filesystems.c                             |  2 +-
 criu/img-remote.c                              | 10 +++++-----
 criu/include/image.h                           |  2 +-
 criu/include/img-remote.h                      |  4 ++--
 criu/include/parasite.h                        |  4 ++--
 criu/include/path.h                            |  2 +-
 criu/include/pstree.h                          |  2 +-
 criu/include/vma.h                             |  6 +++---
 criu/log.c                                     |  2 +-
 criu/mem.c                                     |  4 ++--
 criu/mount.c                                   | 10 +++++-----
 criu/net.c                                     |  6 +++---
 criu/pie/parasite.c                            |  2 +-
 criu/pie/restorer.c                            |  8 ++++----
 criu/seize.c                                   |  2 +-
 criu/sk-queue.c                                |  2 +-
 criu/sk-unix.c                                 |  2 +-
 criu/tty.c                                     |  6 +++---
 criu/tun.c                                     |  2 +-
 criu/uffd.c                                    | 10 +++++-----
 test/exhaustive/pipe.py                        |  6 +++---
 test/exhaustive/unix.py                        | 16 ++++++++--------
 test/zdtm/static/aio01.c                       |  2 +-
 test/zdtm/static/binfmt_misc.c                 |  4 ++--
 test/zdtm/static/binfmt_misc.hook              |  4 ++--
 test/zdtm/static/cgroup_stray.c                |  2 +-
 test/zdtm/static/cgroupns.c                    |  2 +-
 test/zdtm/static/different_creds.c             |  2 +-
 test/zdtm/static/futex-rl.c                    |  2 +-
 test/zdtm/static/maps00.c                      |  2 +-
 test/zdtm/static/mount_paths.c                 |  2 +-
 test/zdtm/static/session01.c                   |  2 +-
 test/zdtm/static/vdso-proxy.c                  |  4 ++--
 test/zdtm/static/vdso01.c                      |  2 +-
 test/zdtm/static/vsx.c                         |  2 +-
 test/zdtm/transition/maps008.c                 |  2 +-
 test/zdtm/transition/netlink00.c               |  2 +-
 46 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/Documentation/criu.txt b/Documentation/criu.txt
index 9d7b294b..6bb3f0f5 100644
--- a/Documentation/criu.txt
+++ b/Documentation/criu.txt
@@ -617,7 +617,7 @@ files '/etc/criu/default.conf' and '$HOME/.criu/default.conf' are parsed (if
 present on the system). If the environment variable CRIU_CONFIG_FILE is set,
 it will also be parsed.
 
-The options parsed to CRIU via CLI, RPC or configuration file are evaluated
+The options passed to CRIU via CLI, RPC or configuration file are evaluated
 in the following order:
 
     - apply_config(/etc/criu/default.conf)
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/cpu.h b/compel/arch/x86/src/lib/include/uapi/asm/cpu.h
index 6a0c91af..bb1914da 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/cpu.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/cpu.h
@@ -11,7 +11,7 @@
  * for us, so make sure they are at proper position between
  * versions.
  *
- * In particular since we aready used leaf 11 we have
+ * In particular since we already used leaf 11 we have
  * to keep it here, since it's an ABI now.
  */
 enum cpuid_leafs {
diff --git a/criu/arch/ppc64/vdso-pie.c b/criu/arch/ppc64/vdso-pie.c
index a7e01734..910c3d38 100644
--- a/criu/arch/ppc64/vdso-pie.c
+++ b/criu/arch/ppc64/vdso-pie.c
@@ -70,7 +70,7 @@ static unsigned long put_trampoline(unsigned long at, struct vdso_symtable *sym)
 		pr_debug("Checking '%s' at %lx\n", sym->symbols[i].name,
 			 sym->symbols[i].offset);
 
-		/* find the nearest followin symbol we are interested in */
+		/* find the nearest following symbol we are interested in */
 		for (j=0; j < ARRAY_SIZE(sym->symbols); j++) {
 			if (i==j || vdso_symbol_empty(&sym->symbols[j]))
 				continue;
diff --git a/criu/arch/x86/cpu.c b/criu/arch/x86/cpu.c
index 35660929..60b3b9e2 100644
--- a/criu/arch/x86/cpu.c
+++ b/criu/arch/x86/cpu.c
@@ -280,7 +280,7 @@ static int cpu_validate_features(compel_cpuinfo_t *cpu_info)
 	 */
 	if (memcmp(cpu_info->x86_capability, rt_cpu_info.x86_capability,
 		   sizeof(cpu_info->x86_capability))) {
-		pr_err("CPU capabilites do not match run time\n");
+		pr_err("CPU capabilities do not match run time\n");
 		return -1;
 	}
 
@@ -335,7 +335,7 @@ static compel_cpuinfo_t *img_to_cpuinfo(CpuinfoX86Entry *img_x86_entry)
 
 	/*
 	 * Copy caps from image and fill the left ones from
-	 * run-time infomation for easier compatibility testing.
+	 * run-time information for easier compatibility testing.
 	 */
 	size = sizeof(img_x86_entry->capability[0]) * img_x86_entry->n_capability;
 	memcpy(cpu_info->x86_capability, img_x86_entry->capability, size);
diff --git a/criu/cgroup.c b/criu/cgroup.c
index c5d1284d..868196a9 100644
--- a/criu/cgroup.c
+++ b/criu/cgroup.c
@@ -1471,7 +1471,7 @@ static int restore_devices_list(char *paux, size_t off, CgroupPropEntry *pr)
 	ret = restore_cgroup_prop(&dev_deny, paux, off, false, false);
 
 	/*
-	 * An emptry string here means nothing is allowed,
+	 * An empty string here means nothing is allowed,
 	 * and the kernel disallows writing an "" to devices.allow,
 	 * so let's just keep going.
 	 */
diff --git a/criu/config.c b/criu/config.c
index 84d6aad1..8df2d5b7 100644
--- a/criu/config.c
+++ b/criu/config.c
@@ -208,7 +208,7 @@ static int pre_parse(int argc, char **argv, bool *usage_error, bool *no_default_
 {
 	int i;
 	/*
-	 * We are runnning before getopt(), so we need to pre-parse
+	 * We are running before getopt(), so we need to pre-parse
 	 * the command line.
 	 *
 	 * Check for --help / -h on commandline before parsing, otherwise
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 87a4754f..9b1440d7 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1366,7 +1366,7 @@ static inline int fork_with_pid(struct pstree_item *item)
 	}
 
 	/*
-	 * Some kernel modules, such as netwrok packet generator
+	 * Some kernel modules, such as network packet generator
 	 * run kernel thread upon net-namespace creattion taking
 	 * the @pid we've been requeting via LAST_PID_PATH interface
 	 * so that we can't restore a take with pid needed.
@@ -2280,7 +2280,7 @@ skip_ns_bouncing:
 out_kill:
 	/*
 	 * The processes can be killed only when all of them have been created,
-	 * otherwise an external proccesses can be killed.
+	 * otherwise an external processes can be killed.
 	 */
 	if (root_ns_mask & CLONE_NEWPID) {
 		int status;
diff --git a/criu/crtools.c b/criu/crtools.c
index 3122ac6c..aaddf83d 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -79,7 +79,7 @@ static int early_init(void)
 	 * limits.
 	 *
 	 * Note we have to do it before the service fd
-	 * get inited and we dont exit with errors here
+	 * get inited and we don't exit with errors here
 	 * because in worst scenario where clash of fd
 	 * happen we simply exit with explicit error
 	 * during real action stage.
diff --git a/criu/eventpoll.c b/criu/eventpoll.c
index a47cf015..72e19e09 100644
--- a/criu/eventpoll.c
+++ b/criu/eventpoll.c
@@ -307,7 +307,7 @@ static int dump_one_eventpoll(int lfd, u32 id, const struct fd_parms *p)
 	 * Handling dup'ed or transferred target
 	 * files is tricky: we need to use kcmp
 	 * to find out where file came from. Until
-	 * it's implemented lets use simplier approach
+	 * it's implemented lets use simpler approach
 	 * just check the targets are blonging to the
 	 * pid's file set.
 	 */
diff --git a/criu/filesystems.c b/criu/filesystems.c
index 59f7c99f..d227427b 100644
--- a/criu/filesystems.c
+++ b/criu/filesystems.c
@@ -171,7 +171,7 @@ static int binfmt_misc_dump(struct mount_info *pm)
 			continue;
 
 		if (!img) {
-			/* Create image only if an extry exists, i.e. here */
+			/* Create image only if an entry exists, i.e. here */
 			img = open_image(CR_FD_BINFMT_MISC, O_DUMP);
 			if (!img)
 				goto out;
diff --git a/criu/img-remote.c b/criu/img-remote.c
index a9140423..dbe2d294 100644
--- a/criu/img-remote.c
+++ b/criu/img-remote.c
@@ -30,18 +30,18 @@
 // List of images already in memory.
 LIST_HEAD(rimg_head);
 
-// List of local operations currently in-progess.
+// List of local operations currently in-progress.
 LIST_HEAD(rop_inprogress);
 
 // List of local operations pending (reads on the restore side for images that
 // still haven't arrived).
-
 LIST_HEAD(rop_pending);
+
 // List of images waiting to be forwarded. The head of the list is currently
 // being forwarded.
 LIST_HEAD(rop_forwarding);
 
-// List of snapshots (useful when doing incremental restores/dumps
+// List of snapshots (useful when doing incremental restores/dumps)
 LIST_HEAD(snapshot_head);
 
 // Snapshot id (setup at launch time by dump or restore).
@@ -445,7 +445,7 @@ static void rop_set_rimg(struct roperation* rop, struct rimage* rimg)
 		rop->curr_recv_buf = list_entry(rimg->buf_head.prev, struct rbuf, l);
 	}
 	else {
-		// Writes or reads are simple. Just do it from the beginnig.
+		// Writes or reads are simple. Just do it from the beginning.
 		rop->curr_recv_buf = list_entry(rimg->buf_head.next, struct rbuf, l);
 		rop->curr_sent_buf = list_entry(rimg->buf_head.next, struct rbuf, l);
 		rop->curr_sent_bytes = 0;
@@ -616,7 +616,7 @@ void forward_remote_image(struct roperation* rop)
 		return;
 	}
 
-	pr_info("[fd=%d] Fowarding %s request for %s:%s (%" PRIu64 " bytes\n",
+	pr_info("[fd=%d] Forwarding %s request for %s:%s (%" PRIu64 " bytes\n",
 		rop->fd,
 		rop->flags == O_RDONLY ? "read" :
 			rop->flags == O_APPEND ? "append" : "write",
diff --git a/criu/include/image.h b/criu/include/image.h
index d576f5a1..1b2cdadf 100644
--- a/criu/include/image.h
+++ b/criu/include/image.h
@@ -45,7 +45,7 @@
  *  	contents modification especially when tasks are
  *  	migrating between different kernel versions
  *  - heap
- *  	"heap" area in application, currently for inforamtion only
+ *  	"heap" area in application, currently for information only
  *  - file private
  *  	stands for privately memory mapped files
  *  - file shared
diff --git a/criu/include/img-remote.h b/criu/include/img-remote.h
index 15e1bc5d..8a9eb099 100644
--- a/criu/include/img-remote.h
+++ b/criu/include/img-remote.h
@@ -59,7 +59,7 @@ struct roperation {
 	bool close_fd;
 	/* Note: recv operation only. How much bytes should be received. */
 	uint64_t size;
-	/* Note: recv operation only. Buffer being writen. */
+	/* Note: recv operation only. Buffer being written. */
 	struct rbuf *curr_recv_buf; // TODO - needed? Could be replaced by list.last!
 	/* Note: send operation only. Pointer to buffer being sent. */
 	struct rbuf *curr_sent_buf;
@@ -153,7 +153,7 @@ char *get_snapshot_id_from_idx(int idx);
  */
 int push_snapshot_id();
 
-/* Returns the snapshot id index that preceeds the current snapshot_id. */
+/* Returns the snapshot id index that precedes the current snapshot_id. */
 int get_curr_parent_snapshot_id_idx();
 
 #endif
diff --git a/criu/include/parasite.h b/criu/include/parasite.h
index 9e2e1498..0a62f243 100644
--- a/criu/include/parasite.h
+++ b/criu/include/parasite.h
@@ -152,7 +152,7 @@ struct parasite_dump_creds {
 	 * FIXME -- this structure is passed to parasite code
 	 * through parasite args area so in parasite_dump_creds()
 	 * call we check for size of this data fits the size of
-	 * the area. Unfortunatelly, we _actually_ use more bytes
+	 * the area. Unfortunately, we _actually_ use more bytes
 	 * than the sizeof() -- we put PARASITE_MAX_GROUPS int-s
 	 * in there, so the size check is not correct.
 	 *
@@ -187,7 +187,7 @@ static inline void copy_sas(ThreadSasEntry *dst, const stack_t *src)
  * 1) struct parasite_drain_fd + all descriptors should fit into one page
  * 2) The value should be a multiple of CR_SCM_MAX_FD, because descriptors
  *    are transferred with help of send_fds and recv_fds.
- * 3) criu should work with a defaul value of the file limit (1024)
+ * 3) criu should work with a default value of the file limit (1024)
  */
 #define PARASITE_MAX_FDS	CR_SCM_MAX_FD * 3
 
diff --git a/criu/include/path.h b/criu/include/path.h
index b00c64a8..c475986e 100644
--- a/criu/include/path.h
+++ b/criu/include/path.h
@@ -4,7 +4,7 @@
 #include "namespaces.h"
 #include "pstree.h"
 
-/* Asolute paths are used on dump and relative paths are used on restore */
+/* Absolute paths are used on dump and relative paths are used on restore */
 static inline int is_root(char *p)
 {
 	return (!strcmp(p, "/"));
diff --git a/criu/include/pstree.h b/criu/include/pstree.h
index e6ad281e..7303c1fe 100644
--- a/criu/include/pstree.h
+++ b/criu/include/pstree.h
@@ -65,7 +65,7 @@ static inline struct dmp_info *dmpi(const struct pstree_item *i)
 	return (struct dmp_info *)(i + 1);
 }
 
-/* ids is alocated and initialized for all alive tasks */
+/* ids is allocated and initialized for all alive tasks */
 static inline int shared_fdtable(struct pstree_item *item)
 {
 	return (item->parent &&
diff --git a/criu/include/vma.h b/criu/include/vma.h
index 779466c2..c297c0d1 100644
--- a/criu/include/vma.h
+++ b/criu/include/vma.h
@@ -42,7 +42,7 @@ struct vma_area {
 			char		*aufs_fpath;	/* full path from global root */
 
 			/*
-			 * When several subsequent vmas have the same 
+			 * When several subsequent vmas have the same
 			 * dev:ino pair all 'tail' ones set this to true
 			 * and the vmst points to the head's stat buf.
 			 */
@@ -93,8 +93,8 @@ extern int parse_self_maps_lite(struct vm_area_list *vms);
 /*
  * vma_premmaped_start() can be used only in restorer.
  * In other cases vma_area->premmaped_addr must be used.
- * This hack is required, because vma_area isn't tranfered in restorer and
- * shmid is used to determing which vma-s are cowed.
+ * This hack is required, because vma_area isn't transferred in restorer and
+ * shmid is used to determine which vma-s are cowed.
  */
 #define vma_premmaped_start(vma)	((vma)->shmid)
 
diff --git a/criu/log.c b/criu/log.c
index 43dcd106..9e770354 100644
--- a/criu/log.c
+++ b/criu/log.c
@@ -93,7 +93,7 @@ static void reset_buf_off(void)
 }
 
 /*
- * Keeping the very first error messsage for RPC to report back.
+ * Keeping the very first error message for RPC to report back.
  */
 struct str_and_lock {
 	mutex_t l;
diff --git a/criu/mem.c b/criu/mem.c
index bf8498a7..284af295 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -642,7 +642,7 @@ static inline bool check_cow_vmas(struct vma_area *vma, struct vma_area *pvma)
 	 * memcmp'aring the contents.
 	 */
 
-	/* ... coinside by start/stop pair (start is checked by caller) */
+	/* ... coincide by start/stop pair (start is checked by caller) */
 	if (vma->e->end != pvma->e->end)
 		return false;
 	/* ... both be private (and thus have space in premmaped area) */
@@ -650,7 +650,7 @@ static inline bool check_cow_vmas(struct vma_area *vma, struct vma_area *pvma)
 		return false;
 	if (!vma_area_is_private(pvma, kdat.task_size))
 		return false;
-	/* ... have growsdown and anon flags coinside */
+	/* ... have growsdown and anon flags coincide */
 	if ((vma->e->flags ^ pvma->e->flags) & (MAP_GROWSDOWN | MAP_ANONYMOUS))
 		return false;
 	/* ... belong to the same file if being filemap */
diff --git a/criu/mount.c b/criu/mount.c
index 078654f6..c83c1824 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -584,7 +584,7 @@ static bool mnt_is_external(struct mount_info *m)
 }
 
 /*
- * Having two children whith same mountpoint is unsupported. That can happen in
+ * Having two children with same mountpoint is unsupported. That can happen in
  * case of mount propagation inside of shared mounts, in that case it is hard
  * to find out mount propagation siblings and which of these mounts is above
  * (visible) and which is beneath (hidden). It would've broken mount restore
@@ -1359,7 +1359,7 @@ int open_mountpoint(struct mount_info *pm)
 	 * namespace so that we can safely get rid of overmounts and get an
 	 * access to the mount.
 	 * In both cases we can't do the thing from criu's mount namespace, so
-	 * we need to switch to mount's mount namespace, and later swtich back.
+	 * we need to switch to mount's mount namespace, and later switch back.
 	 */
 	cwd_fd = open(".", O_DIRECTORY);
 	if (cwd_fd < 0) {
@@ -1377,7 +1377,7 @@ int open_mountpoint(struct mount_info *pm)
 
 	/*
 	 * Mount is overmounted or probably we can't create a temporary
-	 * direcotry for a cleaned mount
+	 * directory for a cleaned mount
 	 */
 	if (fd < 0) {
 		int pid, status;
@@ -1707,7 +1707,7 @@ err:
 
 /*
  * _fn_f  - pre-order traversal function
- * _fn_f  - post-order traversal function
+ * _fn_r  - post-order traversal function
  * _plist - a postpone list. _el is added to this list, if _fn_f returns
  *	    a positive value, and all lower elements are not enumerated.
  */
@@ -2784,7 +2784,7 @@ static int get_mp_root(MntEntry *me, struct mount_info *mi)
 	if (me->ext_mount) {
 		me->ext_key = me->root;
 		/*
-		 * Puting the id of external mount which is provided by user,
+		 * Putting the id of external mount which is provided by user,
 		 * to ->root can confuse mnt_is_external and other functions
 		 * which expect to see the path in the file system to the root
 		 * of these mount (mounts_equal, mnt_build_ids_tree,
diff --git a/criu/net.c b/criu/net.c
index f523bc19..0431b62f 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -2180,7 +2180,7 @@ static int collect_netns_id(struct ns_id *ns, void *oarg)
 	if (!netns_id)
 		return -1;
 
-	pr_debug("Fount the %d id for %d in %d\n", nsid, ns->id, arg->ns->id);
+	pr_debug("Found the %d id for %d in %d\n", nsid, ns->id, arg->ns->id);
 	netns_id->target_ns_id = ns->id;
 	netns_id->netnsid_value = nsid;
 
@@ -2555,7 +2555,7 @@ int netns_keep_nsfd(void)
 }
 
 /*
- * If we want to modify iptables, we need to recevied the current
+ * If we want to modify iptables, we need to received the current
  * configuration, change it and load a new one into the kernel.
  * iptables can change or add only one rule.
  * iptables-restore allows to make a few changes for one iteration,
@@ -2807,7 +2807,7 @@ struct ns_id *get_socket_ns(int lfd)
 
 	ns_fd = ioctl(lfd, SIOCGSKNS);
 	if (ns_fd < 0) {
-		/* backward compatiblity with old kernels */
+		/* backward compatibility with old kernels */
 		if (netns_nr == 1)
 			return net_get_root_ns();
 
diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c
index 1567ed7a..c32e3138 100644
--- a/criu/pie/parasite.c
+++ b/criu/pie/parasite.c
@@ -581,7 +581,7 @@ static int parasite_check_vdso_mark(struct parasite_vdso_vma_entry *args)
 	if (is_vdso_mark(m)) {
 		/*
 		 * Make sure we don't meet some corrupted entry
-		 * where signature matches but verions is not!
+		 * where signature matches but versions do not!
 		 */
 		if (m->version != VDSO_MARK_CUR_VERSION) {
 			pr_err("vdso: Mark version mismatch!\n");
diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 1c46a48d..1c982d8d 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -254,7 +254,7 @@ static int restore_creds(struct thread_creds_args *args, int procfd)
 
 	/*
 	 * Fourth -- trim bset. This can only be done while
-	 * having the CAP_SETPCAP capablity.
+	 * having the CAP_SETPCAP capability.
 	 */
 
 	for (b = 0; b < CR_CAP_SIZE; b++) {
@@ -994,7 +994,7 @@ static int timerfd_arm(struct task_restore_args *args)
 
 			t->val.it_value.tv_sec += (time_t)ts.tv_sec;
 
-			pr_debug("Ajust id %#x it_value(%llu, %llu) -> it_value(%llu, %llu)\n",
+			pr_debug("Adjust id %#x it_value(%llu, %llu) -> it_value(%llu, %llu)\n",
 				 t->id, (unsigned long long)ts.tv_sec,
 				 (unsigned long long)ts.tv_nsec,
 				 (unsigned long long)t->val.it_value.tv_sec,
@@ -1498,7 +1498,7 @@ long __export_restore_task(struct task_restore_args *args)
 	/*
 	 * New kernel interface with @PR_SET_MM_MAP will become
 	 * more widespread once kernel get deployed over the world.
-	 * Thus lets be opportunistic and use new inteface as a try.
+	 * Thus lets be opportunistic and use new interface as a try.
 	 */
 	prctl_map = (struct prctl_mm_map) {
 		.start_code	= args->mm.mm_start_code,
@@ -1718,7 +1718,7 @@ long __export_restore_task(struct task_restore_args *args)
 	std_log_set_fd(-1);
 
 	/*
-	 * The code that prepared the itimers makes shure the
+	 * The code that prepared the itimers makes sure that the
 	 * code below doesn't fail due to bad timing values.
 	 */
 
diff --git a/criu/seize.c b/criu/seize.c
index d47d4bfc..b958d4bf 100644
--- a/criu/seize.c
+++ b/criu/seize.c
@@ -192,7 +192,7 @@ static int seize_cgroup_tree(char *root_path, const char *state)
 
 /*
  * A freezer cgroup can contain tasks which will not be dumped
- * and we need to wait them, because the are interupted them by ptrace.
+ * and we need to wait them, because the are interrupted them by ptrace.
  */
 static int freezer_wait_processes()
 {
diff --git a/criu/sk-queue.c b/criu/sk-queue.c
index b5fb6b76..4ce8ccf4 100644
--- a/criu/sk-queue.c
+++ b/criu/sk-queue.c
@@ -126,7 +126,7 @@ static int dump_packet_cmsg(struct msghdr *mh, SkPacketEntry *pe)
 			if (n_rights) {
 				/*
 				 * Even if user is sending more than one cmsg with
-				 * rights, kernel merges them alltogether on recv.
+				 * rights, kernel merges them altogether on recv.
 				 */
 				pr_err("Unexpected 2nd SCM_RIGHTS from the kernel\n");
 				return -1;
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index c10ca970..b672ea06 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1586,7 +1586,7 @@ static int bind_unix_sk(int sk, struct unix_sk_info *ui)
 	 * Order binding for sake of ghost sockets. We might rename
 	 * existing socket to some temp name, bind ghost, delete it,
 	 * and finally move the former back, thus while we're doing
-	 * this stuff we should not be interruped by connection
+	 * this stuff we should not be interrupted by connection
 	 * from another sockets.
 	 *
 	 * FIXME: Probably wort make it per address rather for
diff --git a/criu/tty.c b/criu/tty.c
index 30e3d728..214d97a8 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -546,7 +546,7 @@ static int do_open_tty_reg(int ns_root_fd, struct reg_file_info *rfi, void *arg)
 	fd = do_open_reg_noseek_flags(ns_root_fd, rfi, arg);
 	if (fd >= 0) {
 		/*
-		 * Peers might have differend modes set
+		 * Peers might have different modes set
 		 * after creation before we've dumped
 		 * them. So simply setup mode from image
 		 * the regular file engine will check
@@ -883,7 +883,7 @@ static int restore_tty_params(int fd, struct tty_info *info)
 
 /*
  * When we restore queued data we don't exit if error happened:
- * the terminals never was a transport with guaranted delivery,
+ * the terminals never was a transport with guaranteed delivery,
  * it's up to application which uses it to guaratee the data
  * integrity.
  */
@@ -2208,7 +2208,7 @@ static void tty_dinfo_free(struct tty_dump_info *dinfo)
  * checkpoint procedure -- it's tail optimization, we trying
  * to defer this procedure until everything else passed
  * successfully because in real it is time consuming on
- * its own which might require writting data back to the
+ * its own which might require writing data back to the
  * former peers if case something go wrong.
  *
  * Moreover when we gather PTYs peers into own list we
diff --git a/criu/tun.c b/criu/tun.c
index 1e5cba7c..11e82f22 100644
--- a/criu/tun.c
+++ b/criu/tun.c
@@ -120,7 +120,7 @@ static int list_tun_link(NetDeviceEntry *nde)
 	strlcpy(tl->name, nde->name, sizeof(tl->name));
 	/*
 	 * Keep tun-flags not only for persistency fixup (see
-	 * commend below), but also for TUNSETIFF -- we must
+	 * comment below), but also for TUNSETIFF -- we must
 	 * open the device with the same flags it should live
 	 * with (i.e. -- with which it was created.
 	 */
diff --git a/criu/uffd.c b/criu/uffd.c
index 2fe56b3c..38488910 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -61,7 +61,7 @@
 
 /*
  * Backround transfer parameters.
- * The default xfer length is arbitraty set to 64Kbytes
+ * The default xfer length is arbitrary set to 64Kbytes
  * The limit of 4Mbytes matches the maximal chunk size we can have in
  * a pipe in the page-server
  */
@@ -494,7 +494,7 @@ static int copy_iovs(struct lazy_pages_info *src, struct lazy_pages_info *dst)
 		goto free_iovs;
 
 	/*
-	 * The IOVs aready in flight for the parent process need to be
+	 * The IOVs already in flight for the parent process need to be
 	 * transferred again for the child process
 	 */
 	merge_iov_lists(&dst->reqs, &dst->iovs);
@@ -989,9 +989,9 @@ static struct lazy_iov *pick_next_range(struct lazy_pages_info *lpi)
 }
 
 /*
- * This is very simple heurstics for backgroud transfer control.
+ * This is very simple heurstics for background transfer control.
  * The idea is to transfer larger chunks when there is no page faults
- * and drop the backgroud transfer size each time #PF occurs to some
+ * and drop the background transfer size each time #PF occurs to some
  * default value. The default is empirically set to 64Kbytes
  */
 static void update_xfer_len(struct lazy_pages_info *lpi, bool pf)
@@ -1340,7 +1340,7 @@ static int lazy_sk_read_event(struct epoll_rfd *rfd)
 	ret = recv(rfd->fd, &fin, sizeof(fin), 0);
 	/*
 	 * epoll sets POLLIN | POLLHUP for the EOF case, so we get short
-	 * read just befor hangup_event
+	 * read just before hangup_event
 	 */
 	if (!ret)
 		return 0;
diff --git a/test/exhaustive/pipe.py b/test/exhaustive/pipe.py
index 4e94cab9..47c052ef 100755
--- a/test/exhaustive/pipe.py
+++ b/test/exhaustive/pipe.py
@@ -13,8 +13,8 @@ criu_bin='../../criu/criu'
 def mix(nr_tasks, nr_pipes):
 	# Returned is the list of combinations.
 	# Each combination is the lists of pipe descriptors.
-	# Each pipe descriptor is a 2-elemtn tuple, that contains values 
-	# for R and W ends of pipes, each being a bit-field denoting in 
+	# Each pipe descriptor is a 2-elemtn tuple, that contains values
+	# for R and W ends of pipes, each being a bit-field denoting in
 	# which tasks the respective end should be opened or not.
 
 	# First -- make a full set of combinations for a single pipe.
@@ -240,7 +240,7 @@ def run(comb, opts):
 			# Kick the test to check its state
 			s.sendto(res, '\0CRIUPCSK')
 		except:
-			# Restore might have failed or smth else happenned
+			# Restore might have failed or smth else happened
 			os.kill(pid, signal.SIGKILL)
 		s.close()
 
diff --git a/test/exhaustive/unix.py b/test/exhaustive/unix.py
index 727aa0a7..b3f40620 100755
--- a/test/exhaustive/unix.py
+++ b/test/exhaustive/unix.py
@@ -194,7 +194,7 @@ class sock:
 		self.sk_type = sock_type
 		# Sockets that haven't yet been accept()-ed are in the
 		# state, but user cannot operate on them. Also this
-		# invisibility contributes to state descriptionm since
+		# invisibility contributes to state description since
 		# connection to not accepted socket is not the same
 		# as connection to accepted one.
 		self.visible = True
@@ -240,7 +240,7 @@ class sock:
 	def get_send_action(self, to, st):
 		# However, if peer has a message from us at
 		# the queue tail, sending a new one doesn't
-		# really make sence
+		# really make sense
 		want_msg = True
 		if len(to.inqueue) != 0:
 			lmsg = to.inqueue[-1]
@@ -412,8 +412,8 @@ class state:
 
 	# Generates textual description of a state. Different states
 	# may have same descriptions, e.g. if we have two sockets and
-	# only one of them is in listen state, we don't care which 
-	# one in which. At the same time really different states 
+	# only one of them is in listen state, we don't care which
+	# one in which. At the same time really different states
 	# shouldn't map to the same string.
 	def describe(self):
 		sks = map(lambda x: x.describe(self), self.sockets)
@@ -457,7 +457,7 @@ fail_desc = {
 }
 
 def chk_real_state(st):
-	# Befor enything else -- check that we still have
+	# Before enything else -- check that we still have
 	# all the sockets at hands
 	for sk in st.sockets:
 		if not sk.visible:
@@ -567,7 +567,7 @@ def chk_real_state(st):
 			print 'FAIL: Connectivity %d -> %d lost' % \
 					(sk.sk_id, sk.peer)
 			return CHK_FAIL_CONNECT
-	
+
 		# If sockets are not connected the recv above
 		# would generate exception and the check would
 		# fail. But just in case we've screwed the queues
@@ -594,7 +594,7 @@ def chk_state(st, opts):
 	# pid!=0 branch, but for simplicity we fork the kid which has the
 	# same set of sockets we do, then dump it. Then restore and notify
 	# via dgram socket to check its state. Current task still has all
-	# the same sockets :) so we close them not to produce bind() name 
+	# the same sockets :) so we close them not to produce bind() name
 	# conflicts on restore
 
 	pid = os.fork()
@@ -730,7 +730,7 @@ p.add_argument("--keep", help = "Don't stop on error", action = 'store_true')
 opts = p.parse_args()
 opts.depth = int(opts.depth)
 
-# XXX: does it make any sence to mix two types in one go?
+# XXX: does it make any sense to mix two types in one go?
 if opts.stream and opts.dgram:
 	print 'Choose only one type'
 	sys.exit(1)
diff --git a/test/zdtm/static/aio01.c b/test/zdtm/static/aio01.c
index 4ad29a7f..1aa37eb8 100644
--- a/test/zdtm/static/aio01.c
+++ b/test/zdtm/static/aio01.c
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
 	test_msg("tail=%u, head=%u, nr=%u\n", tail[1], head[1], nr[1]);
 
 	if (tail[0] != tail[1] || head[0] != head[1] || nr[0] != nr[1]) {
-		fail("missmatch");
+		fail("mismatch");
 		return 1;
 	}
 
diff --git a/test/zdtm/static/binfmt_misc.c b/test/zdtm/static/binfmt_misc.c
index 316c4b66..fec7e035 100644
--- a/test/zdtm/static/binfmt_misc.c
+++ b/test/zdtm/static/binfmt_misc.c
@@ -20,7 +20,7 @@ const char *test_author	= "Kirill Tkhai <ktkhai at odin.com";
 char *dirname = "binfmt_misc.dir";
 TEST_OPTION(dirname, string, "binfmt_misc mount directory name", 1);
 char *filename;
-TEST_OPTION(filename, string, "file name prefix (prefix_magic, prefix, extention)", 1);
+TEST_OPTION(filename, string, "file name prefix (prefix_magic, prefix, extension)", 1);
 
 char NAME[2][PATH_MAX];
 
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
 	test_init(argc, argv);
 
 	snprintf(NAME[0], PATH_MAX, "%s_magic", filename);
-	snprintf(NAME[1], PATH_MAX, "%s_extention", filename);
+	snprintf(NAME[1], PATH_MAX, "%s_extension", filename);
 
 	if (mkdir(dirname, 0777)) {
 		fail("mkdir");
diff --git a/test/zdtm/static/binfmt_misc.hook b/test/zdtm/static/binfmt_misc.hook
index efeeefc0..5bb8e359 100755
--- a/test/zdtm/static/binfmt_misc.hook
+++ b/test/zdtm/static/binfmt_misc.hook
@@ -13,8 +13,8 @@ if [ -e $tname/${name}_magic ]; then
 	echo -1 > $tname/${name}_magic
 fi
 
-if [ -e $tname/${name}_extention ]; then
-	echo -1 > $tname/${name}_extention
+if [ -e $tname/${name}_extension ]; then
+	echo -1 > $tname/${name}_extension
 fi
 set -e
 
diff --git a/test/zdtm/static/cgroup_stray.c b/test/zdtm/static/cgroup_stray.c
index 16db9ba5..8532f84d 100644
--- a/test/zdtm/static/cgroup_stray.c
+++ b/test/zdtm/static/cgroup_stray.c
@@ -94,7 +94,7 @@ static bool pid_in_cgroup(pid_t pid, const char *controller, const char *path) {
 		/* chop off trailing \n */
 		buf[strlen(buf)-1] = '\0';
 
-		/* skip heirarchy no. */
+		/* skip hierarchy no. */
 		pos = strstr(buf, ":");
 		if (!pos) {
 			pr_err("invalid /proc/pid/cgroups file");
diff --git a/test/zdtm/static/cgroupns.c b/test/zdtm/static/cgroupns.c
index 7bb0b1fd..7459af13 100644
--- a/test/zdtm/static/cgroupns.c
+++ b/test/zdtm/static/cgroupns.c
@@ -92,7 +92,7 @@ static bool pid_in_cgroup(pid_t pid, const char *controller, const char *path) {
 		/* chop off trailing \n */
 		buf[strlen(buf)-1] = '\0';
 
-		/* skip heirarchy no. */
+		/* skip hierarchy no. */
 		pos = strstr(buf, ":");
 		if (!pos) {
 			pr_err("invalid /proc/pid/cgroups file");
diff --git a/test/zdtm/static/different_creds.c b/test/zdtm/static/different_creds.c
index 59fd1fa7..44a87c43 100644
--- a/test/zdtm/static/different_creds.c
+++ b/test/zdtm/static/different_creds.c
@@ -117,7 +117,7 @@ int main(int argc, char ** argv)
 	}
 
 	/*
-	 * Wait for child to signal us that it has droped caps.
+	 * Wait for child to signal us that it has dropped caps.
 	 */
 	if (read(pipefd[1], &c, 1) != 1) {
 		pr_perror("read");
diff --git a/test/zdtm/static/futex-rl.c b/test/zdtm/static/futex-rl.c
index 9a3181a2..678e175e 100644
--- a/test/zdtm/static/futex-rl.c
+++ b/test/zdtm/static/futex-rl.c
@@ -84,7 +84,7 @@ int main(int argc, char **argv)
 	task_waiter_init(&args->waiter);
 	args->result = 0;
 
-	test_msg("Createing thread\n");
+	test_msg("Creating thread\n");
 	if (pthread_create(&thread, NULL, thread_fn, (void *)args)) {
 		fail("Can't create thread\n");
 		exit(1);
diff --git a/test/zdtm/static/maps00.c b/test/zdtm/static/maps00.c
index aa3c29e6..a6c68cd2 100644
--- a/test/zdtm/static/maps00.c
+++ b/test/zdtm/static/maps00.c
@@ -31,7 +31,7 @@ int check_prot(int src_prot, int dst_prot)
 {
 	if (RW_PROT(src_prot) != RW_PROT(dst_prot))
 		return 0;
-	/* If exec bit will be enabled may depend on NX capablity of CPUs of
+	/* If exec bit will be enabled may depend on NX capability of CPUs of
 	 * source and destination nodes. In any case, migrated mapping should
 	 * not have less permissions than newly created one
 	 **
diff --git a/test/zdtm/static/mount_paths.c b/test/zdtm/static/mount_paths.c
index ee05adb4..2377e9c9 100644
--- a/test/zdtm/static/mount_paths.c
+++ b/test/zdtm/static/mount_paths.c
@@ -8,7 +8,7 @@
 
 #include "zdtmtst.h"
 
-const char *test_doc	= "Check that special charecters in paths are handled correctly";
+const char *test_doc	= "Check that special characters in paths are handled correctly";
 const char *test_author	= "Andrew Vagin <avagin at virtuozzo.com>";
 
 char *dirname;
diff --git a/test/zdtm/static/session01.c b/test/zdtm/static/session01.c
index 7e6dee25..20c0d51c 100644
--- a/test/zdtm/static/session01.c
+++ b/test/zdtm/static/session01.c
@@ -252,7 +252,7 @@ int main(int argc, char ** argv)
 		if (ret < 0)
 			goto err;
 		futex_set(&testcases[i].futex, 0);
-		test_msg("The process %d initilized\n", ret);
+		test_msg("The process %d initialized\n", ret);
 	}
 
 	test_daemon();
diff --git a/test/zdtm/static/vdso-proxy.c b/test/zdtm/static/vdso-proxy.c
index eadd9af8..2381127b 100644
--- a/test/zdtm/static/vdso-proxy.c
+++ b/test/zdtm/static/vdso-proxy.c
@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
 	test_msg("[NOTE]\tMappings before:\n");
 	nr_before = parse_maps(vmas_before);
 	if (nr_before < 0) {
-		pr_perror("Faied to parse maps");
+		pr_perror("Failed to parse maps");
 		return -1;
 	}
 
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
 	test_msg("[NOTE]\tMappings after:\n");
 	nr_after = parse_maps(vmas_after);
 	if (nr_after < 0) {
-		pr_perror("Faied to parse maps");
+		pr_perror("Failed to parse maps");
 		return -1;
 	}
 
diff --git a/test/zdtm/static/vdso01.c b/test/zdtm/static/vdso01.c
index f571a87a..be733663 100644
--- a/test/zdtm/static/vdso01.c
+++ b/test/zdtm/static/vdso01.c
@@ -422,7 +422,7 @@ int main(int argc, char *argv[])
 	test_init(argc, argv);
 
 	if (vdso_fill_self_symtable(&symtable)) {
-		pr_perror("Faied to parse vdso");
+		pr_perror("Failed to parse vdso");
 		return -1;
 	}
 
diff --git a/test/zdtm/static/vsx.c b/test/zdtm/static/vsx.c
index 33151cab..be02cfe1 100644
--- a/test/zdtm/static/vsx.c
+++ b/test/zdtm/static/vsx.c
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
 #include <asm/cputable.h>
 
 /*
- * This test verifies that data stored in the VSX regsiters are still there
+ * This test verifies that data stored in the VSX registers are still there
  * once the restart is done.
  *
  * The test is filling the registers with dedicated values and then check
diff --git a/test/zdtm/transition/maps008.c b/test/zdtm/transition/maps008.c
index a89309d2..5f6eb088 100644
--- a/test/zdtm/transition/maps008.c
+++ b/test/zdtm/transition/maps008.c
@@ -18,7 +18,7 @@ const char *test_doc = "ps tree with anon shared vmas for dedup";
 /*
  * 1. ps tree with non triavial anon shmem vmas is created first.
  * 2. Each process gets its portion of shmem vmas.
- * 3. Each process continiously datagens its portion until
+ * 3. Each process continuously datagens its portion until
  *    criu dump is finished.
  * 4. Each process datachecks all its shmem portions after restore.
  * 5. Contents of anon shmem vmas are checked for equality in
diff --git a/test/zdtm/transition/netlink00.c b/test/zdtm/transition/netlink00.c
index e69d579b..c9b2303e 100644
--- a/test/zdtm/transition/netlink00.c
+++ b/test/zdtm/transition/netlink00.c
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
 		pr_perror("bind failed");
 		goto out;
 	}
-	//Preperation:
+	//Preparation:
 	form_request_del();
 	send_request();
 	recv_reply();
-- 
2.17.1



More information about the CRIU mailing list