gstack foreach tests