Skip to content

Commit

Permalink
Testname not needed anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
cahirwpz committed Jul 31, 2023
1 parent a0ad99a commit 2117a7a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
4 changes: 0 additions & 4 deletions bin/utest/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ static int running(void) {
return pending;
}

const char *testname = NULL;

static void run_test(sigset_t *mask, test_entry_t *te) {
timeval_t tv = timestamp();
const char *name = te->name;
Expand All @@ -118,8 +116,6 @@ static void run_test(sigset_t *mask, test_entry_t *te) {
setpgid(0, 0);
xsigprocmask(SIG_SETMASK, mask, NULL);

testname = te->name;

if (te->flags & TF_DEBUG)
__verbose = 1;

Expand Down
3 changes: 1 addition & 2 deletions bin/utest/utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ static void print_msg(const char *file, int line, const char *fmt, va_list ap) {

char *basename = strrchr(file, '/');
file = basename ? basename + 1 : file;
res =
snprintf_ss(buf, sizeof(buf), "[%s|%s:%d] ", testname ?: "?", file, line);
res = snprintf_ss(buf, sizeof(buf), "[%s:%d] ", file, line);
if (res < 0)
exit(EXIT_FAILURE);
len += res;
Expand Down
1 change: 0 additions & 1 deletion bin/utest/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ typedef struct test_entry {
*/

extern int __verbose;
extern const char *testname;

noreturn void __die(const char *file, int line, const char *fmt, ...);
void __msg(const char *file, int line, const char *fmt, ...);
Expand Down

0 comments on commit 2117a7a

Please sign in to comment.