[BACK]Return to clock_subr_test_data_gen.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / tests / dev / clock_subr

File: [cvs.NetBSD.org] / src / tests / dev / clock_subr / clock_subr_test_data_gen.sh (download)

Revision 1.1, Sun Aug 14 14:55:42 2016 UTC (4 years, 1 month ago) by jakllsch
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, is-mlppp-base, is-mlppp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, HEAD
Branch point for: pgoyette-localcount

tests for sys/dev/clock_subr.c

#!/bin/ksh

export TZ=Etc/Universal

datesub() {
	gdate "$@" '+	FILL(%_11s,%_4Y,%_m,%_d,%w,%_H,%_M,%_S), // %a %b %e %H:%M:%S %Z %Y'
}

(
	datesub -d '1970/01/01 00:00:00'
	datesub -d '1981/04/12 12:00:03'
	datesub -d '2011/07/21 09:57:00'
	datesub -d @2147483647
	datesub -d @2147483648
	datesub -d '2063/04/05 00:00:00'
	for year in `seq 1970 1 2030`; do
		datesub -d "${year}/01/01 00:00:00"
		datesub -d "${year}/07/01 00:00:00"
	done
	for year in `seq 2000 25 2600`; do
		datesub -d "$((${year} - 1))/12/31 23:59:59"
		datesub -d "$((${year} + 0))/01/01 00:00:00"
		datesub -d "$((${year} + 1))/01/01 00:00:00"
	done
)|sort -u