aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/unit-tests/t-example-decorate.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/t/unit-tests/t-example-decorate.c b/t/unit-tests/t-example-decorate.c
index a4a75db735..8bf0709c41 100644
--- a/t/unit-tests/t-example-decorate.c
+++ b/t/unit-tests/t-example-decorate.c
@@ -15,36 +15,29 @@ static void t_add(struct test_vars *vars)
{
void *ret = add_decoration(&vars->n, vars->one, &vars->decoration_a);
- if (!check(ret == NULL))
- test_msg("when adding a brand-new object, NULL should be returned");
+ check(ret == NULL);
ret = add_decoration(&vars->n, vars->two, NULL);
- if (!check(ret == NULL))
- test_msg("when adding a brand-new object, NULL should be returned");
+ check(ret == NULL);
}
static void t_readd(struct test_vars *vars)
{
void *ret = add_decoration(&vars->n, vars->one, NULL);
- if (!check(ret == &vars->decoration_a))
- test_msg("when readding an already existing object, existing decoration should be returned");
+ check(ret == &vars->decoration_a);
ret = add_decoration(&vars->n, vars->two, &vars->decoration_b);
- if (!check(ret == NULL))
- test_msg("when readding an already existing object, existing decoration should be returned");
+ check(ret == NULL);
}
static void t_lookup(struct test_vars *vars)
{
void *ret = lookup_decoration(&vars->n, vars->one);
- if (!check(ret == NULL))
- test_msg("lookup should return added declaration");
+ check(ret == NULL);
ret = lookup_decoration(&vars->n, vars->two);
- if (!check(ret == &vars->decoration_b))
- test_msg("lookup should return added declaration");
+ check(ret == &vars->decoration_b);
ret = lookup_decoration(&vars->n, vars->three);
- if (!check(ret == NULL))
- test_msg("lookup for unknown object should return NULL");
+ check(ret == NULL);
}
static void t_loop(struct test_vars *vars)
@@ -55,8 +48,7 @@ static void t_loop(struct test_vars *vars)
if (vars->n.entries[i].base)
objects_noticed++;
}
- if (!check_int(objects_noticed, ==, 2))
- test_msg("should have 2 objects");
+ check_int(objects_noticed, ==, 2);
}
int cmd_main(int argc UNUSED, const char **argv UNUSED)
t/lib/maple_tree.c?id=81528310698726e8f79b9c3de01ebe02567119dd&follow=1'>maple_tree: arange64 node is not a leaf nodeWei Yang1-5/+1 2024-09-09Docs/damon/maintainer-profile: document Google calendar for bi-weekly meetupsSeongJae Park1-2/+4 2024-09-09Docs/damon/maintainer-profile: add links in placeSeongJae Park1-40/+44 2024-09-09Docs/damon: use damonitor GitHub organization instead of awslabsSeongJae Park8-23/+23 2024-09-09Revert "mm/damon/lru_sort: adjust local variable to dynamic allocation"SeongJae Park1-11/+4 2024-09-09mm/damon/core: remove per-scheme region priority histogram bufferSeongJae Park1-1/+0 2024-09-09mm/damon/core: replace per-quota regions priority histogram buffer usage with...SeongJae Park1-3/+6 2024-09-09mm/damon/core: introduce per-context region priorities histogram bufferSeongJae Park2-0/+7 2024-09-09mm: remove putback_lru_page()Kefeng Wang2-6/+0 2024-09-09mm: remove isolate_lru_page()Kefeng Wang9-33/+25 2024-09-09mm: migrate_device: use more folio in migrate_device_finalize()Kefeng Wang1-19/+22 2024-09-09mm: migrate_device: use more folio in migrate_device_unmap()Kefeng Wang1-10/+10 2024-09-09mm: migrate_device: use a folio in migrate_device_range()Kefeng Wang1-4/+5 2024-09-09mm: migrate_device: convert to migrate_device_coherent_folio()Kefeng Wang3-17/+17 2024-09-09swap: convert swapon() to use a folioMatthew Wilcox (Oracle)1-9/+7 2024-09-09mm: count the number of partially mapped anonymous THPs per sizeBarry Song3-0/+14 2024-09-09mm: count the number of anonymous THPs per sizeBarry Song6-6/+37 2024-09-09mm: tidy up shmem mTHP controls and statsRyan Roberts1-28/+112 2024-09-09mm: cleanup count_mthp_stat() definitionRyan Roberts3-43/+35 2024-09-03mm: memory_hotplug: unify Huge/LRU/non-LRU movable folio isolationKefeng Wang1-28/+15 2024-09-03mm: migrate: add isolate_folio_to_list()Kefeng Wang3-35/+42 2024-09-03mm: memory_hotplug: check hwpoisoned page firstly in do_migrate_range()Kefeng Wang1-10/+10 2024-09-03mm: memory-failure: add unmap_poisoned_folio()Kefeng Wang2-17/+35 2024-09-03mm: memory_hotplug: remove head variable in do_migrate_range()Kefeng Wang1-8/+14