view test/suite_aggrs/config.lua @ 482:0f3b6898078d

suite_aggrs (still ahead of checked in version of dyncall, sorry): - renaming struct -> aggr - added knobs to: * control struct packing * whether to test immutability of aggr-by-val params * how to copy aggrs (field by field or via = op (which might do a memcpy and thus copy padding garbage, also)) - some macros to reduce file sizes of generated cases - setting default misalignment to 1
author Tassilo Philipp
date Wed, 16 Mar 2022 16:27:50 +0100
parents bd8f5da2c74b
children
line wrap: on
line source

-- user config for rand-sig.lua:
minargs      = 0
maxargs      = 16
minaggrfields= 0    -- 0 allows for empty structs/unions
maxaggrfields= 12
maxarraylen  = 16   -- see 1)
arraydice    = 40   -- how often to turn a member into an array (1 out of arraydice-times)
maxaggrdepth = 3    -- max nesting depth of aggregates, 1 = no nesting
ncases       = 400
types        = "csijlpfd{}<>"  -- {...} for structs, <...> for unions
seed         = 2112

-- specify types more than once to increase relative occurance, e.g.:

-- this favors non-aggregate args, especially ints (and also increases avg num of aggregate fields):
--types       = "ccssiiiiijjllpfd{}"

-- this heavily favors nested structs, while not having any union:
--types       = "csijlpfd{{{{{{}"

-- this heavily favors flat and short/empty aggregates:
--types       = "csijlpfd{}}}}}}<>>>>>"


-- 1) note some callconvs pass structs via regs, so using big numbers here will
--    reduce those cases; however special alignment rules are specified in some
--    ABIs for bigger arrays, which is also worth testing


-- user config for mk-cases.lua

-- if true, aggregates are copied via = operator, otherwise field by field
aggrcpsimple = true

-- if true, aggregate params are modified in called function, to test whether
-- they are passed "by value" (important for verifying by-value semantics for
-- callconvs where hidden pointers are used instead of real copies; aggregate
-- passing implementations must use of temporary copies in those cases)
aggrmutabletest = true

-- force aggregate packing, 0=off, pos values set fixed packing, neg values
-- set a random power-of-2 packing per aggregate, within [1,abs(aggrpacking)]
aggrpacking = 0