xref: /openbsd-src/regress/usr.bin/mandoc/db/makeinodes/makeinodes.1 (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1.\"	$OpenBSD: makeinodes.1,v 1.1 2016/07/30 10:56:13 schwarze Exp $
2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: July 30 2016 $
18.Dt MAKEINODES 1
19.Os
20.Sh NAME
21.Nm makeinodes
22.Nd create files such that inode numbers hash in a defined order
23.Sh SYNOPSIS
24.Nm makeinodes
25.Sh DESCRIPTION
26The
27.Nm
28utility creates a directory
29.Pa man/man1/
30and two empty files
31.Pa man/man1/1
32and
33.Pa man/man1/2
34such that the lowest six bits of the inode number of file 1
35are smaller than the lowest six bits of the inode number of file 2.
36.Pp
37This is useful to test the behaviour of the
38.Xr makewhatis 8
39program which hashes files with
40.Xr ohash 3
41according to their inode numbers, such that fully testing all the
42code paths requires test files hashing in a well-defined order.
43.Pp
44Once the files have been created with
45.Nm ,
46their content can be provided with
47.Xr cat 1
48and they can be renamed as desired with
49.Xr mv 1 .
50.Sh EXIT STATUS
51.Ex -std
52It may fail when creation of a directory or file,
53lookup of an inode number, or renaming of a file fails.
54.Sh AUTHORS
55.An Ingo Schwarze Aq Mt schwarze@openbsd.org
56