Hasty Harness and the Dreaded Square Knot (spoiler: your back will break before the knot does)
A hasty harness, made from webbing, may be all you need for a short rap
or a top belay on a mild pitch. I've tied them for people who simply
forgot to bring a harness, or who didn't expect to do more than a few
raps ever. A good summary is at animated knots. Or look here.

For years, we were told to tie off the ends with a square knot -- there
really isn't much else to use, because you need to pull the excess
webbing, from opposite directions, rather tightly. I remember testing
the lone square knot by bouncing up and down 50x, while hanging in the
harness from a pull-up bar; I had drawn lines at the points where the
webbing came out of the knot. They tails did not move after 50 bounces.
(In theory, a simple square knot could come undone easily if two tails
were grabbed and pulled; I couldn't make that happen.)
But then climbers read the instructions, and hateful of square knots,
demanded a better solution. "Grog" put in the caveat that the tails
should be further tied, say by an overhand. I have since used an
overhand, or two half-hitches, to finish. But I wondered; how much
difference does it make? So here are the tests.
It's important to recognize that a weighted hasty harness will look a lot
different -- here am I, hanging from an anchor in the ceiling of my
stairwell:
(click thumbnails for full-sized images)

In
the minimal case, your hanging weight is distributed between two lines
of webbing, as 4 strands coming down from the carabiner. The
webbing with the knot has two strands at a roughly 90 degrees angle.
Thus the tension across the knot is about 0.35x totalweight (assuming
the carabiner is a perfect pulley, which it isn't).
So what is the expected strength of that knot, in the possible
configurations -- 1) bare square knot, 2) square knot tied off with a
half-hitch on each side, and 3) a square knot with the tails tied in an
overhand?
I often use just 5/8" (~16mm) climbspec tubular webbing -- a 12' piece
weighs just 3.5 oz, and can serve other purposes. Bluewater 5/8"
webbing is claimed to have "strength" of 9 kN, or ~2023 lbs (it isn't
clear if this is an MBS or an average).
Let's get a baseline by testing the strength of the webbing alone. I did
this with a pull behind my Jeep, as I expect this would be a little bit
scary with a come-along. Below is the set-up:
(click thumbnails for full-sized images)

Note how we are using bow shackles to create quasi-capstan-clamps,
which
are capable of getting near the full strength of the webbing without a
"loop knot;" this works because the thickness of the webbing is only
about
1/9 the diameter of the pin. Three wraps reduce the force so much we
can finish with just an overhand on the bow.
The breaking force was measured at 2032 lbs, which is ~the rated strength of the webbing.
Now we test the strength and behavior of the knots, with a come-along used to provide the force, in this setup:
(click thumbnails for full-sized images)

First, the simple square knot broke at 1020 lbs
(expected 1-2% uncertainty just in the linescale 3). However, starting
at slightly over 800 lbs, the knot slid suddenly 2x (accompanied by a popping sound) then was quiet till
breaking. Note that this force on the knot would occur when the total
force on the climber was roughly 800/0.35 ~2300 lbs = 10.2 kilonewtons,
which would likely cause serious injury or death.
[i took no pictures before and after for this test]
Second, the square knot with the ends tied off with 2 half-hitches, on each side of the square knot, broke at 1306 lbs.
Below are the before and after configurations. (The "before"
configuration was actually tied after the test, to show what the
initial knot looked like.)
(click thumbnails for full-sized images)

Third, the square knot with both ends tied off in a single overhand broke at 1414 lbs:
(click thumbnails for full-sized images)

It is notable that the total force on the climbers body would be
~1414/0.35 = 4040 lbs = 18 kN which would very likely kill the climber.