rename turbo to turbonss
This commit is contained in:
parent
7192d0d333
commit
8ceacc04b8
@ -393,7 +393,7 @@ Prepare `profile.data`:
|
||||
```
|
||||
zig build -Drelease-small=true && \
|
||||
perf record --call-graph=dwarf \
|
||||
zig-out/bin/turbo-unix2db --passwd passwd2 --group group2
|
||||
zig-out/bin/turbonss-unix2db --passwd passwd2 --group group2
|
||||
```
|
||||
|
||||
Perf interactive:
|
||||
|
@ -64,7 +64,7 @@ pub fn build(b: *zbs.Builder) void {
|
||||
bdz.addIncludeDir("include/deps/cmph");
|
||||
|
||||
{
|
||||
const exe = b.addExecutable("turbo-unix2db", "src/turbo-unix2db.zig");
|
||||
const exe = b.addExecutable("turbonss-unix2db", "src/turbonss-unix2db.zig");
|
||||
exe.strip = strip;
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
@ -73,7 +73,7 @@ pub fn build(b: *zbs.Builder) void {
|
||||
}
|
||||
|
||||
{
|
||||
const exe = b.addExecutable("turbo-analyze", "src/turbo-analyze.zig");
|
||||
const exe = b.addExecutable("turbonss-analyze", "src/turbonss-analyze.zig");
|
||||
exe.strip = strip;
|
||||
exe.setTarget(target);
|
||||
exe.setBuildMode(mode);
|
||||
@ -81,7 +81,7 @@ pub fn build(b: *zbs.Builder) void {
|
||||
}
|
||||
|
||||
{
|
||||
const exe = b.addExecutable("turbo-getent", "src/turbo-getent.zig");
|
||||
const exe = b.addExecutable("turbonss-getent", "src/turbonss-getent.zig");
|
||||
exe.strip = strip;
|
||||
exe.linkLibC();
|
||||
exe.linkLibrary(bdz);
|
||||
|
@ -16,7 +16,7 @@ test "turbonss test suite" {
|
||||
_ = @import("validate.zig");
|
||||
|
||||
// main
|
||||
_ = @import("turbo-getent.zig");
|
||||
_ = @import("turbo-unix2db.zig");
|
||||
_ = @import("turbo-analyze.zig");
|
||||
_ = @import("turbonss-getent.zig");
|
||||
_ = @import("turbonss-unix2db.zig");
|
||||
_ = @import("turbonss-analyze.zig");
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ const Header = @import("header.zig").Header;
|
||||
const section_length_bits = @import("header.zig").section_length_bits;
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-analyze [OPTION]... <PATH>
|
||||
\\usage: turbonss-analyze [OPTION]... <PATH>
|
||||
\\
|
||||
\\Arguments:
|
||||
\\ <PATH> Path to the database (default: /etc/turbonss/db.turbo)
|
||||
@ -159,7 +159,7 @@ fn execute(
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-analyze trivial error: db file" {
|
||||
test "turbonss-analyze trivial error: db file" {
|
||||
const args = &[_][*:0]const u8{"/does/not/exist.turbo"};
|
||||
const allocator = testing.allocator;
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@ -190,7 +190,7 @@ fn splitInt(n: u64) BoundedArray(u8, max_len) {
|
||||
return result;
|
||||
}
|
||||
|
||||
test "turbo-analyze separators" {
|
||||
test "turbonss-analyze separators" {
|
||||
const tests = [_]struct {
|
||||
input: u64,
|
||||
want: []const u8,
|
@ -16,12 +16,12 @@ const User = @import("User.zig");
|
||||
const Mode = enum { group, passwd };
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-getent [OPTION]... group|passwd [key...]
|
||||
\\usage: turbonss-getent [OPTION]... group|passwd [key...]
|
||||
\\
|
||||
\\ -h Print this help message and exit
|
||||
\\ --db=PATH Path to the database (default: /etc/turbonss/db.turbo)
|
||||
\\ --db PATH Path to the database (default: /etc/turbonss/db.turbo)
|
||||
\\
|
||||
\\turbo-getent resolves group or passwd (a.k.a. user) entries from the
|
||||
\\turbonss-getent resolves group or passwd (a.k.a. user) entries from the
|
||||
\\database file. If one or more key arguments are provided, then only
|
||||
\\entries that match the supplied keys will be displayed. If no key is
|
||||
\\provided, all entries will be displayed.
|
||||
@ -194,7 +194,7 @@ fn printGroup(stdout: anytype, db: *const DB, g: *const PackedGroup) ?u8 {
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-getent passwd" {
|
||||
test "turbonss-getent passwd" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@ -224,7 +224,7 @@ test "turbo-getent passwd" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent passwdAll" {
|
||||
test "turbonss-getent passwdAll" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@ -259,7 +259,7 @@ test "turbo-getent passwdAll" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent group" {
|
||||
test "turbonss-getent group" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
||||
@ -290,7 +290,7 @@ test "turbo-getent group" {
|
||||
}
|
||||
}
|
||||
|
||||
test "turbo-getent groupAll" {
|
||||
test "turbonss-getent groupAll" {
|
||||
var tf = try File.TestDB.init(testing.allocator);
|
||||
defer tf.deinit();
|
||||
var stdout = ArrayList(u8).init(testing.allocator);
|
@ -15,7 +15,7 @@ const DB = @import("DB.zig");
|
||||
const ErrCtx = @import("ErrCtx.zig");
|
||||
|
||||
const usage =
|
||||
\\usage: turbo-unix2db [options]
|
||||
\\usage: turbonss-unix2db [options]
|
||||
\\
|
||||
\\ -h Print this help message and exit
|
||||
\\ --passwd Path to passwd file (default: passwd)
|
||||
@ -129,7 +129,7 @@ fn fail(errc: *ErrCtx, stderr: anytype, err: anytype) u8 {
|
||||
|
||||
const testing = std.testing;
|
||||
|
||||
test "turbo-unix2db invalid argument" {
|
||||
test "turbonss-unix2db invalid argument" {
|
||||
const allocator = testing.allocator;
|
||||
const args = &[_][*:0]const u8{"--invalid-argument"};
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@ -146,7 +146,7 @@ test "turbo-unix2db invalid argument" {
|
||||
));
|
||||
}
|
||||
|
||||
test "turbo-unix2db trivial error: missing passwd file" {
|
||||
test "turbonss-unix2db trivial error: missing passwd file" {
|
||||
const allocator = testing.allocator;
|
||||
const args = &[_][*:0]const u8{};
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
@ -159,7 +159,7 @@ test "turbo-unix2db trivial error: missing passwd file" {
|
||||
try testing.expectEqualStrings(stderr.items, "ERROR FileNotFound: open 'passwd'\n");
|
||||
}
|
||||
|
||||
test "turbo-unix2db fail" {
|
||||
test "turbonss-unix2db fail" {
|
||||
var errc = ErrCtx{};
|
||||
var buf = ArrayList(u8).init(testing.allocator);
|
||||
defer buf.deinit();
|
||||
@ -169,7 +169,7 @@ test "turbo-unix2db fail" {
|
||||
try testing.expectEqualStrings(buf.items, "ERROR NotSure: invalid user 'foo'\n");
|
||||
}
|
||||
|
||||
test "turbo-unix2db smoke test" {
|
||||
test "turbonss-unix2db smoke test" {
|
||||
const allocator = testing.allocator;
|
||||
var stderr = ArrayList(u8).init(allocator);
|
||||
defer stderr.deinit();
|
Loading…
Reference in New Issue
Block a user