view test/callback_suite/make-signatures.lua @ 551:eef302b7a58d

- amendment fix for buffer overflow (see commit 0455834d29a1), to also handle non-standard struct packing, + better asserts - changelog wording tweaks for clarity - comment tweaks for clarity - (mostly pointless) microoptimization in aggr alignment calculation, avoiding a modulo, as alignment always a power of 2 - cleanups
author Tassilo Philipp
date Mon, 20 Jun 2022 14:57:49 +0200
parents f8856e29b512
children
line wrap: on
line source

require "config"
require "math"
require "string"


function randomSignatures()
  package.path = '../common/?.lua;' .. package.path
  require"rand-sig"
end


function orderedSignatures()
  package.path = '../common/?.lua;' .. package.path
  require"ordered-sig"
end


function designedSignatures()
 for line in io.lines(designfile) do
   io.write( line )
   io.write( "\n" )
 end
end


if mode == "random" then
  randomSignatures()
elseif mode == "ordered" then
  orderedSignatures()
elseif mode == "designed" then
  designedSignatures()
else
  error("'mode' must be 'random', 'ordered' or 'designed'")
end

io.flush()