Skip to content

Instantly share code, notes, and snippets.

@kbingham
Created October 30, 2019 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbingham/76e8718df7b7dc97361405cc1801a160 to your computer and use it in GitHub Desktop.
Save kbingham/76e8718df7b7dc97361405cc1801a160 to your computer and use it in GitHub Desktop.
#/bin/bash
CONFIG_HZ=$1
# The output of timeconst.sh is parsed by sed to remove the
# following diff from each comparison
# --- BC
# +++ SH
# @@ -1,4 +1,4 @@
# -/* Automatically generated by kernel/time/timeconst.bc */
# +/* Automatically generated by kernel/time/timeconst.sh */
# /* Time conversion constants for HZ == 1000 */
echo "Validating CONFIG_HZ at $CONFIG_HZ"
diff -u \
--label=BC <(echo $CONFIG_HZ | bc -q ./kernel/time/timeconst.bc) \
--label=SH <(./kernel/time/timeconst.sh $CONFIG_HZ | sed 's/timeconst.sh/timeconst.bc/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment